From f07108db4845df3e0bf7a2844c612b54c800eba8 Mon Sep 17 00:00:00 2001 From: Wojciech Jarosz Date: Fri, 29 Dec 2023 02:27:21 +1300 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cd9ee8..c2b8bf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,8 @@ project( LANGUAGES C CXX ) +message(STATUS "C++ compiler is: ${CMAKE_CXX_COMPILER_ID}") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(VERSION_LONG "${GIT_DESCRIBE} (64 bit)") elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) @@ -44,8 +46,6 @@ include(sanitizers) # versions. set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT SamplinSafari) -include(CheckCXXCompilerFlag) - # ============================================================================ # Set a default build configuration (Release) # ============================================================================ @@ -69,6 +69,7 @@ endif() if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") # Prefer libc++ in conjunction with Clang if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + include(CheckCXXCompilerFlag) check_cxx_compiler_flag("-stdlib=libc++" HAS_LIBCPP) if(HAS_LIBCPP) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -D_LIBCPP_VERSION")