diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ba71d0..51f8ec4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,8 +54,9 @@ set(CLANG_WARNINGS if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -v -stdlib=libc++") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") set(PROJECT_WARNINGS ${CLANG_WARNINGS}) + execute_process(COMMAND echo "#include \nint main () {}" | clang-9 -E --std=c++2a -stdlib=libc++ -x c++ -dM - | grep _LIBCPP_VERSION) target_compile_options(test_rgbcx PUBLIC ${PROJECT_WARNINGS}) endif() set(CMAKE_CXX_FLAGS_DEBUG "-g")