added make target `validatePlatforms` to CMake (#4343)
* added missing `platforms/cppcheck-platforms.rng` validation * added make target `validatePlatforms` to CMake
This commit is contained in:
parent
d5a0dfda00
commit
271213cbbd
|
@ -35,6 +35,13 @@ if (LIBXML2_XMLLINT_EXECUTABLE)
|
|||
# this is a symbolic name for a build rule and not an output file
|
||||
set_source_files_properties(validateCFG-cmd PROPERTIES SYMBOLIC "true")
|
||||
|
||||
add_custom_target(validatePlatforms ${LIBXML2_XMLLINT_EXECUTABLE} --noout ${CMAKE_SOURCE_DIR}/platforms/cppcheck-platforms.rng)
|
||||
foreach(platform ${platforms})
|
||||
get_filename_component(platformname ${platform} NAME_WE)
|
||||
add_custom_target(validatePlatforms-${platformname} ${LIBXML2_XMLLINT_EXECUTABLE} --noout --relaxng ${CMAKE_SOURCE_DIR}/platforms/cppcheck-platforms.rng ${platform})
|
||||
add_dependencies(validatePlatforms validatePlatforms-${platformname})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(errorlist-xml $<TARGET_FILE:cppcheck> --errorlist > ${CMAKE_BINARY_DIR}/errorlist.xml
|
||||
DEPENDS cppcheck)
|
||||
|
||||
|
|
1
Makefile
1
Makefile
|
@ -375,6 +375,7 @@ PlatformFilesCHECKED := $(patsubst %.xml,%.checked,$(PlatformFiles))
|
|||
%.checked:%.xml
|
||||
xmllint --noout --relaxng platforms/cppcheck-platforms.rng $<
|
||||
validatePlatforms: ${PlatformFilesCHECKED}
|
||||
xmllint --noout platforms/cppcheck-platforms.rng
|
||||
|
||||
# Validate XML output (to detect regressions)
|
||||
/tmp/errorlist.xml: cppcheck
|
||||
|
|
|
@ -485,7 +485,9 @@ int main(int argc, char **argv)
|
|||
fout << ".PHONY: validatePlatforms\n";
|
||||
fout << "%.checked:%.xml\n";
|
||||
fout << "\txmllint --noout --relaxng platforms/cppcheck-platforms.rng $<\n";
|
||||
fout << "validatePlatforms: ${PlatformFilesCHECKED}\n\n";
|
||||
fout << "validatePlatforms: ${PlatformFilesCHECKED}\n";
|
||||
fout << "\txmllint --noout platforms/cppcheck-platforms.rng\n";
|
||||
fout << "\n";
|
||||
fout << "# Validate XML output (to detect regressions)\n";
|
||||
fout << "/tmp/errorlist.xml: cppcheck\n";
|
||||
fout << "\t./cppcheck --errorlist >$@\n";
|
||||
|
|
Loading…
Reference in New Issue