mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-13 12:59:55 -05:00
The `CMakeLists.txt` file already calls `cmake_minimum_required` and `project` before including each case's code.
18 lines
341 B
CMake
18 lines
341 B
CMake
enable_language(C)
|
|
enable_language(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)
|