Skip to content

Commit 29ba755

Browse files
committed
refactor: compiler check in CMakeLists.txt
1 parent 47e72e9 commit 29ba755

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ FetchContent_Declare(
1313
)
1414
FetchContent_MakeAvailable(endstone)
1515

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

0 commit comments

Comments
 (0)