🔊 detect used C++ standard library

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann 2025-05-23 12:11:16 +02:00
parent 3a09b11ceb
commit 7f528d2245
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -91,8 +91,10 @@ int main() {
try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
"${CMAKE_BINARY_DIR}" "${CMAKE_BINARY_DIR}/check_libcpp_version.cpp"
RUN_OUTPUT_VARIABLE LIBCPP_VERSION_OUTPUT
COMPILE_OUTPUT_VARIABLE LIBCPP_VERSION_COMPILE_OUTPUT
)
set(LIBCPP_VERSION_OUTPUT_CACHED "${LIBCPP_VERSION_OUTPUT}" CACHE STRING "Detected C++ standard library version")
message(STATUS "LIBCPP_VERSION_COMPILE_OUTPUT=${LIBCPP_VERSION_COMPILE_OUTPUT}")
endif()
message(STATUS "C++ standard library: ${LIBCPP_VERSION_OUTPUT_CACHED}")