Skip to content

Commit

Permalink
add Clang++-16 and libc++(experimental) support
Browse files Browse the repository at this point in the history
  • Loading branch information
jg1uaa committed Dec 31, 2024
1 parent 97da59a commit 4262363
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ if(DEFINED MSVC)
add_definitions(-D_USE_MATH_DEFINES)
endif()

if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17))
include(CheckCXXSymbolExists)
if(cxx_std_20 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
set(header version)
else()
set(header ciso646)
endif()

check_cxx_symbol_exists(_LIBCPP_VERSION ${header} LIBCPP)
if(LIBCPP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-library")
endif()
endif()

add_subdirectory(libtermbench)
add_subdirectory(tb)

0 comments on commit 4262363

Please sign in to comment.