diff -rupN --no-dereference gmsh-4.6.0-source/CMakeLists.txt gmsh-4.6.0-source-new/CMakeLists.txt
--- gmsh-4.6.0-source/CMakeLists.txt 2020-06-23 09:36:32.599204009 +0200
+++ gmsh-4.6.0-source-new/CMakeLists.txt 2020-06-23 09:36:32.602203993 +0200
@@ -43,7 +43,7 @@ opt(BUILD_IOS "Enable iOS library target
opt(CGNS "Enable CGNS import/export (experimental)" ${DEFAULT})
opt(CGNS_CPEX0045 "Enable high-order CGNS import/export following CPEX0045 (experimental)" OFF)
opt(CAIRO "Enable Cairo to render fonts (experimental)" ${DEFAULT})
-opt(CXX11 "Enable C++11" ON)
+opt(CXX14 "Enable C++14" ON)
opt(C99 "Enable C99" ON)
opt(PROFILE "Enable profiling compiler flags" OFF)
opt(DINTEGRATION "Enable discrete integration (needed for levelsets)" ${DEFAULT})
@@ -337,13 +337,13 @@ if(ENABLE_OPENACC)
endif()
endif()
-if(ENABLE_CXX11)
- # in recent cmake versions we could do e.g. set(CMAKE_CXX_STANDARD 11)
- check_cxx_compiler_flag("-std=c++11" STDCXX11)
- if(STDCXX11)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- endif()
-endif()
+if(ENABLE_CXX14)
+ check_cxx_compiler_flag("-std=c++14" STDCXX14)
+ if(STDCXX14)
+ set_config_option(HAVE_CXX14 "C++14")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+ endif(STDCXX14)
+endif(ENABLE_CXX14)
if(ENABLE_C99)
# in recent cmake versions we could do e.g. set(CMAKE_C_STANDARD 99)
@@ -1524,10 +1524,10 @@ if(ENABLE_REVOROPT)
get_source_file_property(PROP Plugin/CVTRemesh.cpp COMPILE_FLAGS)
if(PROP)
set_source_files_properties(Plugin/CVTRemesh.cpp PROPERTIES
- COMPILE_FLAGS "${PROP} -std=c++11")
+ COMPILE_FLAGS "${PROP} -std=c++14")
else()
set_source_files_properties(Plugin/CVTRemesh.cpp PROPERTIES
- COMPILE_FLAGS "-std=c++11")
+ COMPILE_FLAGS "-std=c++14")
endif()
else()
message(WARNING "Revoropt requires Eigen3, Mesh, Plugins, ANN and ALGLIB")
@@ -1719,7 +1719,7 @@ if(ENABLE_BUILD_ANDROID)
message(FATAL_ERROR "Cannot compile Gmsh for android without android-cmake")
endif()
add_definitions(-D_GLIBCXX_USE_C99_MATH=1)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
set(CMAKE_BUILD_TYPE Release)
set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_CURRENT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/libs/)