mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 10:27:16 +02:00
fix: Switched to check_cxx_symbol_exists()
for libcxx detection
This commit is contained in:
@ -27,8 +27,8 @@ function(check_libcxx_in_use variable)
|
|||||||
message(CHECK_START "Checking if libc++ is being used")
|
message(CHECK_START "Checking if libc++ is being used")
|
||||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||||
|
|
||||||
include(CheckSymbolExists)
|
include(CheckCXXSymbolExists)
|
||||||
check_symbol_exists(_LIBCPP_VERSION "ciso646" ${variable})
|
check_cxx_symbol_exists(_LIBCPP_VERSION "ciso646" ${variable})
|
||||||
set(${variable} ${${variable}} PARENT_SCOPE)
|
set(${variable} ${${variable}} PARENT_SCOPE)
|
||||||
|
|
||||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||||
|
@ -25,12 +25,12 @@ function(__check_libcxx_in_use variable)
|
|||||||
message(CHECK_START "Checking if libc++ is being used")
|
message(CHECK_START "Checking if libc++ is being used")
|
||||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||||
|
|
||||||
include(CheckSymbolExists)
|
include(CheckCXXSymbolExists)
|
||||||
check_symbol_exists(_LIBCPP_VERSION "ciso646" ${variable})
|
check_cxx_symbol_exists(_LIBCPP_VERSION "ciso646" ${variable})
|
||||||
set(${variable} ${${variable}} PARENT_SCOPE)
|
set(${variable} ${${variable}} PARENT_SCOPE)
|
||||||
|
|
||||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||||
if(UNITS_LIBCXX)
|
if(${variable})
|
||||||
message(CHECK_PASS "found")
|
message(CHECK_PASS "found")
|
||||||
else()
|
else()
|
||||||
message(CHECK_FAIL "not found")
|
message(CHECK_FAIL "not found")
|
||||||
|
Reference in New Issue
Block a user