[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3613-gc062294
Brad King
brad.king at kitware.com
Fri Jun 6 10:41:38 EDT 2014
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 c062294dfd7c293256fea0463cbce5c5e43ab91c (commit)
via 218699eb2827ca5f6082b1f9e1e84238cb301155 (commit)
from ffa34b4bfd95b86579a2911292a33a40cb137c6d (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=c062294dfd7c293256fea0463cbce5c5e43ab91c
commit c062294dfd7c293256fea0463cbce5c5e43ab91c
Merge: ffa34b4 218699e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Jun 6 10:41:38 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jun 6 10:41:38 2014 -0400
Merge topic 'testRST-no-preprocessor-FILE' into next
218699eb Tests: Fix CMakeLib.testRST for relative __FILE__
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=218699eb2827ca5f6082b1f9e1e84238cb301155
commit 218699eb2827ca5f6082b1f9e1e84238cb301155
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Jun 6 10:39:45 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Jun 6 10:39:45 2014 -0400
Tests: Fix CMakeLib.testRST for relative __FILE__
Pass the test input directory as a runtime argument instead of
depending on __FILE__ to locate it.
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt
index 0e1fe8d..8c99f64 100644
--- a/Tests/CMakeLib/CMakeLists.txt
+++ b/Tests/CMakeLib/CMakeLists.txt
@@ -13,6 +13,8 @@ set(CMakeLib_TESTS
testXMLSafe
)
+set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR})
+
if(WIN32)
list(APPEND CMakeLib_TESTS
testVisualStudioSlnParser
@@ -39,7 +41,7 @@ if(CMAKE_OSX_ARCHITECTURES AND XCODE
endif()
foreach(test ${CMakeLib_TESTS})
- add_test(CMakeLib.${test} CMakeLibTests ${test})
+ add_test(CMakeLib.${test} CMakeLibTests ${test} ${${test}_ARGS})
endforeach()
if(TEST_CompileCommandOutput)
diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx
index bad9560..37cb3fa 100644
--- a/Tests/CMakeLib/testRST.cxx
+++ b/Tests/CMakeLib/testRST.cxx
@@ -25,9 +25,14 @@ void reportLine(std::ostream& os, bool ret, std::string line, bool eol)
}
}
-int testRST(int, char*[])
+int testRST(int argc, char* argv[])
{
- std::string dir = cmSystemTools::GetFilenamePath(__FILE__);
+ if(argc != 2)
+ {
+ std::cerr << "Usage: testRST <dir>" << std::endl;
+ return 1;
+ }
+ std::string dir = argv[1];
if(dir.empty())
{
dir = ".";
-----------------------------------------------------------------------
Summary of changes:
Tests/CMakeLib/CMakeLists.txt | 4 +++-
Tests/CMakeLib/testRST.cxx | 9 +++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list