diff options
author | Brad King <brad.king@kitware.com> | 2008-02-27 19:31:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-27 19:31:09 (GMT) |
commit | e840a9dff31ef7682e698f78edc5c9e06f79834c (patch) | |
tree | 66b95ef2f75a74974eedc0664d1f2efcc9579a3a | |
parent | 883931056f8b8d11dfdb2fb9f91197b67695ace7 (diff) | |
download | CMake-e840a9dff31ef7682e698f78edc5c9e06f79834c.zip CMake-e840a9dff31ef7682e698f78edc5c9e06f79834c.tar.gz CMake-e840a9dff31ef7682e698f78edc5c9e06f79834c.tar.bz2 |
BUG: Apply patch from bug#6445. Add preprocessor definitions to assembly and preprocessing build rules.
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 8 | ||||
-rw-r--r-- | Modules/Platform/IRIX64.cmake | 8 | ||||
-rw-r--r-- | Modules/Platform/Linux-PGI-C.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/Linux-PGI-CXX.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/SunOS.cmake | 6 | ||||
-rw-r--r-- | Modules/Platform/Windows-bcc32.cmake | 13 | ||||
-rw-r--r-- | Modules/Platform/gcc.cmake | 8 |
7 files changed, 28 insertions, 23 deletions
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake index 50dedc3..381ef39 100644 --- a/Modules/Platform/HP-UX.cmake +++ b/Modules/Platform/HP-UX.cmake @@ -90,14 +90,14 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX) INCLUDE(Platform/UnixPaths) IF(NOT CMAKE_COMPILER_IS_GNUCC) - SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") - SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) IF(NOT CMAKE_COMPILER_IS_GNUCXX) - SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE - "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE>" + "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>" "mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>" "rm -f `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.o" ) diff --git a/Modules/Platform/IRIX64.cmake b/Modules/Platform/IRIX64.cmake index 982619a..d83ca60 100644 --- a/Modules/Platform/IRIX64.cmake +++ b/Modules/Platform/IRIX64.cmake @@ -46,17 +46,17 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) INCLUDE(Platform/UnixPaths) IF(NOT CMAKE_COMPILER_IS_GNUCC) - SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE - "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE>" + "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>" "mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>" ) ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) IF(NOT CMAKE_COMPILER_IS_GNUCXX) - SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE - "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE>" + "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>" "mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>" ) ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) diff --git a/Modules/Platform/Linux-PGI-C.cmake b/Modules/Platform/Linux-PGI-C.cmake index 104e3dc..df3c38e 100644 --- a/Modules/Platform/Linux-PGI-C.cmake +++ b/Modules/Platform/Linux-PGI-C.cmake @@ -1,5 +1,5 @@ SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") -SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") -SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") +SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") +SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") diff --git a/Modules/Platform/Linux-PGI-CXX.cmake b/Modules/Platform/Linux-PGI-CXX.cmake index 1d8c92a..32a2a8e 100644 --- a/Modules/Platform/Linux-PGI-CXX.cmake +++ b/Modules/Platform/Linux-PGI-CXX.cmake @@ -1,4 +1,4 @@ SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") -SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") -SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") +SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") +SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake index 9bd8b09..f6fdf77 100644 --- a/Modules/Platform/SunOS.cmake +++ b/Modules/Platform/SunOS.cmake @@ -63,12 +63,12 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX) INCLUDE(Platform/UnixPaths) IF(NOT CMAKE_COMPILER_IS_GNUCC) - SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") - SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) IF(NOT CMAKE_COMPILER_IS_GNUCXX) - SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) 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 diff --git a/Modules/Platform/gcc.cmake b/Modules/Platform/gcc.cmake index 695a55f..8c385ce 100644 --- a/Modules/Platform/gcc.cmake +++ b/Modules/Platform/gcc.cmake @@ -5,8 +5,8 @@ IF(CMAKE_COMPILER_IS_GNUCC) SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") - SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") - SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") IF(NOT APPLE) SET (CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ") ENDIF(NOT APPLE) @@ -19,8 +19,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX) SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") - SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") - SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") IF(NOT APPLE) SET (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") ENDIF(NOT APPLE) |