diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/Clang-CXX.cmake | 7 | ||||
-rw-r--r-- | Modules/FindMPI.cmake | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 17f3917..61709f8 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -58,6 +58,13 @@ if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU") unset(_clang_version_std17) if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + # The MSVC standard library requires C++14, and MSVC itself has no + # notion of operating in a mode not aware of at least that standard. + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++14") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++14") + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++14") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++14") + # This clang++ is missing some features because of MSVC compatibility. unset(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT) unset(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT) diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 2ff6afe..a79758f 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1147,9 +1147,7 @@ macro(_MPI_create_imported_target LANG) set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}") if(MPI_${LANG}_LINK_FLAGS) - separate_arguments(_MPI_${LANG}_LINK_FLAGS NATIVE_COMMAND "${MPI_${LANG}_LINK_FLAGS}") - set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_OPTIONS "${_MPI_${LANG}_LINK_FLAGS}") - unset(_MPI_${LANG}_LINK_FLAGS) + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_OPTIONS "SHELL:${MPI_${LANG}_LINK_FLAGS}") endif() # If the compiler links MPI implicitly, no libraries will be found as they're contained within # CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES already. |