diff options
-rw-r--r-- | Modules/Compiler/Intel-CXX-FeatureTests.cmake | 6 | ||||
-rw-r--r-- | Modules/Compiler/Intel-CXX.cmake | 6 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 6 |
4 files changed, 14 insertions, 6 deletions
diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake index e111c07..57a05c8 100644 --- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake +++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake @@ -1,6 +1,7 @@ # References: # - https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler # - https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler +# - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0096r3.html # FIXME: Intel C++ feature detection works only when simulating the GNU compiler. # When simulating MSVC, Intel always sets __cplusplus to 199711L. @@ -8,9 +9,8 @@ if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") return() endif() -# these are not implemented in any version at time of writing -#set(_cmake_feature_test_cxx_variable_templates "${Intel15_CXX14}") -#set(_cmake_feature_test_cxx_relaxed_constexpr "${Intel15_CXX14}") +set(_cmake_feature_test_cxx_variable_templates "__cpp_variable_templates >= 201304") +set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304") set(_cmake_oldestSupported "__INTEL_COMPILER >= 1210") set(DETECT_CXX11 "((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__))") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 73dd7fa..29e02d3 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -34,7 +34,11 @@ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98") + if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=gnu++98") + else() + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98") + endif() set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=${_ext}98") endif() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ea6bdad..195acba 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 7) -set(CMake_VERSION_PATCH 20161026) +set(CMake_VERSION_PATCH 20161027) #set(CMake_VERSION_RC 1) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 7d91740..2ce65cd 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -349,7 +349,11 @@ void cmGlobalVisualStudio10Generator::EnableLanguage( const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const { - return this->GetPlatformToolsetString().c_str(); + std::string const& toolset = this->GetPlatformToolsetString(); + if (toolset.empty()) { + return CM_NULLPTR; + } + return toolset.c_str(); } std::string const& cmGlobalVisualStudio10Generator::GetPlatformToolsetString() |