You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
377 B
18 lines
377 B
3 years ago
|
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)
|