summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PrecompileHeaders/PchReuseFromSubdir.cmake
blob: fff74dcd68c8288c2ec7d78f8ddb971489578fa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cmake_minimum_required(VERSION 3.15)
project(PchReuseFromSubdir C)

add_library(empty empty.c)
target_precompile_headers(empty PUBLIC
  <stdio.h>
  <string.h>
)
target_include_directories(empty PUBLIC include)

add_library(foo foo.c)
target_include_directories(foo PUBLIC include)
target_precompile_headers(foo REUSE_FROM empty)

subdirs(subdir)

enable_testing()
add_test(NAME foobar COMMAND foobar)