Skip to content

Commit 4c0d0f6

Browse files
committed
Handle cache variables properly in CMake
1 parent 74d7f0e commit 4c0d0f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ endif()
248248

249249
option(UGU_USE_OPENMP "Use OpenMP to enable parallelization" ON)
250250
if(APPLE)
251-
set(UGU_USE_OPENMP OFF)
251+
set(UGU_USE_OPENMP OFF CACHE BOOL "Use OpenMP" FORCE)
252252
endif()
253253
message("UGU_USE_OPENMP: ${UGU_USE_OPENMP}")
254254
if(UGU_USE_OPENMP)
@@ -277,7 +277,7 @@ if(UGU_USE_TBB)
277277
set(Ugu_LIBS ${Ugu_LIBS} TBB::tbb TBB::tbbmalloc)
278278
else()
279279
message(WARNING "TBB not found. Disable UGU_USE_TBB")
280-
set(UGU_USE_TBB OFF)
280+
set(UGU_USE_TBB OFF CACHE BOOL "Use TBB" FORCE)
281281
endif()
282282
endif()
283283

@@ -567,7 +567,7 @@ else()
567567
endif()
568568
if(APPLE)
569569
# Not support Apple metal yet
570-
set(UGU_BUILD_GUI_APP OFF)
570+
set(UGU_BUILD_GUI_APP OFF CACHE BOOL "Switch to build GUI app" FORCE)
571571
endif()
572572
message("UGU_BUILD_EXAMPLES: ${UGU_BUILD_EXAMPLES}")
573573
message("UGU_BUILD_APP: ${UGU_BUILD_APP}")

0 commit comments

Comments
 (0)