diff options
author | Brad King <brad.king@kitware.com> | 2009-10-05 18:39:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-05 18:39:28 (GMT) |
commit | 58a616dea3027a968d0244cedadf814849a5eedf (patch) | |
tree | 3ee2d7a68040783ec32e8d42250c55a6291792d0 /Tests | |
parent | f1b7e620f7fa867ee50eb50ad398d349281691fe (diff) | |
download | CMake-58a616dea3027a968d0244cedadf814849a5eedf.zip CMake-58a616dea3027a968d0244cedadf814849a5eedf.tar.gz CMake-58a616dea3027a968d0244cedadf814849a5eedf.tar.bz2 |
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.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Preprocess/CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt index f154b6f..b4ec17c 100644 --- a/Tests/Preprocess/CMakeLists.txt +++ b/Tests/Preprocess/CMakeLists.txt @@ -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) set(EXPR_OP1 "/") -if(NOT MSVC OR PP_NMAKE) - # MSVC cl: % +if((NOT MSVC OR PP_NMAKE) AND + NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$") + # MSVC cl, Intel icl: % # When the cl compiler is invoked from the command line then % must # be written %% (to distinguish from %ENV% syntax). However cl does # 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 # file. Supporting other make tools would require CMake to generate # 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(EXPR_OP1 "%") -endif(NOT MSVC OR PP_NMAKE) +endif() # General: \" # Make tools do not reliably accept \\\" syntax: |