summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-Embarcadero.cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-07-13 10:07:30 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-28 15:47:40 (GMT)
commitb8626261e95e0f99c9227d619671822f9a60ef1a (patch)
treebb3b915854ac4ff9b01515642521b2940b02ec38 /Modules/Platform/Windows-Embarcadero.cmake
parent375d01c6808713a0cfeef9ea092c8236ba063525 (diff)
downloadCMake-b8626261e95e0f99c9227d619671822f9a60ef1a.zip
CMake-b8626261e95e0f99c9227d619671822f9a60ef1a.tar.gz
CMake-b8626261e95e0f99c9227d619671822f9a60ef1a.tar.bz2
Precompile headers: Add methods to generate PCH sources
Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
Diffstat (limited to 'Modules/Platform/Windows-Embarcadero.cmake')
-rw-r--r--Modules/Platform/Windows-Embarcadero.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake
index 48b936e..370b56e 100644
--- a/Modules/Platform/Windows-Embarcadero.cmake
+++ b/Modules/Platform/Windows-Embarcadero.cmake
@@ -119,6 +119,13 @@ macro(__embarcadero_language lang)
"tlib ${CMAKE_START_TEMP_FILE}/p512 <LINK_FLAGS> /a <TARGET_QUOTED> <OBJECTS>${CMAKE_END_TEMP_FILE}"
)
+ # Precompile Headers
+ if (EMBARCADERO)
+ set(CMAKE_PCH_EXTENSION .pch)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Xclang -include-pch -Xclang <PCH_FILE>)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Xclang -emit-pch -Xclang -include -Xclang <PCH_HEADER>)
+ endif()
+
# Initial configuration flags.
string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_tM}")
string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -Od -v")