diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-06-28 14:05:21 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-06-28 14:05:21 +0300 |
commit | c73894ea5b9bda03f538dedf878b7b2942790446 (patch) | |
tree | 538b12a92626ab522a4a593055c5b2e5244dc916 /CMakeLists.txt | |
parent | 48360afb105299e80155fd994b8c06c6f5e917ff (diff) | |
parent | 8aff86a0c7a1661d2c3381730c326504ef035e0d (diff) |
Merge commit 'master@{12-weeks-ago}' into tmp-vulkan
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ab3c80a793..1f7434b05ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,9 +236,7 @@ option(WITH_SYSTEM_AUDASPACE "Build with external audaspace library installed on mark_as_advanced(WITH_AUDASPACE) mark_as_advanced(WITH_SYSTEM_AUDASPACE) -if(NOT WITH_AUDASPACE) - set(WITH_SYSTEM_AUDASPACE OFF) -endif() +set_and_warn_dependency(WITH_AUDASPACE WITH_SYSTEM_AUDASPACE OFF) option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON) if(UNIX AND NOT APPLE) @@ -527,10 +525,10 @@ if(CMAKE_COMPILER_IS_GNUCC) mark_as_advanced(WITH_LINKER_LLD) endif() -if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") - option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF) - mark_as_advanced(WITH_COMPILER_ASAN) +option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF) +mark_as_advanced(WITH_COMPILER_ASAN) +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") if(WITH_COMPILER_ASAN) set(_asan_defaults "\ -fsanitize=address \ @@ -709,10 +707,8 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL) message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF") endif() -if(NOT WITH_PYTHON) - set(WITH_CYCLES OFF) - set(WITH_DRACO OFF) -endif() +set_and_warn_dependency(WITH_PYTHON WITH_CYCLES OFF) +set_and_warn_dependency(WITH_PYTHON WITH_DRACO OFF) if(WITH_DRACO AND NOT WITH_PYTHON_INSTALL) message(STATUS "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now") @@ -784,6 +780,7 @@ if(WITH_INSTALL_PORTABLE) endif() if(WITH_GHOST_SDL OR WITH_HEADLESS) + message(STATUS "Disabling Ghost Wayland, X11, Input IME, and OpenXR") set(WITH_GHOST_WAYLAND OFF) set(WITH_GHOST_X11 OFF) set(WITH_X11_XINPUT OFF) @@ -814,7 +811,7 @@ endif() if(NOT WITH_CUDA_DYNLOAD) find_package(CUDA) if(NOT CUDA_FOUND) - message("CUDA toolkit not found, using dynamic runtime loading of libraries instead") + message(STATUS "CUDA toolkit not found, using dynamic runtime loading of libraries (WITH_CUDA_DYNLOAD) instead") set(WITH_CUDA_DYNLOAD ON) endif() endif() @@ -1254,6 +1251,7 @@ if(WITH_OPENMP) string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}") string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}") string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}") + string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}") else() # Typically avoid adding flags as defines but we can't # pass OpenMP flags to the linker for static builds, meaning @@ -1264,6 +1262,7 @@ if(WITH_OPENMP) find_library_static(OpenMP_LIBRARIES gomp ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}) endif() else() + message(STATUS "OpenMP not found, disabling WITH_OPENMP") set(WITH_OPENMP OFF) endif() @@ -1339,6 +1338,7 @@ list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU) if(WITH_BULLET AND WITH_SYSTEM_BULLET) find_package(Bullet) if(NOT BULLET_FOUND) + message(STATUS "Bullet not found, disabling WITH_BULLET") set(WITH_BULLET OFF) endif() else() |