Skip to content

Commit

Permalink
refactor: compiler check in CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Apr 30, 2024
1 parent 47e72e9 commit 29ba755
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(endstone)

if (MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_definitions(_ITERATOR_DEBUG_LEVEL=0)
else ()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fPIC")
link_libraries(-static-libgcc -static-libstdc++ libc++.a libc++abi.a)
endif ()
Expand Down

0 comments on commit 29ba755

Please sign in to comment.