1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Tests: Update Preprocess test for IntelLLVM

Work around an icx bug in command line handling of preprocessor macros.

A `\\\"` string in a macro passed to icx on the command line is not
properly parsed in compiler versions 2021.1.0 and earlier.  This problem
is expected to be fixed, though a target release has no been set yet.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
This commit is contained in:
William R. Dieter
2021-01-15 19:20:27 -05:00
committed by Brad King
parent 7de61526a0
commit d83df2af57

View File

@@ -147,8 +147,13 @@ endif()
# - NMake is okay with just \\\"
# - The XL compiler does not re-escape \\\" when launching an
# internal tool to do preprocessing .
# - The IntelLLVM C and C++ compiler drivers do not re-escape the \\\" when
# launching the underlying compiler. FIXME: this bug is expected to be fixed
# in a future release.
if((PP_NMAKE OR PP_UMAKE) AND
NOT CMAKE_C_COMPILER_ID STREQUAL "XL")
NOT CMAKE_C_COMPILER_ID STREQUAL "XL" AND
NOT CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM" AND
NOT CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
string(APPEND STRING_EXTRA "\\\"")
endif()