summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VerifyHeaderSets
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-06-05 20:42:12 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-06-06 14:45:22 (GMT)
commit36ec89639ad84e194446795e36b69ab19e57e731 (patch)
tree106e619e527997387b09122fc5d513f6107af4c9 /Tests/RunCMake/VerifyHeaderSets
parent3760ac9845e3c0d163eb1b4d83ab5b2f367507aa (diff)
downloadCMake-36ec89639ad84e194446795e36b69ab19e57e731.zip
CMake-36ec89639ad84e194446795e36b69ab19e57e731.tar.gz
CMake-36ec89639ad84e194446795e36b69ab19e57e731.tar.bz2
VERIFY_INTERFACE_HEADER_SETS: Skip header files that have SKIP_LINTING
Fixes: #24972
Diffstat (limited to 'Tests/RunCMake/VerifyHeaderSets')
-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);