summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-bcc32.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Platform/Windows-bcc32.cmake')
-rw-r--r--Modules/Platform/Windows-bcc32.cmake13
1 files changed, 9 insertions, 4 deletions
diff --git a/Modules/Platform/Windows-bcc32.cmake b/Modules/Platform/Windows-bcc32.cmake
index fa4813e..4d01cc1 100644
--- a/Modules/Platform/Windows-bcc32.cmake
+++ b/Modules/Platform/Windows-bcc32.cmake
@@ -117,7 +117,12 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_R
SET (CMAKE_C_STANDARD_LIBRARIES_INIT "import32.lib")
SET (CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
-SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
- "cpp32 ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -fo<PREPROCESSED_SOURCE> -pl -cc++ <SOURCE>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
- "cpp32 ${CMAKE_START_TEMP_FILE}-DWIN32 <FLAGS> -o<PREPROCESSED_SOURCE> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
+
+# preprocess C and CXX files
+# place <DEFINES> outside the response file because Borland refuses
+# to parse quotes from the response file.
+SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE
+ "cpp32 <DEFINES> ${CMAKE_START_TEMP_FILE}-DWIN32 <FLAGS> -o<PREPROCESSED_SOURCE> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
+SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
+ "cpp32 <DEFINES> ${CMAKE_START_TEMP_FILE}-DWIN32 <FLAGS> -o<PREPROCESSED_SOURCE> -P -c <SOURCE>${CMAKE_END_TEMP_FILE}")
+# Borland >= 5.6 allows -P option for cpp32, <= 5.5 does not