diff --git a/CMakeLists.txt b/CMakeLists.txt index 5495c0a..de6eed3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ()