Skip to content

Commit d126a71

Browse files
committed
add FMU4CPP_BUILD_EXAMPLES option
default OFF
1 parent 3d5fe17 commit d126a71

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ if (POLICY CMP0091)
99
endif ()
1010
endif ()
1111

12+
option(FMU4CPP_BUILD_EXAMPLES "Build example FMUs" OFF)
1213
option(FMU4CPP_BUILD_TESTS "Build internal tests" OFF)
1314

1415
set(CMAKE_CXX_STANDARD 17)

export/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
add_subdirectory(src)
2-
add_subdirectory(examples)
2+
3+
if (FMU4CPP_BUILD_EXAMPLES)
4+
add_subdirectory(examples)
5+
endif ()
36

47
# internal executable invoked by CMake to generate the modelDescription.xml from a shared library
58
add_executable(descriptionGenerator "descriptionGenerator.cpp")
69
if (UNIX)
710
target_link_libraries(descriptionGenerator PRIVATE dl)
8-
endif()
11+
endif ()
912

1013
if (FMU4CPP_BUILD_TESTS)
1114
Include(FetchContent)

0 commit comments

Comments
 (0)