summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/Clang-C.cmake8
-rw-r--r--Modules/Compiler/Clang-CXX.cmake8
-rw-r--r--Modules/Compiler/GNU-C.cmake8
-rw-r--r--Modules/Compiler/GNU-CXX.cmake8
4 files changed, 16 insertions, 16 deletions
diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake
index 05d3c0b..92119ba 100644
--- a/Modules/Compiler/Clang-C.cmake
+++ b/Modules/Compiler/Clang-C.cmake
@@ -21,16 +21,16 @@ set(CMAKE_C_STANDARD_DEFAULT 90)
macro(cmake_record_c_compile_features)
macro(_get_clang_features std_version list)
- record_compiler_features(C "-std=${std_version}" ${list})
+ record_compiler_features(C "${std_version}" ${list})
endmacro()
if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
- _get_clang_features(c11 CMAKE_C11_COMPILE_FEATURES)
+ _get_clang_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES)
if (_result EQUAL 0)
- _get_clang_features(c99 CMAKE_C99_COMPILE_FEATURES)
+ _get_clang_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES)
endif()
if (_result EQUAL 0)
- _get_clang_features(c90 CMAKE_C90_COMPILE_FEATURES)
+ _get_clang_features(${CMAKE_C90_STANDARD_COMPILE_OPTION} CMAKE_C90_COMPILE_FEATURES)
endif()
else()
set(_result 0)
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index 5dd7b4a..780a072 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -35,16 +35,16 @@ set(CMAKE_CXX_STANDARD_DEFAULT 98)
macro(cmake_record_cxx_compile_features)
macro(_get_clang_features std_version list)
- record_compiler_features(CXX "-std=${std_version}" ${list})
+ record_compiler_features(CXX "${std_version}" ${list})
endmacro()
if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
- _get_clang_features(c++1y CMAKE_CXX14_COMPILE_FEATURES)
+ _get_clang_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES)
if (_result EQUAL 0)
- _get_clang_features(c++11 CMAKE_CXX11_COMPILE_FEATURES)
+ _get_clang_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES)
endif()
if (_result EQUAL 0)
- _get_clang_features(c++98 CMAKE_CXX98_COMPILE_FEATURES)
+ _get_clang_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES)
endif()
else()
set(_result 0)
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index d678b68..c4a2ed6 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -17,16 +17,16 @@ set(CMAKE_C_STANDARD_DEFAULT 90)
macro(cmake_record_c_compile_features)
macro(_get_gcc_features std_version list)
- record_compiler_features(C "-std=${std_version}" ${list})
+ record_compiler_features(C "${std_version}" ${list})
endmacro()
if (UNIX AND NOT APPLE AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
- _get_gcc_features(c11 CMAKE_C11_COMPILE_FEATURES)
+ _get_gcc_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES)
if (_result EQUAL 0)
- _get_gcc_features(c99 CMAKE_C99_COMPILE_FEATURES)
+ _get_gcc_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES)
endif()
if (_result EQUAL 0)
- _get_gcc_features(c90 CMAKE_C90_COMPILE_FEATURES)
+ _get_gcc_features(${CMAKE_C90_STANDARD_COMPILE_OPTION} CMAKE_C90_COMPILE_FEATURES)
endif()
else()
set(_result 0)
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 14dc76a..1050679 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -33,19 +33,19 @@ set(CMAKE_CXX_STANDARD_DEFAULT 98)
macro(cmake_record_cxx_compile_features)
macro(_get_gcc_features std_version list)
- record_compiler_features(CXX "-std=${std_version}" ${list})
+ record_compiler_features(CXX "${std_version}" ${list})
endmacro()
set(_result 0)
if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
- _get_gcc_features(c++1y CMAKE_CXX14_COMPILE_FEATURES)
+ _get_gcc_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES)
endif()
if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
if (_result EQUAL 0)
- _get_gcc_features(c++11 CMAKE_CXX11_COMPILE_FEATURES)
+ _get_gcc_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES)
endif()
if (_result EQUAL 0)
- _get_gcc_features(c++98 CMAKE_CXX98_COMPILE_FEATURES)
+ _get_gcc_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES)
endif()
else()
set(_result 0)