ENH: fix problem with watcom and short paths and -I
This commit is contained in:
parent
5c692ee247
commit
7f237c51f4
|
@ -565,6 +565,8 @@ IF(BUILD_TESTING)
|
|||
--build-project complex
|
||||
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
|
||||
--build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexOneConfig/bin"
|
||||
--build-options
|
||||
-DCMAKE_TEST_DIFFERENT_GENERATOR:BOOL=${CMAKE_TEST_DIFFERENT_GENERATOR}
|
||||
--test-command complex)
|
||||
|
||||
# ADD_TEST(complexRelativePaths ${CMAKE_CTEST_COMMAND}
|
||||
|
|
|
@ -29,6 +29,7 @@ void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vector<std::string>const&
|
|||
{
|
||||
// pick a default
|
||||
mf->AddDefinition("WATCOM", "1");
|
||||
mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1");
|
||||
mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
|
||||
mf->AddDefinition("CMAKE_WINDOWS_OBJECT_PATH", "1");
|
||||
mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
|
||||
|
|
|
@ -1049,7 +1049,11 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
|
|||
flagVar = "CMAKE_INCLUDE_FLAG_SEP_";
|
||||
flagVar += lang;
|
||||
const char* sep = m_Makefile->GetDefinition(flagVar.c_str());
|
||||
|
||||
bool quotePaths = false;
|
||||
if(m_Makefile->GetDefinition("CMAKE_QUOTE_INCLUDE_PATHS"))
|
||||
{
|
||||
quotePaths = true;
|
||||
}
|
||||
bool repeatFlag = true; // should the include flag be repeated like ie. -IA -IB
|
||||
if(!sep)
|
||||
{
|
||||
|
@ -1084,7 +1088,18 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
|
|||
includeFlags << includeFlag;
|
||||
flagUsed = true;
|
||||
}
|
||||
includeFlags << this->ConvertToOutputForExisting(i->c_str()) << sep;
|
||||
includeFlags;
|
||||
std::string includePath = this->ConvertToOutputForExisting(i->c_str());
|
||||
if(quotePaths && includePath.size() && includePath[0] != '\"')
|
||||
{
|
||||
includeFlags << "\"";
|
||||
}
|
||||
includeFlags << includePath;
|
||||
if(quotePaths && includePath.size() && includePath[0] != '\"')
|
||||
{
|
||||
includeFlags << "\"";
|
||||
}
|
||||
includeFlags << sep;
|
||||
}
|
||||
std::string flags = includeFlags.str();
|
||||
// remove trailing separators
|
||||
|
|
Loading…
Reference in New Issue