blob: dd582aca8cb3a5ad74c9b6769c8bbbb3e6fab64a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
cmake_minimum_required(VERSION 3.16)
project(PchIncludedAllLanguages C CXX)
if(CMAKE_CXX_COMPILE_OPTIONS_USE_PCH)
add_definitions(-DHAVE_PCH_SUPPORT)
endif()
add_executable(main
main.cpp
empty.c
pch-included.cpp
)
target_precompile_headers(main PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/pch.h>)
enable_testing()
add_test(NAME main COMMAND main)
|