summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PrecompileHeaders/DisabledPch.cmake
blob: 59ee14b9ff459d0af548e4378aca0fe106393d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cmake_minimum_required(VERSION 3.15)
project(DisabledPch C)

add_library(foo foo.c)
target_include_directories(foo PUBLIC include)
target_precompile_headers(foo PUBLIC
  include/foo.h
  <stdio.h>
  \"string.h\"
)

add_executable(foobar foobar.c)
target_link_libraries(foobar foo)
set_target_properties(foobar PROPERTIES DISABLE_PRECOMPILE_HEADERS ON)