diff --git a/formatters/astyle/lib/CMakeLists.txt b/formatters/astyle/lib/CMakeLists.txt index 7af6d0c781..16989b1bbf 100644 --- a/formatters/astyle/lib/CMakeLists.txt +++ b/formatters/astyle/lib/CMakeLists.txt @@ -1,12 +1,13 @@ -# astyle lib throws lots of warnings with -Wdocumentation -string(REPLACE "-Wdocumentation" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(astylelib_SRCS ASBeautifier.cpp ASEnhancer.cpp ASFormatter.cpp ASResource.cpp ASLocalizer.cpp ) add_library(astylelib STATIC ${astylelib_SRCS}) set_property(TARGET astylelib PROPERTY POSITION_INDEPENDENT_CODE ON) +if (CMAKE_COMPILER_CXX_ID MATCHES "Clang") + # astyle lib throws lots of warnings with -Wdocumentation + target_compile_options(astylelib PRIVATE -Wno-documentation) +endif()