From 96364c19f65126954d517d28a77f16bdc679471a Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 26 Apr 2021 16:09:06 +0200 Subject: CMakeLists.txt: Add Clang support. --- CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 81950d5..cf3b2fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,8 +88,18 @@ add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2 ## Actual building ## -set (CC_WARNING_ARGS " -Wall") -set (CXX_WARNING_ARGS " -Wall") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Weverything") + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-c++98-compat -Wno-padded") + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-documentation") + +else() + + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wall") + +endif() + include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories (${CMAKE_CURRENT_BINARY_DIR}/include) @@ -120,4 +130,3 @@ add_subdirectory(po) if (${enable_tests}) add_subdirectory(tests) endif () - -- cgit v1.2.3