diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a4037dc1e3e..bc4d4e032af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) endif() endif() -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) # Prever LEGACY OpenGL to eb compatible with all the existing releases and # platforms which don't hare GLVND yet. Only do it if preference was not set @@ -278,7 +278,6 @@ option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd # Alembic support option(WITH_ALEMBIC "Enable Alembic Support" ON) -option(WITH_ALEMBIC_HDF5 "Enable Legacy Alembic Support (not officially supported)" OFF) # Universal Scene Description support option(WITH_USD "Enable Universal Scene Description (USD) Support" ON) @@ -322,14 +321,6 @@ mark_as_advanced(WITH_SYSTEM_GLOG) # Freestyle option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON) -# New object types -option(WITH_NEW_OBJECT_TYPES "Enable new hair and pointcloud objects (use for development only, don't save in files)" OFF) -mark_as_advanced(WITH_NEW_OBJECT_TYPES) - -# New simulation data block -option(WITH_NEW_SIMULATION_TYPE "Enable simulation data block (use for development only, don't save in files)" OFF) -mark_as_advanced(WITH_NEW_SIMULATION_TYPE) - # Misc if(WIN32) option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON) @@ -371,12 +362,12 @@ option(WITH_CYCLES "Enable Cycles Render Engine" ON) option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF) option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" OFF) option(WITH_CYCLES_OSL "Build Cycles with OSL support" ON) -option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" OFF) +option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" ON) option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF) option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF) option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF) mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL) -set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 CACHE STRING "CUDA architectures to build binaries for") +set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 compute_75 CACHE STRING "CUDA architectures to build binaries for") mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH) unset(PLATFORM_DEFAULT) option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON) @@ -424,6 +415,11 @@ mark_as_advanced(WITH_CXX_GUARDEDALLOC) option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON) mark_as_advanced(WITH_ASSERT_ABORT) +if(UNIX AND NOT APPLE) + option(WITH_CLANG_TIDY "Use Clang Tidy to analyze the source code (only enable for development on Linux using Clang)" OFF) + mark_as_advanced(WITH_CLANG_TIDY) +endif() + option(WITH_BOOST "Enable features depending on boost" ON) option(WITH_TBB "Enable features depending on TBB (OpenVDB, OpenImageDenoise, sculpt multithreading)" ON) @@ -655,6 +651,7 @@ if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR set(WITH_BOOST OFF) endif() +set_and_warn_dependency(WITH_TBB WITH_CYCLES OFF) set_and_warn_dependency(WITH_TBB WITH_USD OFF) set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF) set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF) @@ -903,7 +900,7 @@ if(MSVC) # endianess-detection and auto-setting is counterproductive # so we just set endianness according CMAKE_OSX_ARCHITECTURES -elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64) +elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR CMAKE_OSX_ARCHITECTURES MATCHES arm64) add_definitions(-D__LITTLE_ENDIAN__) elseif(CMAKE_OSX_ARCHITECTURES MATCHES ppc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc64) add_definitions(-D__BIG_ENDIAN__) @@ -1246,7 +1243,7 @@ endif() if(WITH_LIBMV) # We always have C++11 which includes unordered_map. - set(CERES_DEFINES -DCERES_STD_UNORDERED_MAP) + set(CERES_DEFINES "-DCERES_STD_UNORDERED_MAP;-DCERES_USE_CXX_THREADS") endif() #----------------------------------------------------------------------------- @@ -1562,20 +1559,15 @@ if(WITH_PYTHON) endif() if(MSVC) - # MSVC needs to be tested first, since clang on windows will - # match the compiler test below but clang-cl does not accept -std=c++11 - # since it is on by default and cannot be turned off. - # - # Nothing special is needed, C++11 features are available by default. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") elseif( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Intel" ) - # TODO(sergey): Do we want c++11 or gnu-c++11 here? - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") else() - message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++11 build") + message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++17 build") endif() # Visual Studio has all standards it supports available by default @@ -1636,10 +1628,6 @@ endif() #----------------------------------------------------------------------------- # Libraries -if(WITH_GTESTS) - include(GTestTesting) -endif() - if(WITH_BLENDER) add_subdirectory(intern) add_subdirectory(extern) |