Skip to content

Commit

Permalink
Merge pull request #1203 from chuckatkins/adaptive-compile-features
Browse files Browse the repository at this point in the history
Always use language specific features for gcc, intel, and clang
  • Loading branch information
Chuck Atkins authored Feb 18, 2019
2 parents e7f8b4f + 00cf22c commit ec6ec60
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,17 @@ endif()

# Use meta-compile features if available, otherwise use specific language
# features
if(NOT (CMAKE_VERSION VERSION_LESS 3.9))
set(ADIOS2_CXX11_FEATURES cxx_std_11)
set(ADIOS2_C99_FEATURES c_std_99)
else()
if(CMAKE_VERSION VERSION_LESS 3.9 OR
CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Intel|Clang|AppleClang|MSVC)$")
set(ADIOS2_CXX11_FEATURES cxx_auto_type cxx_nullptr)
else()
set(ADIOS2_CXX11_FEATURES cxx_std_11)
endif()
if(CMAKE_VERSION VERSION_LESS 3.9 OR
CMAKE_C_COMPILER_ID MATCHES "^(GNU|Intel|Clang|AppleClang|MSVC)$")
set(ADIOS2_C99_FEATURES c_restrict)
else()
set(ADIOS2_C99_FEATURES c_std_99)
endif()

include(CMakeDependentOption)
Expand Down

0 comments on commit ec6ec60

Please sign in to comment.