diff options
author | Christian Manning <cmanning999@gmail.com> | 2014-07-02 20:06:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-03 14:19:18 (GMT) |
commit | eaf6f67f67e12c4e137c8e875ac277072bf910b6 (patch) | |
tree | fb6960ac4b11728ee7d6a90e2b1d4c20f40744a0 /Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake | |
parent | 45a25d63ba738e8b0ce690f8f02469a82815b5f4 (diff) | |
download | CMake-eaf6f67f67e12c4e137c8e875ac277072bf910b6.zip CMake-eaf6f67f67e12c4e137c8e875ac277072bf910b6.tar.gz CMake-eaf6f67f67e12c4e137c8e875ac277072bf910b6.tar.bz2 |
Code Blocks/Eclipse: Add -std= flag matching.
When -std=x is specified in CMAKE_CXX_FLAGS this passes it along.
Diffstat (limited to 'Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake')
-rw-r--r-- | Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake index 0eacbba..064e650 100644 --- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake +++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake @@ -30,11 +30,14 @@ macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines if (CMAKE_CXX_FLAGS MATCHES "(-stdlib=[^ ]+)") set(_stdlib "${CMAKE_MATCH_1}") endif () + if (CMAKE_CXX_FLAGS MATCHES "(-std=[^ ]+)") + set(_stdver "${CMAKE_MATCH_1}") + endif () else () set(_compilerExecutable "${CMAKE_C_COMPILER}") set(_arg1 "${CMAKE_C_COMPILER_ARG1}") endif () - execute_process(COMMAND ${_compilerExecutable} ${_arg1} ${_stdlib} -v -E -x ${_lang} -dD dummy + execute_process(COMMAND ${_compilerExecutable} ${_arg1} ${_stdver} ${_stdlib} -v -E -x ${_lang} -dD dummy WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles ERROR_VARIABLE _gccOutput OUTPUT_VARIABLE _gccStdout ) |