[Cmake-commits] CMake branch, next, updated. v2.8.3-993-gec915af
Ben Boeckel
ben.boeckel at kitware.com
Fri Dec 17 11:10:56 EST 2010
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 ec915afcac59b3b34471d689ad69f6d6e98abaef (commit)
via a4a5e375685adcfe765c45be086706720a96dbea (commit)
via cfe53cddbde124864ffb0500475bc1c1cbd3ddbc (commit)
via 017d4e9d2ce1544aab44f87204b5195e0c062812 (commit)
from 364d0db69880a756891998cb85bd3b7f411cac44 (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=ec915afcac59b3b34471d689ad69f6d6e98abaef
commit ec915afcac59b3b34471d689ad69f6d6e98abaef
Merge: 364d0db a4a5e37
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 17 11:10:50 2010 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 17 11:10:50 2010 -0500
Merge topic 'dev/add_test-working-directory' into next
a4a5e37 Use iostream to make Borland happy
cfe53cd Fully specify the path to old-signature add_test
017d4e9 Group adding tests with its properties
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4a5e375685adcfe765c45be086706720a96dbea
commit a4a5e375685adcfe765c45be086706720a96dbea
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 17 11:07:40 2010 -0500
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Dec 17 11:07:40 2010 -0500
Use iostream to make Borland happy
It seems as though cstdio doesn't bring in stdio.h with the Borland
compilers.
diff --git a/Tests/TestsWorkingDirectory/main.cxx b/Tests/TestsWorkingDirectory/main.cxx
index 6a3a6be..42c3d34 100644
--- a/Tests/TestsWorkingDirectory/main.cxx
+++ b/Tests/TestsWorkingDirectory/main.cxx
@@ -1,8 +1,9 @@
-#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctype.h>
+#include <iostream>
+
#if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__))
#include <io.h>
@@ -18,7 +19,7 @@ inline const char* Getcwd(char* buf, unsigned int len)
const char* ret = _getcwd(buf, len);
if(!ret)
{
- fprintf(stderr, "No current working directory.\n");
+ std::cerr << "No current working directory." << std::endl;
abort();
}
// make sure the drive letter is capital
@@ -46,7 +47,7 @@ inline const char* Getcwd(char* buf, unsigned int len)
const char* ret = getcwd(buf, len);
if(!ret)
{
- fprintf(stderr, "No current working directory\n");
+ std::cerr << "No current working directory" << std::endl;
abort();
}
return ret;
@@ -59,7 +60,7 @@ int main(int argc, char *argv[])
char buf[2048];
const char *cwd = Getcwd(buf, sizeof(buf));
- fprintf(stdout, "Working directory: -->%s<--", cwd);
+ std::cout << "Working directory: -->" << cwd << "<--";
return 0;
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfe53cddbde124864ffb0500475bc1c1cbd3ddbc
commit cfe53cddbde124864ffb0500475bc1c1cbd3ddbc
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 17 11:07:19 2010 -0500
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Dec 17 11:07:19 2010 -0500
Fully specify the path to old-signature add_test
diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt
index 1bc0705..24dc5e6 100644
--- a/Tests/TestsWorkingDirectory/CMakeLists.txt
+++ b/Tests/TestsWorkingDirectory/CMakeLists.txt
@@ -25,7 +25,7 @@ get_filename_component(_default_cwd "${EXECUTABLE_OUTPUT_PATH}" PATH)
# FIXME: How to deal with /debug, /release, etc. with VS or XCode?
if(${CMAKE_GENERATOR} MATCHES "Makefiles")
-add_test(WorkingDirectory3 WorkingDirectory)
+add_test(WorkingDirectory3 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory)
set_tests_properties(WorkingDirectory3 PROPERTIES
PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
)
@@ -45,7 +45,7 @@ set_tests_properties(WorkingDirectory5 PROPERTIES
# FIXME: How to deal with /debug, /release, etc. with VS or XCode?
if(${CMAKE_GENERATOR} MATCHES "Makefiles")
-add_test(WorkingDirectory6 WorkingDirectory WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..)
+add_test(WorkingDirectory6 ${EXECUTABLE_OUTPUT_PATH}/WorkingDirectory WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..)
set_tests_properties(WorkingDirectory6 PROPERTIES
PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=017d4e9d2ce1544aab44f87204b5195e0c062812
commit 017d4e9d2ce1544aab44f87204b5195e0c062812
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 17 11:06:59 2010 -0500
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Dec 17 11:06:59 2010 -0500
Group adding tests with its properties
diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt
index bd52cd6..1bc0705 100644
--- a/Tests/TestsWorkingDirectory/CMakeLists.txt
+++ b/Tests/TestsWorkingDirectory/CMakeLists.txt
@@ -8,9 +8,6 @@ enable_testing()
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
add_test(NAME WorkingDirectory1 COMMAND WorkingDirectory)
-add_test(NAME WorkingDirectory2 COMMAND WorkingDirectory)
-add_test(WorkingDirectory3 WorkingDirectory)
-
set_tests_properties(WorkingDirectory1 PROPERTIES
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
PASS_REGULAR_EXPRESSION "Working directory: -->${CMAKE_BINARY_DIR}<--"
@@ -18,6 +15,7 @@ set_tests_properties(WorkingDirectory1 PROPERTIES
string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}")
+add_test(NAME WorkingDirectory2 COMMAND WorkingDirectory)
set_tests_properties(WorkingDirectory2 PROPERTIES
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/.."
PASS_REGULAR_EXPRESSION "Working directory: -->${_parent_dir}<--"
@@ -27,27 +25,27 @@ get_filename_component(_default_cwd "${EXECUTABLE_OUTPUT_PATH}" PATH)
# FIXME: How to deal with /debug, /release, etc. with VS or XCode?
if(${CMAKE_GENERATOR} MATCHES "Makefiles")
+add_test(WorkingDirectory3 WorkingDirectory)
set_tests_properties(WorkingDirectory3 PROPERTIES
PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
)
endif()
add_test(NAME WorkingDirectory4 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND WorkingDirectory)
-add_test(NAME WorkingDirectory5 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/.. COMMAND WorkingDirectory)
-add_test(WorkingDirectory6 WorkingDirectory WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..)
-
set_tests_properties(WorkingDirectory4 PROPERTIES
PASS_REGULAR_EXPRESSION "Working directory: -->${CMAKE_BINARY_DIR}<--"
)
string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}")
+add_test(NAME WorkingDirectory5 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/.. COMMAND WorkingDirectory)
set_tests_properties(WorkingDirectory5 PROPERTIES
PASS_REGULAR_EXPRESSION "Working directory: -->${_parent_dir}<--"
)
# FIXME: How to deal with /debug, /release, etc. with VS or XCode?
if(${CMAKE_GENERATOR} MATCHES "Makefiles")
+add_test(WorkingDirectory6 WorkingDirectory WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..)
set_tests_properties(WorkingDirectory6 PROPERTIES
PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
)
-----------------------------------------------------------------------
Summary of changes:
Tests/TestsWorkingDirectory/CMakeLists.txt | 10 ++++------
Tests/TestsWorkingDirectory/main.cxx | 9 +++++----
2 files changed, 9 insertions(+), 10 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list