Skip to content

Commit

Permalink
Do not force the compiler to clang++ if compiler is already clang
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMrARM authored Nov 4, 2023
1 parent e25b68b commit 8097bde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

#BDS is linked to libc++ since 1.20.40
set(CMAKE_CXX_COMPILER "clang++")
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
message(NOTICE "Setting compiler to clang++")
set(CMAKE_CXX_COMPILER "clang++")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")

Expand Down

0 comments on commit 8097bde

Please sign in to comment.