mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-10 07:40:03 -06:00
cmDepends: disable long line dependencies for nmake
This is a follow-up to commit b696f78073 (cmDepends: merge dependers of
depend makefile, 2020-12-18). NMake of visual studio has many versions
that not support long line dependencies of make rule.
Signed-off-by: Wangkai <wangkai86@huawei.com>
Fixes: #21681
This commit is contained in:
@@ -21,6 +21,8 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator(cmake* cm)
|
||||
this->PassMakeflags = true;
|
||||
this->UnixCD = false;
|
||||
this->MakeSilentFlag = "/nologo";
|
||||
// nmake breaks on '!' in long-line dependencies
|
||||
this->ToolSupportsLongLineDependencies = false;
|
||||
}
|
||||
|
||||
void cmGlobalNMakeMakefileGenerator::EnableLanguage(
|
||||
|
||||
@@ -67,13 +67,7 @@ else()
|
||||
endif()
|
||||
|
||||
# Test escaping of special characters in include directory paths.
|
||||
set(special_chars "~@&{}()'")
|
||||
if(NOT (CMAKE_GENERATOR STREQUAL "NMake Makefiles" AND
|
||||
"x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" AND
|
||||
"${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 13.0))
|
||||
# NMake from VS 6 mistakes '!' in a path after a line continuation for a directive.
|
||||
string(APPEND special_chars "!")
|
||||
endif()
|
||||
set(special_chars "~@&{}()!'")
|
||||
if(NOT CMAKE_GENERATOR MATCHES "(Unix|MinGW|MSYS) Makefiles")
|
||||
# when compiler is used for dependencies, special characters for make are not escaped
|
||||
string(APPEND special_chars "%")
|
||||
|
||||
Reference in New Issue
Block a user