Commit f61b6e58 by Christophe Geuzaine

enable c99 if available (for hxt)

parent 1de85893
Pipeline #1384 passed with stage
in 15 minutes 32 seconds
......@@ -45,6 +45,7 @@ opt(CGNS "Enable CGNS mesh export (experimental)" OFF)
opt(CAIRO "Enable Cairo to render fonts (experimental)" ${DEFAULT})
opt(COMPRESSED_IO "Enable compressed (gzip) input/output using zlib" OFF)
opt(CXX11 "Enable C++11" ${DEFAULT})
opt(C99 "Enable C99" ${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)
......@@ -166,6 +167,7 @@ include(CheckTypeSize)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckCXXCompilerFlag)
include(CheckCCompilerFlag)
macro(set_config_option VARNAME STRING)
set(${VARNAME} TRUE)
......@@ -236,6 +238,14 @@ if(ENABLE_CXX11)
endif(STDCXX11)
endif(ENABLE_CXX11)
if(ENABLE_C99)
# in recent cmake versions we could do e.g. set(CMAKE_C_STANDARD 99)
check_c_compiler_flag("-std=c99" STDC99)
if(STDC99)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
endif(STDC99)
endif(ENABLE_C99)
macro(append_gmsh_src DIRNAME FILES)
foreach(FILE ${FILES})
list(APPEND LIST ${DIRNAME}/${FILE})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment