Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-06-18 11:45:40 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-06-19 13:02:21 +0300
commit171c4fb238a2a65291540ac5406187bc69f3a6bc (patch)
treea45d6b3ae29797a5ad7df766aa0ffe840cae1a92 /CMakeLists.txt
parent9e7012995249281b041d55607e7e7408857aa8c4 (diff)
Update C++ standard to C++14
This is an intermittent state to get all dependencies to compile. For example, the latest Ceres is needed to bring C++17 support, but it has bumped minimal requirement to C++14.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 3 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b80db402ef..2c465d37e8e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1561,20 +1561,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++14")
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++14")
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++14 build")
endif()
# Visual Studio has all standards it supports available by default