mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
build: IWYU enabled on GCC
This commit is contained in:
@ -38,10 +38,6 @@ ensure_entry_point()
|
|||||||
include(ccache)
|
include(ccache)
|
||||||
enable_ccache(BASE_DIR ${PROJECT_SOURCE_DIR})
|
enable_ccache(BASE_DIR ${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
# set restrictive compilation warnings
|
|
||||||
include(warnings)
|
|
||||||
set_warnings()
|
|
||||||
|
|
||||||
# enable include-what-you-use
|
# enable include-what-you-use
|
||||||
option(${projectPrefix}DEV_IWYU "Enables include-what-you-use" OFF)
|
option(${projectPrefix}DEV_IWYU "Enables include-what-you-use" OFF)
|
||||||
|
|
||||||
@ -53,6 +49,11 @@ if(${projectPrefix}DEV_IWYU)
|
|||||||
MAX_LINE_LENGTH 120
|
MAX_LINE_LENGTH 120
|
||||||
NO_COMMENTS
|
NO_COMMENTS
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
# set restrictive compilation warnings
|
||||||
|
# (some gcc warnings are not recognized by IWYU which is based on clang)
|
||||||
|
include(warnings)
|
||||||
|
set_warnings()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# enable_clang_tidy()
|
# enable_clang_tidy()
|
||||||
|
@ -22,12 +22,6 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.7)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
|
|
||||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
||||||
# run IWYU only for clang compiler
|
|
||||||
# other compilers will generate i.e. unknown compilation flags warnings
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(IWYU_VERBOSITY_LEVEL 3 CACHE STRING "IWYU verbosity level (the higher the level, the more output)")
|
set(IWYU_VERBOSITY_LEVEL 3 CACHE STRING "IWYU verbosity level (the higher the level, the more output)")
|
||||||
|
|
||||||
macro(_iwyu_args_append arg)
|
macro(_iwyu_args_append arg)
|
||||||
|
Reference in New Issue
Block a user