Skip to content
Snippets Groups Projects
Commit 5ba10358 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

enable C++11 if available

parent 1157bbf0
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ opt(CGNS "Enable CGNS mesh export (experimental)" OFF)
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 "Compile with -std=c++11" OFF)
opt(CXX11 "Enable C++11" ${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)
......@@ -246,7 +246,11 @@ endif(ENABLE_OPENMP)
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_config_option(HAVE_CXX11 "C++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(STDCXX11)
endif(ENABLE_CXX11)
macro(append_gmsh_src DIRNAME FILES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment