Skip to content
Snippets Groups Projects
Commit 95d32d2e authored by Jean-Christophe Fillion-Robin's avatar Jean-Christophe Fillion-Robin
Browse files

COMP: Support build with BUILD_EXAMPLES and BUILD_TESTING set to OFF

parent 85036448
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,8 @@ ExternalProject_Add( ${PROJECT_NAME}
SOURCE_DIR ${${PROJECT_NAME}_SOURCE_DIR}
BINARY_DIR ${CMAKE_BINARY_DIR}/Innerbuild
CMAKE_ARGS
-DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
-DBUILD_TESTING:BOOL=${BUILD_TESTING}
-D${PROJECT_NAME}_SUPERBUILD:BOOL=OFF
-D${PROJECT_NAME}_USE_OMNI:BOOL=${${PROJECT_NAME}_USE_OMNI}
-D${PROJECT_NAME}_USE_ODE:BOOL=${${PROJECT_NAME}_USE_ODE}
......
......@@ -36,7 +36,7 @@ function(imstk_add_library target)
file(GLOB_RECURSE target_H_FILES "${CMAKE_CURRENT_SOURCE_DIR}/imstk*.h")
file(GLOB_RECURSE target_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/imstk*.cpp")
file(GLOB_RECURSE testing_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Testing/*")
if(testing_CPP_FILES)
if(testing_FILES)
list(REMOVE_ITEM target_H_FILES ${testing_FILES})
list(REMOVE_ITEM target_CPP_FILES ${testing_FILES})
endif()
......
......@@ -71,6 +71,11 @@ if(MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
endif()
#-----------------------------------------------------------------------------
# Options
#-----------------------------------------------------------------------------
option(BUILD_EXAMPLES "Build iMSTK examples" ON)
#-----------------------------------------------------------------------------
# SUPERBUILD
#-----------------------------------------------------------------------------
......@@ -299,7 +304,7 @@ if(BUILD_TESTING)
endif()
# External data
if(BUILD_TESTING OR BUILD_EXAMPLES )
if(BUILD_TESTING OR BUILD_EXAMPLES)
include(imstkExternalData)
endif()
......@@ -363,7 +368,9 @@ install(
#--------------------------------------------------------------------------
# Add Examples subdirectories
#--------------------------------------------------------------------------
add_subdirectory(Examples)
if(BUILD_EXAMPLES)
add_subdirectory(Examples)
endif()
#--------------------------------------------------------------------------
# Innerbuild dummy test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment