Skip to content

Commit

Permalink
fix cmake for GISMO_BUILD_EXAMPLES=OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
hverhelst committed Dec 10, 2024
1 parent 3e24b89 commit be3807a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ foreach(file ${FILES})
get_filename_component(tarname ${file} NAME_WE) # name without extension
set_property(TEST ${tarname} PROPERTY LABELS "${PROJECT_NAME}")
if(GISMO_BUILD_EXAMPLES)
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
add_dependencies(${PROJECT_NAME}-examples ${tarname})
else(GISMO_BUILD_EXAMPLES)
set_target_properties(${tarname} PROPERTIES
FOLDER "${PROJECT_NAME}"
EXCLUDE_FROM_ALL TRUE)
endif(GISMO_BUILD_EXAMPLES)
add_dependencies(${PROJECT_NAME}-examples ${tarname})
# install the example executables (optionally)
install(TARGETS ${tarname} DESTINATION "${BIN_INSTALL_DIR}" COMPONENT exe OPTIONAL)
endforeach(file ${FILES})
4 changes: 2 additions & 2 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ foreach(file ${FILES})
get_filename_component(tarname ${file} NAME_WE) # name without extension
set_property(TEST ${tarname} PROPERTY LABELS "${PROJECT_NAME}")
if(GISMO_BUILD_EXAMPLES)
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
add_dependencies(${PROJECT_NAME}-tutorials ${tarname})
else(GISMO_BUILD_EXAMPLES)
set_target_properties(${tarname} PROPERTIES
FOLDER "${PROJECT_NAME}"
EXCLUDE_FROM_ALL TRUE)
endif(GISMO_BUILD_EXAMPLES)
add_dependencies(${PROJECT_NAME}-tutorials ${tarname})
# install the example executables (optionally)
install(TARGETS ${tarname} DESTINATION "${BIN_INSTALL_DIR}" COMPONENT exe OPTIONAL)
endforeach(file ${FILES})

0 comments on commit be3807a

Please sign in to comment.