From 4e6bca79cd448db673ad0c7cc69a69ed3bc4ce84 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Nov 2023 09:15:05 +1100 Subject: [PATCH] Cleanup: quiet unused variable warnings in CMake OpenMP_LIBRARIES was used when it wasn't defined. --- build_files/cmake/Modules/GTestTesting.cmake | 2 +- intern/opensubdiv/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake index 7a6107d6d9c..e533fe47a3f 100644 --- a/build_files/cmake/Modules/GTestTesting.cmake +++ b/build_files/cmake/Modules/GTestTesting.cmake @@ -72,7 +72,7 @@ macro(BLENDER_SRC_GTEST_EX) if(DEFINED PTHREADS_LIBRARIES) # Needed for GLOG. target_link_libraries(${TARGET_NAME} PRIVATE ${PTHREADS_LIBRARIES}) endif() - if(WITH_OPENMP_STATIC) + if(WITH_OPENMP AND WITH_OPENMP_STATIC) target_link_libraries(${TARGET_NAME} PRIVATE ${OpenMP_LIBRARIES}) endif() if(UNIX AND NOT APPLE) diff --git a/intern/opensubdiv/CMakeLists.txt b/intern/opensubdiv/CMakeLists.txt index 5879781b70f..f4d6fcdd7aa 100644 --- a/intern/opensubdiv/CMakeLists.txt +++ b/intern/opensubdiv/CMakeLists.txt @@ -76,7 +76,7 @@ if(WITH_OPENSUBDIV) ${OPENSUBDIV_LIBRARIES} ) - if(WITH_OPENMP_STATIC) + if(WITH_OPENMP AND WITH_OPENMP_STATIC) list(APPEND LIB ${OpenMP_LIBRARIES} )