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

enable c99 if available (for hxt)

parent 1de85893
Branches
Tags
No related merge requests found
Pipeline #
...@@ -45,6 +45,7 @@ opt(CGNS "Enable CGNS mesh export (experimental)" OFF) ...@@ -45,6 +45,7 @@ opt(CGNS "Enable CGNS mesh export (experimental)" OFF)
opt(CAIRO "Enable Cairo to render fonts (experimental)" ${DEFAULT}) opt(CAIRO "Enable Cairo to render fonts (experimental)" ${DEFAULT})
opt(COMPRESSED_IO "Enable compressed (gzip) input/output using zlib" OFF) opt(COMPRESSED_IO "Enable compressed (gzip) input/output using zlib" OFF)
opt(CXX11 "Enable C++11" ${DEFAULT}) opt(CXX11 "Enable C++11" ${DEFAULT})
opt(C99 "Enable C99" ${DEFAULT})
opt(DINTEGRATION "Enable discrete integration (needed for levelsets)" ${DEFAULT}) opt(DINTEGRATION "Enable discrete integration (needed for levelsets)" ${DEFAULT})
opt(FLTK "Enable FLTK graphical user interface (requires mesh/post)" ${DEFAULT}) opt(FLTK "Enable FLTK graphical user interface (requires mesh/post)" ${DEFAULT})
opt(FOURIER_MODEL "Enable Fourier geometrical models (experimental)" OFF) opt(FOURIER_MODEL "Enable Fourier geometrical models (experimental)" OFF)
...@@ -166,6 +167,7 @@ include(CheckTypeSize) ...@@ -166,6 +167,7 @@ include(CheckTypeSize)
include(CheckFunctionExists) include(CheckFunctionExists)
include(CheckIncludeFile) include(CheckIncludeFile)
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
include(CheckCCompilerFlag)
macro(set_config_option VARNAME STRING) macro(set_config_option VARNAME STRING)
set(${VARNAME} TRUE) set(${VARNAME} TRUE)
...@@ -236,6 +238,14 @@ if(ENABLE_CXX11) ...@@ -236,6 +238,14 @@ if(ENABLE_CXX11)
endif(STDCXX11) endif(STDCXX11)
endif(ENABLE_CXX11) 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) macro(append_gmsh_src DIRNAME FILES)
foreach(FILE ${FILES}) foreach(FILE ${FILES})
list(APPEND LIST ${DIRNAME}/${FILE}) list(APPEND LIST ${DIRNAME}/${FILE})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment