@@ -36,6 +36,9 @@ set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
36
36
set (INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables" )
37
37
set (INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files" )
38
38
set (INSTALL_DATA_DIR share CACHE PATH "Installation directory for data files" )
39
+ # flag to enable/disable building examples and/or tests
40
+ set (BUILD_EXAMPLES ON CACHE BOOL "build mFAST examples" )
41
+ set (BUILD_TESTS ON CACHE BOOL "build mFAST unit tests" )
39
42
40
43
if (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten" )
41
44
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
@@ -89,6 +92,12 @@ endif (NOT BUILD_FAST_TYPE_GEN)
89
92
include_directories (${Boost_INCLUDE_DIR} )
90
93
91
94
95
+ ################################################################################
96
+ ## Setting up tinyxml2 Library
97
+ ################################
98
+
99
+ include_directories (${CMAKE_CURRENT_SOURCE_DIR} /tinyxml2 )
100
+
92
101
################################################################################
93
102
94
103
@@ -185,9 +194,11 @@ endfunction (FASTTYPEGEN_TARGET)
185
194
# Includes Catch in the project:
186
195
#add_subdirectory(${EXT_PROJECTS_DIR}/catch)
187
196
include_directories (${CMAKE_CURRENT_SOURCE_DIR} /catch/include ${COMMON_INCLUDES} )
188
- enable_testing ()
189
197
190
- add_subdirectory (tests )
198
+ if (BUILD_TESTS )
199
+ enable_testing ()
200
+ add_subdirectory (tests )
201
+ endif (BUILD_TESTS )
191
202
192
203
if (BUILD_SHARED_LIBS )
193
204
set (MFAST_LIBRARIES "${MFAST_SHARED_LIBRARIES} " )
@@ -198,7 +209,9 @@ else (BUILD_SHARED_LIBS)
198
209
set (MFAST_LIBRARIES "${MFAST_STATIC_LIBRARIES} " )
199
210
endif (BUILD_SHARED_LIBS )
200
211
201
- add_subdirectory (examples )
212
+ if (BUILD_EXAMPLES )
213
+ add_subdirectory (examples )
214
+ endif (BUILD_EXAMPLES )
202
215
203
216
204
217
# Setting up dist target
0 commit comments