Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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)

Expand Down