Skip to content

Commit

Permalink
Merge pull request #280 from chillenzer/add-caching-to-build-variables
Browse files Browse the repository at this point in the history
Cache BUILD_TESTING/EXAMPLES
  • Loading branch information
psychocoderHPC authored Feb 4, 2025
2 parents 5fe1120 + bca31c9 commit 218acec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ target_include_directories(
$<INSTALL_INTERFACE:include/${PROJECT_NAME}-${PROJECT_VERSION}>
)

option(mallocMC_BUILD_TESTING "Turn on/off building the tests" OFF)
if(mallocMC_BUILD_TESTING)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/tools.cmake)
enable_testing()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/test ${CMAKE_BINARY_DIR}/test)
endif()

option(mallocMC_BUILD_EXAMPLES "Turn on/off building the examples" OFF)
if(mallocMC_BUILD_EXAMPLES)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/tools.cmake)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/examples ${CMAKE_BINARY_DIR}/examples)
Expand Down

0 comments on commit 218acec

Please sign in to comment.