fixed: make sure not to re-add static analysis tests
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
# - CMP0026 to allow access to the LOCATION target property
|
||||
# - CMP0048 to indicate that we want to deal with the *VERSION*
|
||||
# variables ourselves
|
||||
# - CMP0064 to indicate that we want TEST if conditions to be evaluated
|
||||
if (POLICY CMP0026)
|
||||
cmake_policy(SET CMP0026 OLD)
|
||||
endif()
|
||||
@@ -28,6 +29,10 @@ if (POLICY CMP0048)
|
||||
cmake_policy(SET CMP0048 OLD)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0064)
|
||||
cmake_policy(SET CMP0064 NEW)
|
||||
endif()
|
||||
|
||||
# set the behavior of the policy 0054 to NEW. (i.e. do not implicitly
|
||||
# expand variables in if statements)
|
||||
if (POLICY CMP0054)
|
||||
|
||||
@@ -36,14 +36,18 @@ function(add_static_analysis_tests sources includes)
|
||||
foreach(src ${${sources}})
|
||||
file(RELATIVE_PATH name ${PROJECT_SOURCE_DIR} ${src})
|
||||
if(CPPCHECK_FOUND)
|
||||
add_test(NAME cppcheck+${name}
|
||||
COMMAND bin/cppcheck-test.sh ${CPPCHECK_PROGRAM} ${src} ${IPATHS}
|
||||
CONFIGURATIONS analyze cppcheck)
|
||||
if(NOT TEST cppcheck+${name})
|
||||
add_test(NAME cppcheck+${name}
|
||||
COMMAND bin/cppcheck-test.sh ${CPPCHECK_PROGRAM} ${src} ${IPATHS}
|
||||
CONFIGURATIONS analyze cppcheck)
|
||||
endif()
|
||||
endif()
|
||||
if(CLANGCHECK_FOUND AND CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||
add_test(NAME clang-check+${name}
|
||||
COMMAND bin/clang-check-test.sh ${CLANGCHECK_PROGRAM} ${src}
|
||||
CONFIGURATIONS analyze clang-check)
|
||||
if(NOT TEST clang-check+${name})
|
||||
add_test(NAME clang-check+${name}
|
||||
COMMAND bin/clang-check-test.sh ${CLANGCHECK_PROGRAM} ${src}
|
||||
CONFIGURATIONS analyze clang-check)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user