Skip to content

Commit

Permalink
Persist our ENABLE_ALL setting after the first CMake run
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Aug 6, 2024
1 parent 979ca2e commit 4d5e8db
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ endif(CMAKE_CONFIGURATION_TYPES)
mark_as_advanced(CMAKE_BUILD_TYPE)
mark_as_advanced(CMAKE_CONFIGURATION_TYPES)

#------------------------------------------------------------------------------
# Once we do a run, we want our ENABLE_ALL setting to be consistent in
# subsequent CMake runs
if (ENABLE_ALL)
set(ENABLE_ON "ON" CACHE BOOL "Enable all local versions of packages")
else (ENABLE_ALL)
set(ENABLE_ON "OFF" CACHE BOOL "Prefer system versions of packages")
endif (ENABLE_ALL)

#------------------------------------------------------------------------------
# We do NOT want CMake looking in the User Package Registry - have encountered
# at least one case where stale or incorrect information there has resulted in
Expand Down

0 comments on commit 4d5e8db

Please sign in to comment.