Skip to content

Commit

Permalink
link against libc++ with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
sevas committed Dec 23, 2023
1 parent 0e3852d commit df9bce6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ enable_testing()
set(languages CXX)
set(CMAKE_CXX_STANDARD 20)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CLANG TRUE)
endif()

if(CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()

###############################################################################
## Global Options
###############################################################################
Expand Down

0 comments on commit df9bce6

Please sign in to comment.