From 137c0b94caeeacea3ccea8738b776fcbe4bb811c Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 4 Jan 2021 17:45:13 +0100 Subject: [PATCH] Add pre-compiled header (pch.h), bump CMake version 3.1 -> 3.16 --- CMakeLists.txt | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed010a1..8bc6065 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ add_custom_target(run # ------------------------------------------ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.16) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -90,3 +90,24 @@ set(CMAKE_CXX_STANDARD 17) add_executable(${GAME} ${GAME_SOURCES}) target_link_libraries(${GAME} ${ENGINE}) + +# ------------------------------------------ + +target_precompile_headers(${ENGINE} PRIVATE + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" + "$<$:>" +) + +target_precompile_headers(${GAME} REUSE_FROM ${ENGINE})