[Cmake-commits] CMake branch, next, updated. v2.8.4-1281-gc8c5602
Brad King
brad.king at kitware.com
Wed Mar 30 10:05:13 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via c8c56021f4619db9881b6d0179589533b2fa5db5 (commit)
via 128605054a2d773189869d6e1b5000e6d4a93241 (commit)
from cb6c118336b318547e8a936e3496d6262df1cccf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8c56021f4619db9881b6d0179589533b2fa5db5
commit c8c56021f4619db9881b6d0179589533b2fa5db5
Merge: cb6c118 1286050
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 30 10:05:09 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 30 10:05:09 2011 -0400
Merge topic 'custom-command-slashes' into next
1286050 Normalize slashes of add_custom_(command|target) DEPENDS (#11973)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=128605054a2d773189869d6e1b5000e6d4a93241
commit 128605054a2d773189869d6e1b5000e6d4a93241
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 30 09:52:07 2011 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 30 09:52:07 2011 -0400
Normalize slashes of add_custom_(command|target) DEPENDS (#11973)
All commands accepting file paths should normalize the slashes so that
the string-represented names can be compared reliably. The commands
add_library and add_executable have done this for years. We taught
add_custom_command to normalize its OUTPUT names in commit a75a0a14
(Normalize add_custom_command OUTPUT names, 2010-12-15). We handled a
special case of the DEPENDS option in commit 7befc007 (Handle trailing
slashes on add_custom_command DEPENDS, 2011-01-26).
Teach both add_custom_command and add_custom_target to normalize slashes
of DEPENDS files up front. This approach subsumes the above-mentioned
special case so remove the one line added for it but keep its test.
Extend the CustomCommand test to check that slash count mismatches
between custom command OUTPUT and DEPENDS can still be linked correctly.
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 502829e..5634849 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -195,11 +195,13 @@ bool cmAddCustomCommandCommand
{
// An implicit dependency starting point is also an
// explicit dependency.
- depends.push_back(copy);
+ std::string dep = copy;
+ cmSystemTools::ConvertToUnixSlashes(dep);
+ depends.push_back(dep);
// Add the implicit dependency language and file.
cmCustomCommand::ImplicitDependsPair
- entry(implicit_depends_lang, copy);
+ entry(implicit_depends_lang, dep);
implicit_depends.push_back(entry);
// Switch back to looking for a language.
@@ -213,7 +215,11 @@ bool cmAddCustomCommandCommand
target = copy;
break;
case doing_depends:
- depends.push_back(copy);
+ {
+ std::string dep = copy;
+ cmSystemTools::ConvertToUnixSlashes(dep);
+ depends.push_back(dep);
+ }
break;
case doing_outputs:
outputs.push_back(filename);
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index 27dea98..4eba886 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -123,7 +123,11 @@ bool cmAddCustomTargetCommand
currentLine.push_back(copy);
break;
case doing_depends:
- depends.push_back(copy);
+ {
+ std::string dep = copy;
+ cmSystemTools::ConvertToUnixSlashes(dep);
+ depends.push_back(dep);
+ }
break;
case doing_comment:
comment_buffer = copy;
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index cd265c1..d3cbc1f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1893,7 +1893,6 @@ bool cmLocalGenerator::GetRealDependency(const char* inName,
{
// This is a full path. Return it as given.
dep = inName;
- cmSystemTools::ConvertToUnixSlashes(dep);
return true;
}
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index 19e3c2c..b7c9ea2 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -102,7 +102,7 @@ ADD_CUSTOM_TARGET(TDocument ALL
COMMAND ${CMAKE_COMMAND} -E echo " Copying doc1.h to doc2.h."
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.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"
SOURCES doc1.tex
)
-----------------------------------------------------------------------
Summary of changes:
Source/cmAddCustomCommandCommand.cxx | 12 +++++++++---
Source/cmAddCustomTargetCommand.cxx | 6 +++++-
Source/cmLocalGenerator.cxx | 1 -
Tests/CustomCommand/CMakeLists.txt | 2 +-
4 files changed, 15 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list