diff --git a/conan_provider.cmake b/conan_provider.cmake index 0d2be00..bea7705 100644 --- a/conan_provider.cmake +++ b/conan_provider.cmake @@ -128,10 +128,14 @@ function(detect_arch arch) endfunction() -function(detect_cxx_standard cxx_standard) +function(detect_cxx_standard compiler cxx_standard) set(${cxx_standard} ${CMAKE_CXX_STANDARD} PARENT_SCOPE) if(CMAKE_CXX_EXTENSIONS) - set(${cxx_standard} "gnu${CMAKE_CXX_STANDARD}" PARENT_SCOPE) + if(compiler STREQUAL "msvc") + set(${cxx_standard} "${CMAKE_CXX_STANDARD}" PARENT_SCOPE) + else() + set(${cxx_standard} "gnu${CMAKE_CXX_STANDARD}" PARENT_SCOPE) + endif() endif() endfunction() @@ -363,7 +367,7 @@ function(detect_host_profile output_file) detect_os(os os_api_level os_sdk os_subsystem os_version) detect_arch(arch) detect_compiler(compiler compiler_version compiler_runtime compiler_runtime_type) - detect_cxx_standard(compiler_cppstd) + detect_cxx_standard(${compiler} compiler_cppstd) detect_lib_cxx(compiler_libcxx) detect_build_type(build_type)