Merge topic 'custom-command-slashes'
1286050
Normalize slashes of add_custom_(command|target) DEPENDS (#11973)
This commit is contained in:
commit
148b528f9d
|
@ -195,11 +195,13 @@ bool cmAddCustomCommandCommand
|
||||||
{
|
{
|
||||||
// An implicit dependency starting point is also an
|
// An implicit dependency starting point is also an
|
||||||
// explicit dependency.
|
// explicit dependency.
|
||||||
depends.push_back(copy);
|
std::string dep = copy;
|
||||||
|
cmSystemTools::ConvertToUnixSlashes(dep);
|
||||||
|
depends.push_back(dep);
|
||||||
|
|
||||||
// Add the implicit dependency language and file.
|
// Add the implicit dependency language and file.
|
||||||
cmCustomCommand::ImplicitDependsPair
|
cmCustomCommand::ImplicitDependsPair
|
||||||
entry(implicit_depends_lang, copy);
|
entry(implicit_depends_lang, dep);
|
||||||
implicit_depends.push_back(entry);
|
implicit_depends.push_back(entry);
|
||||||
|
|
||||||
// Switch back to looking for a language.
|
// Switch back to looking for a language.
|
||||||
|
@ -213,7 +215,11 @@ bool cmAddCustomCommandCommand
|
||||||
target = copy;
|
target = copy;
|
||||||
break;
|
break;
|
||||||
case doing_depends:
|
case doing_depends:
|
||||||
depends.push_back(copy);
|
{
|
||||||
|
std::string dep = copy;
|
||||||
|
cmSystemTools::ConvertToUnixSlashes(dep);
|
||||||
|
depends.push_back(dep);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case doing_outputs:
|
case doing_outputs:
|
||||||
outputs.push_back(filename);
|
outputs.push_back(filename);
|
||||||
|
|
|
@ -123,7 +123,11 @@ bool cmAddCustomTargetCommand
|
||||||
currentLine.push_back(copy);
|
currentLine.push_back(copy);
|
||||||
break;
|
break;
|
||||||
case doing_depends:
|
case doing_depends:
|
||||||
depends.push_back(copy);
|
{
|
||||||
|
std::string dep = copy;
|
||||||
|
cmSystemTools::ConvertToUnixSlashes(dep);
|
||||||
|
depends.push_back(dep);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case doing_comment:
|
case doing_comment:
|
||||||
comment_buffer = copy;
|
comment_buffer = copy;
|
||||||
|
|
|
@ -1904,7 +1904,6 @@ bool cmLocalGenerator::GetRealDependency(const char* inName,
|
||||||
{
|
{
|
||||||
// This is a full path. Return it as given.
|
// This is a full path. Return it as given.
|
||||||
dep = inName;
|
dep = inName;
|
||||||
cmSystemTools::ConvertToUnixSlashes(dep);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ ADD_CUSTOM_TARGET(TDocument ALL
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo " Copying doc1.h to doc2.h."
|
COMMAND ${CMAKE_COMMAND} -E echo " Copying doc1.h to doc2.h."
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.h
|
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.h
|
||||||
${PROJECT_BINARY_DIR}/doc2.h
|
${PROJECT_BINARY_DIR}/doc2.h
|
||||||
DEPENDS ${PROJECT_BINARY_DIR}/doc1.h doc1.txt
|
DEPENDS doc1.txt ${PROJECT_BINARY_DIR}//doc1.h # test 2 slashes
|
||||||
COMMENT "Running top-level TDocument commands"
|
COMMENT "Running top-level TDocument commands"
|
||||||
SOURCES doc1.tex
|
SOURCES doc1.tex
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue