Fix Preprocess test for Intel on Windows
We need to leave out the '%' character from tests with the Intel compiler. Since '%' needs to be written '%%' in NMake when not using a response file but just '%' when using a response file, we just skip the character for now. It works with MSVC in NMake only because that compiler expects '%%' inside response files, which do get used.
This commit is contained in:
parent
f1b7e620f7
commit
58a616dea3
@ -117,8 +117,9 @@ if(NOT PP_BORLAND AND NOT PP_MINGW AND NOT PP_NMAKE)
|
|||||||
endif(NOT PP_BORLAND AND NOT PP_MINGW AND NOT PP_NMAKE)
|
endif(NOT PP_BORLAND AND NOT PP_MINGW AND NOT PP_NMAKE)
|
||||||
|
|
||||||
set(EXPR_OP1 "/")
|
set(EXPR_OP1 "/")
|
||||||
if(NOT MSVC OR PP_NMAKE)
|
if((NOT MSVC OR PP_NMAKE) AND
|
||||||
# MSVC cl: %
|
NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
|
||||||
|
# MSVC cl, Intel icl: %
|
||||||
# When the cl compiler is invoked from the command line then % must
|
# When the cl compiler is invoked from the command line then % must
|
||||||
# be written %% (to distinguish from %ENV% syntax). However cl does
|
# be written %% (to distinguish from %ENV% syntax). However cl does
|
||||||
# not seem to accept the syntax when it is invoked from inside a
|
# not seem to accept the syntax when it is invoked from inside a
|
||||||
@ -128,9 +129,14 @@ if(NOT MSVC OR PP_NMAKE)
|
|||||||
# line. Currently only NMake supports running cl with a response
|
# line. Currently only NMake supports running cl with a response
|
||||||
# file. Supporting other make tools would require CMake to generate
|
# file. Supporting other make tools would require CMake to generate
|
||||||
# response files explicitly for each object file.
|
# response files explicitly for each object file.
|
||||||
|
#
|
||||||
|
# When the icl compiler is invoked from the command line then % must
|
||||||
|
# be written just '%'. However nmake requires '%%' except when using
|
||||||
|
# response files. Currently we have no way to affect escaping based
|
||||||
|
# on whether flags go in a response file, so we just have to skip it.
|
||||||
set(STRING_EXTRA "${STRING_EXTRA}%")
|
set(STRING_EXTRA "${STRING_EXTRA}%")
|
||||||
set(EXPR_OP1 "%")
|
set(EXPR_OP1 "%")
|
||||||
endif(NOT MSVC OR PP_NMAKE)
|
endif()
|
||||||
|
|
||||||
# General: \"
|
# General: \"
|
||||||
# Make tools do not reliably accept \\\" syntax:
|
# Make tools do not reliably accept \\\" syntax:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user