diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt
--- gmsh-3.0.6-source/CMakeLists.txt 2018-03-10 10:28:44.967972069 +0100
+++ gmsh-3.0.6-source-new/CMakeLists.txt 2018-03-10 10:28:45.071972063 +0100
@@ -45,7 +45,7 @@ opt(CGNS "Enable CGNS mesh export (exper
opt(CAIRO "Enable Cairo to render fonts (experimental)" ${DEFAULT})
opt(CHACO "Enable Chaco mesh partitioner (alternative to Metis)" ${DEFAULT})
opt(COMPRESSED_IO "Enable compressed (gzip) input/output using zlib" OFF)
-opt(CXX11 "Enable C++11" ${DEFAULT})
+opt(CXX14 "Enable C++14" ${DEFAULT})
opt(DINTEGRATION "Enable discrete integration (needed for levelsets)" ${DEFAULT})
opt(FLTK "Enable FLTK graphical user interface (requires mesh/post)" ${DEFAULT})
opt(FOURIER_MODEL "Enable Fourier geometrical models (experimental)" OFF)
@@ -269,14 +269,14 @@ if(ENABLE_OPENMP)
endif(OPENMP_FOUND)
endif(ENABLE_OPENMP)
-if(ENABLE_CXX11)
+if(ENABLE_CXX14)
# 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_config_option(HAVE_CXX11 "C++11")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- endif(STDCXX11)
-endif(ENABLE_CXX11)
+ 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)
macro(append_gmsh_src DIRNAME FILES)
foreach(FILE ${FILES})
@@ -1435,10 +1435,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(PROP)
set_source_files_properties(Plugin/CVTRemesh.cpp PROPERTIES
- COMPILE_FLAGS "-std=c++11")
+ COMPILE_FLAGS "-std=c++14")
endif(PROP)
else(EIGEN3_INC AND HAVE_MESH AND HAVE_PLUGINS AND HAVE_ANN AND HAVE_BFGS)
message(WARNING "Revoropt requires Eigen3, Mesh, Plugins, Ann and BFGS")
@@ -1552,7 +1552,7 @@ if(ENABLE_BUILD_ANDROID)
message(FATAL_ERROR "Cannot compile Gmsh for android without android-cmake")
endif(NOT CMAKE_TOOLCHAIN_FILE)
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/)