summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-06-06 14:51:19 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-06-06 14:51:27 (GMT)
commitaf69d59b097baf9e5293e7f84a1cac91278e7220 (patch)
tree69407d91a8a54ba06d3b8c045677721a852f1718 /Tests
parentec472999dcbfdf11457442268e2e300d4251bac9 (diff)
parent36ec89639ad84e194446795e36b69ab19e57e731 (diff)
downloadCMake-af69d59b097baf9e5293e7f84a1cac91278e7220.zip
CMake-af69d59b097baf9e5293e7f84a1cac91278e7220.tar.gz
CMake-af69d59b097baf9e5293e7f84a1cac91278e7220.tar.bz2
Merge topic 'verify-interface-header-sets-skip-linting'
36ec89639a VERIFY_INTERFACE_HEADER_SETS: Skip header files that have SKIP_LINTING Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8540
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake5
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/skip_linting.h3
3 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake b/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake
index b4fe720..982087f 100644
--- a/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake
@@ -42,6 +42,7 @@ run_cmake_build(VerifyHeaderSets lang_test_c_verify_interface_header_sets)
run_cmake_build(VerifyHeaderSets lang_test_cxx_verify_interface_header_sets)
run_cmake_build(VerifyHeaderSets interface_lang_test_cxx_verify_interface_header_sets)
run_cmake_build(VerifyHeaderSets list_verify_interface_header_sets)
+run_cmake_build(VerifyHeaderSets skip_linting_verify_interface_header_sets)
set(RunCMake_TEST_OPTIONS -DCMAKE_VERIFY_INTERFACE_HEADER_SETS=ON)
run_cmake(AllVerifyInterfaceHeaderSets)
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake
index f260609..7de9f1e 100644
--- a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake
@@ -74,3 +74,8 @@ target_sources(list INTERFACE
FILE_SET error TYPE HEADERS FILES error.h
)
set_property(TARGET list PROPERTY INTERFACE_HEADER_SETS_TO_VERIFY "a;c")
+
+add_library(skip_linting STATIC lib.c)
+target_sources(skip_linting INTERFACE FILE_SET HEADERS FILES lang_test.h skip_linting.h)
+set_property(SOURCE skip_linting.h PROPERTY LANGUAGE C)
+set_property(SOURCE skip_linting.h PROPERTY SKIP_LINTING TRUE)
diff --git a/Tests/RunCMake/VerifyHeaderSets/skip_linting.h b/Tests/RunCMake/VerifyHeaderSets/skip_linting.h
new file mode 100644
index 0000000..908ca95
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/skip_linting.h
@@ -0,0 +1,3 @@
+#error "This file should not be included"
+
+extern void skip_linting_h(void);