summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:18 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:18 +0900
commitd40909a98298a97d879ceeb3b29dcdc858e85628 (patch)
tree0a9255654a9376c5e9f29aa53d15f0ae173751a0 /Tests/RunCMake/PrecompileHeaders/PchInterface.cmake
parentc5223aaf98b2d10aee32aa614519ee7a23698998 (diff)
downloadcmake-5e63fbc7b992da72e08483c99e4e38ef9fd81a53.tar.gz
cmake-5e63fbc7b992da72e08483c99e4e38ef9fd81a53.tar.bz2
cmake-5e63fbc7b992da72e08483c99e4e38ef9fd81a53.zip
Imported Upstream version 3.16.0upstream/3.16.0
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders/PchInterface.cmake')
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchInterface.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake b/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake
new file mode 100644
index 000000000..a1e079273
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake
@@ -0,0 +1,21 @@
+cmake_minimum_required(VERSION 3.15)
+project(PchInterface C)
+
+add_library(foo foo.c)
+target_include_directories(foo PUBLIC include)
+target_precompile_headers(foo PUBLIC
+ include/foo.h
+ \"foo2.h\"
+ <stdio.h>
+ \"string.h\"
+)
+
+add_library(bar INTERFACE)
+target_include_directories(bar INTERFACE include)
+target_precompile_headers(bar INTERFACE include/bar.h)
+
+add_executable(foobar foobar.c)
+target_link_libraries(foobar foo bar)
+
+enable_testing()
+add_test(NAME foobar COMMAND foobar)