summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-30 13:10:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-03-30 13:10:25 (GMT)
commita7b325e203a45f3c8d4a64fd3338079e0a14e250 (patch)
tree9d971930a86c4b98cca7883137599df19f6ebf58 /Tests
parent1e2338458053082f254170f5fa579cf4c54d69d3 (diff)
parentc798744f8193e97f00f1b6e47dc5bc6fdc34b222 (diff)
downloadCMake-a7b325e203a45f3c8d4a64fd3338079e0a14e250.zip
CMake-a7b325e203a45f3c8d4a64fd3338079e0a14e250.tar.gz
CMake-a7b325e203a45f3c8d4a64fd3338079e0a14e250.tar.bz2
Merge topic 'verify-header-sets'
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7085
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake42
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-stdout.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-check.cmake33
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-stdout.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-stdout.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-stdout.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-stdout.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-exe_verify_header_sets-Debug-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-exe_verify_header_sets-Debug-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-none_verify_header_sets-Debug-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-none_verify_header_sets-Debug-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-private_verify_header_sets-Debug-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-private_verify_header_sets-Debug-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-property_off_verify_header_sets-Debug-build-result.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-property_off_verify_header_sets-Debug-build-stderr.txt1
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake60
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/a.h5
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/debug.h3
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/dir/c.h8
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/dir/cxx.h8
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/lang_test.h8
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/lib.c6
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/lib.cxx6
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/main.c11
-rw-r--r--Tests/RunCMake/VerifyHeaderSets/release.h3
37 files changed, 221 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index e695844..dbff293 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -978,6 +978,8 @@ add_RunCMake_test(CMakePresetsTest
-DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA}
)
+add_RunCMake_test(VerifyHeaderSets)
+
if(${CMAKE_GENERATOR} MATCHES "Make|Ninja")
add_RunCMake_test(TransformDepfile)
endif()
diff --git a/Tests/RunCMake/VerifyHeaderSets/CMakeLists.txt b/Tests/RunCMake/VerifyHeaderSets/CMakeLists.txt
new file mode 100644
index 0000000..5ff8d3e
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.23)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake b/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake
new file mode 100644
index 0000000..06d48bf
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/RunCMakeTest.cmake
@@ -0,0 +1,42 @@
+include(RunCMake)
+
+function(run_cmake_build name target)
+ if(NOT BUILD_CONFIG)
+ set(BUILD_CONFIG Debug)
+ endif()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(${name}-${target}-${BUILD_CONFIG}-build ${CMAKE_COMMAND} --build . --config ${BUILD_CONFIG} --target ${target})
+endfunction()
+
+set(RunCMake_TEST_OPTIONS -DCMAKE_VERIFY_HEADER_SETS=ON)
+if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+endif()
+run_cmake(VerifyHeaderSets)
+unset(RunCMake_TEST_OPTIONS)
+
+run_cmake_build(VerifyHeaderSets static_verify_header_sets)
+run_cmake_build(VerifyHeaderSets shared_verify_header_sets)
+run_cmake_build(VerifyHeaderSets object_verify_header_sets)
+run_cmake_build(VerifyHeaderSets interface_verify_header_sets)
+run_cmake_build(VerifyHeaderSets exe_verify_header_sets)
+run_cmake_build(VerifyHeaderSets export_exe_verify_header_sets)
+run_cmake_build(VerifyHeaderSets none_verify_header_sets)
+run_cmake_build(VerifyHeaderSets property_off_verify_header_sets)
+run_cmake_build(VerifyHeaderSets private_verify_header_sets)
+run_cmake_build(VerifyHeaderSets a_h_verify_header_sets)
+run_cmake_build(VerifyHeaderSets dir_c_h_verify_header_sets)
+run_cmake_build(VerifyHeaderSets dir_cxx_h_verify_header_sets)
+
+if(NOT RunCMake_GENERATOR STREQUAL "Xcode")
+ run_cmake_build(VerifyHeaderSets config_verify_header_sets)
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(BUILD_CONFIG Release)
+ run_cmake_build(VerifyHeaderSets config_verify_header_sets)
+ unset(BUILD_CONFIG)
+ endif()
+endif()
+
+run_cmake_build(VerifyHeaderSets lang_test_c_verify_header_sets)
+run_cmake_build(VerifyHeaderSets lang_test_cxx_verify_header_sets)
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-stderr.txt
new file mode 100644
index 0000000..b78bc52
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-stderr.txt
@@ -0,0 +1 @@
+(TEST_A_H defined)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-stdout.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-stdout.txt
new file mode 100644
index 0000000..b78bc52
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-a_h_verify_header_sets-Debug-build-stdout.txt
@@ -0,0 +1 @@
+(TEST_A_H defined)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-check.cmake b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-check.cmake
new file mode 100644
index 0000000..44e028f
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-check.cmake
@@ -0,0 +1,33 @@
+function(check_file target filename)
+ set(full_filename "${RunCMake_TEST_BINARY_DIR}/${target}_verify_header_sets/${filename}")
+ if(NOT EXISTS "${full_filename}")
+ string(APPEND RunCMake_TEST_FAILED "File ${full_filename} should exist but does not\n")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+ return()
+ endif()
+
+ if(filename MATCHES "^(.*)(\\.[a-z]+)$")
+ set(header_filename "${CMAKE_MATCH_1}")
+ endif()
+ set(expected_contents "#include <${header_filename}>\n")
+ file(READ "${full_filename}" actual_contents)
+
+ if(NOT actual_contents STREQUAL expected_contents)
+ string(REPLACE "\n" "\n " expected_contents_formatted "${expected_contents}")
+ string(REPLACE "\n" "\n " actual_contents_formatted "${actual_contents}")
+ string(APPEND RunCMake_TEST_FAILED "Expected contents of ${full_filename}:\n ${expected_contents_formatted}\nActual contents:\n ${actual_contents_formatted}\n")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+ return()
+ endif()
+endfunction()
+
+check_file(static a.h.c)
+check_file(static dir/c.h.c)
+check_file(static dir/cxx.h.cxx)
+
+if(NOT RunCMake_GENERATOR STREQUAL "Xcode")
+ check_file(config debug.h.c)
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ check_file(config release.h.c)
+ endif()
+endif()
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-stderr.txt
new file mode 100644
index 0000000..eaa9a03
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-stderr.txt
@@ -0,0 +1 @@
+(Compiled in debug mode)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-stdout.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-stdout.txt
new file mode 100644
index 0000000..eaa9a03
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Debug-build-stdout.txt
@@ -0,0 +1 @@
+(Compiled in debug mode)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-stderr.txt
new file mode 100644
index 0000000..25699f9
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-stderr.txt
@@ -0,0 +1 @@
+(Compiled in release mode)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-stdout.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-stdout.txt
new file mode 100644
index 0000000..25699f9
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-config_verify_header_sets-Release-build-stdout.txt
@@ -0,0 +1 @@
+(Compiled in release mode)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-stderr.txt
new file mode 100644
index 0000000..27ef042
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-stderr.txt
@@ -0,0 +1 @@
+(TEST_DIR_C_H defined)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-stdout.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-stdout.txt
new file mode 100644
index 0000000..27ef042
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_c_h_verify_header_sets-Debug-build-stdout.txt
@@ -0,0 +1 @@
+(TEST_DIR_C_H defined)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-stderr.txt
new file mode 100644
index 0000000..cd17d11
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-stderr.txt
@@ -0,0 +1 @@
+(TEST_DIR_CXX_H defined)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-stdout.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-stdout.txt
new file mode 100644
index 0000000..cd17d11
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-dir_cxx_h_verify_header_sets-Debug-build-stdout.txt
@@ -0,0 +1 @@
+(TEST_DIR_CXX_H defined)?
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-exe_verify_header_sets-Debug-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-exe_verify_header_sets-Debug-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-exe_verify_header_sets-Debug-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-exe_verify_header_sets-Debug-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-exe_verify_header_sets-Debug-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-exe_verify_header_sets-Debug-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-none_verify_header_sets-Debug-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-none_verify_header_sets-Debug-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-none_verify_header_sets-Debug-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-none_verify_header_sets-Debug-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-none_verify_header_sets-Debug-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-none_verify_header_sets-Debug-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-private_verify_header_sets-Debug-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-private_verify_header_sets-Debug-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-private_verify_header_sets-Debug-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-private_verify_header_sets-Debug-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-private_verify_header_sets-Debug-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-private_verify_header_sets-Debug-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-property_off_verify_header_sets-Debug-build-result.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-property_off_verify_header_sets-Debug-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-property_off_verify_header_sets-Debug-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-property_off_verify_header_sets-Debug-build-stderr.txt b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-property_off_verify_header_sets-Debug-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets-property_off_verify_header_sets-Debug-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake
new file mode 100644
index 0000000..f515031
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSets.cmake
@@ -0,0 +1,60 @@
+enable_language(C CXX)
+
+set_property(SOURCE a.h PROPERTY LANGUAGE C)
+set_property(SOURCE dir/c.h PROPERTY LANGUAGE C)
+set_property(SOURCE dir/cxx.h PROPERTY LANGUAGE CXX)
+
+add_library(static STATIC lib.c)
+target_sources(static INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_library(shared SHARED lib.c)
+target_sources(shared INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_library(object OBJECT lib.c)
+target_sources(object INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_library(interface INTERFACE)
+target_sources(interface INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_executable(exe main.c)
+target_sources(exe INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_executable(export_exe main.c)
+set_property(TARGET export_exe PROPERTY ENABLE_EXPORTS TRUE)
+target_sources(export_exe INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_library(none STATIC lib.c)
+
+add_library(property_off STATIC lib.c)
+target_sources(property_off INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+set_property(TARGET property_off PROPERTY VERIFY_HEADER_SETS OFF)
+
+add_library(private STATIC lib.c)
+target_sources(private PRIVATE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_library(a_h STATIC lib.c)
+target_compile_definitions(a_h INTERFACE TEST_A_H)
+target_sources(a_h INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_library(dir_c_h STATIC lib.c)
+target_compile_definitions(dir_c_h INTERFACE TEST_DIR_C_H)
+target_sources(dir_c_h INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+add_library(dir_cxx_h STATIC lib.c)
+target_compile_definitions(dir_cxx_h INTERFACE TEST_DIR_CXX_H)
+target_sources(dir_cxx_h INTERFACE FILE_SET HEADERS FILES a.h dir/c.h dir/cxx.h)
+
+set_property(SOURCE debug.h PROPERTY LANGUAGE C)
+set_property(SOURCE release.h PROPERTY LANGUAGE C)
+
+if(NOT CMAKE_GENERATOR STREQUAL "Xcode")
+ add_library(config STATIC lib.c)
+ target_sources(config INTERFACE FILE_SET HEADERS FILES $<IF:$<CONFIG:Debug>,debug.h,release.h>)
+endif()
+
+add_library(lang_test_c STATIC lib.c)
+target_sources(lang_test_c INTERFACE FILE_SET HEADERS FILES lang_test.h)
+
+add_library(lang_test_cxx STATIC lib.c lib.cxx)
+target_compile_definitions(lang_test_cxx INTERFACE EXPECT_CXX)
+target_sources(lang_test_cxx INTERFACE FILE_SET HEADERS FILES lang_test.h)
diff --git a/Tests/RunCMake/VerifyHeaderSets/a.h b/Tests/RunCMake/VerifyHeaderSets/a.h
new file mode 100644
index 0000000..8b17182
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/a.h
@@ -0,0 +1,5 @@
+#ifdef TEST_A_H
+# error "TEST_A_H defined"
+#endif
+
+extern void a_h(void);
diff --git a/Tests/RunCMake/VerifyHeaderSets/debug.h b/Tests/RunCMake/VerifyHeaderSets/debug.h
new file mode 100644
index 0000000..4d4baa1
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/debug.h
@@ -0,0 +1,3 @@
+#error "Compiled in debug mode"
+
+extern void debug_h(void);
diff --git a/Tests/RunCMake/VerifyHeaderSets/dir/c.h b/Tests/RunCMake/VerifyHeaderSets/dir/c.h
new file mode 100644
index 0000000..151cd81
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/dir/c.h
@@ -0,0 +1,8 @@
+#ifdef TEST_DIR_C_H
+# error "TEST_DIR_C_H defined"
+#endif
+#ifdef __cplusplus
+# error "__cplusplus defined"
+#endif
+
+extern void dir_c_h(void);
diff --git a/Tests/RunCMake/VerifyHeaderSets/dir/cxx.h b/Tests/RunCMake/VerifyHeaderSets/dir/cxx.h
new file mode 100644
index 0000000..255f61b
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/dir/cxx.h
@@ -0,0 +1,8 @@
+#ifdef TEST_DIR_CXX_H
+# error "TEST_DIR_CXX_H defined"
+#endif
+#ifndef __cplusplus
+# error "__cplusplus not defined"
+#endif
+
+extern void dir_cxx_h(void);
diff --git a/Tests/RunCMake/VerifyHeaderSets/lang_test.h b/Tests/RunCMake/VerifyHeaderSets/lang_test.h
new file mode 100644
index 0000000..633a2a4
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/lang_test.h
@@ -0,0 +1,8 @@
+#if defined(__cplusplus) && !defined(EXPECT_CXX)
+# error "__cplusplus defined but EXPECT_CXX not defined"
+#endif
+#if !defined(__cplusplus) && defined(EXPECT_CXX)
+# error "__cplusplus not defined but EXPECT_CXX defined"
+#endif
+
+extern void lang_test_h(void);
diff --git a/Tests/RunCMake/VerifyHeaderSets/lib.c b/Tests/RunCMake/VerifyHeaderSets/lib.c
new file mode 100644
index 0000000..6401eca
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/lib.c
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void lib_c(void)
+{
+}
diff --git a/Tests/RunCMake/VerifyHeaderSets/lib.cxx b/Tests/RunCMake/VerifyHeaderSets/lib.cxx
new file mode 100644
index 0000000..a0b3096
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/lib.cxx
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void lib_cxx(void)
+{
+}
diff --git a/Tests/RunCMake/VerifyHeaderSets/main.c b/Tests/RunCMake/VerifyHeaderSets/main.c
new file mode 100644
index 0000000..8a83e8c
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/main.c
@@ -0,0 +1,11 @@
+int main(void)
+{
+ return 0;
+}
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void main_c(void)
+{
+}
diff --git a/Tests/RunCMake/VerifyHeaderSets/release.h b/Tests/RunCMake/VerifyHeaderSets/release.h
new file mode 100644
index 0000000..7641988
--- /dev/null
+++ b/Tests/RunCMake/VerifyHeaderSets/release.h
@@ -0,0 +1,3 @@
+#error "Compiled in release mode"
+
+extern void release_h(void);