[Cmake-commits] CMake branch, next, updated. v2.8.3-985-g5d6a123

Ben Boeckel ben.boeckel at kitware.com
Fri Dec 17 10:30:30 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  5d6a1231b5b7daeecbc86062364698269a9830cc (commit)
       via  561cc3359cca42749f797dd5ea908531740a873d (commit)
       via  d87bae7f742e5ea4d99dfd3691b6de335c6c0758 (commit)
       via  992c74f3e0747e806c3fc7708fea68cb2c376247 (commit)
      from  2f536bf65fdef888058c1013c083670209d9e0c0 (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=5d6a1231b5b7daeecbc86062364698269a9830cc
commit 5d6a1231b5b7daeecbc86062364698269a9830cc
Merge: 2f536bf 561cc33
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 17 10:30:26 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 17 10:30:26 2010 -0500

    Merge topic 'dev/add_test-working-directory' into next
    
    561cc33 Only test the default cwd with Makefiles
    d87bae7 Simplify the _default_cwd derivation
    992c74f Use --><-- markers to denote the path


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=561cc3359cca42749f797dd5ea908531740a873d
commit 561cc3359cca42749f797dd5ea908531740a873d
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 17 10:24:14 2010 -0500
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Dec 17 10:24:14 2010 -0500

    Only test the default cwd with Makefiles
    
    XCode and Visual Studio generators can run from
    ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE} and determining this at
    testing time is not feasible without adding in more
    PASS_REGULAR_EXPRESSION's which may create false positives.
    
    Since the parsing code is in cross-platform, generator-agnostic  code,
    if it passes with Makefiles, it should work with other generators on
    other platforms.

diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt
index d1c40d6..bd52cd6 100644
--- a/Tests/TestsWorkingDirectory/CMakeLists.txt
+++ b/Tests/TestsWorkingDirectory/CMakeLists.txt
@@ -25,9 +25,12 @@ set_tests_properties(WorkingDirectory2 PROPERTIES
 
 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")
 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)
@@ -43,6 +46,9 @@ 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")
 set_tests_properties(WorkingDirectory6 PROPERTIES
   PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
 )
+endif()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d87bae7f742e5ea4d99dfd3691b6de335c6c0758
commit d87bae7f742e5ea4d99dfd3691b6de335c6c0758
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 17 10:23:54 2010 -0500
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Dec 17 10:23:54 2010 -0500

    Simplify the _default_cwd derivation

diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt
index c0e780c..d1c40d6 100644
--- a/Tests/TestsWorkingDirectory/CMakeLists.txt
+++ b/Tests/TestsWorkingDirectory/CMakeLists.txt
@@ -5,6 +5,8 @@ add_executable(WorkingDirectory main.cxx)
 
 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)
@@ -21,8 +23,7 @@ set_tests_properties(WorkingDirectory2 PROPERTIES
   PASS_REGULAR_EXPRESSION "Working directory: -->${_parent_dir}<--"
 )
 
-string(REGEX REPLACE "/[^/]*$" "" _wd_exe "${CMAKE_BINARY_DIR}")
-get_filename_component(_default_cwd "${_wd_exe}" ABSOLUTE)
+get_filename_component(_default_cwd "${EXECUTABLE_OUTPUT_PATH}" PATH)
 
 set_tests_properties(WorkingDirectory3 PROPERTIES
   PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
@@ -42,9 +43,6 @@ set_tests_properties(WorkingDirectory5 PROPERTIES
   PASS_REGULAR_EXPRESSION "Working directory: -->${_parent_dir}<--"
 )
 
-string(REGEX REPLACE "/[^/]*$" "" _wd_exe "${CMAKE_BINARY_DIR}")
-get_filename_component(_default_cwd "${_wd_exe}" ABSOLUTE)
-
 set_tests_properties(WorkingDirectory6 PROPERTIES
   PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
 )

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=992c74f3e0747e806c3fc7708fea68cb2c376247
commit 992c74f3e0747e806c3fc7708fea68cb2c376247
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 17 10:23:24 2010 -0500
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Dec 17 10:23:24 2010 -0500

    Use --><-- markers to denote the path

diff --git a/Tests/TestsWorkingDirectory/CMakeLists.txt b/Tests/TestsWorkingDirectory/CMakeLists.txt
index 73b8997..c0e780c 100644
--- a/Tests/TestsWorkingDirectory/CMakeLists.txt
+++ b/Tests/TestsWorkingDirectory/CMakeLists.txt
@@ -11,21 +11,21 @@ add_test(WorkingDirectory3 WorkingDirectory)
 
 set_tests_properties(WorkingDirectory1 PROPERTIES
   WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
-  PASS_REGULAR_EXPRESSION "Working directory: ${CMAKE_BINARY_DIR}"
+  PASS_REGULAR_EXPRESSION "Working directory: -->${CMAKE_BINARY_DIR}<--"
 )
 
 string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}")
 
 set_tests_properties(WorkingDirectory2 PROPERTIES
   WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/.."
-  PASS_REGULAR_EXPRESSION "Working directory: ${_parent_dir}"
+  PASS_REGULAR_EXPRESSION "Working directory: -->${_parent_dir}<--"
 )
 
 string(REGEX REPLACE "/[^/]*$" "" _wd_exe "${CMAKE_BINARY_DIR}")
 get_filename_component(_default_cwd "${_wd_exe}" ABSOLUTE)
 
 set_tests_properties(WorkingDirectory3 PROPERTIES
-  PASS_REGULAR_EXPRESSION "Working directory: ${_default_cwd}"
+  PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
 )
 
 add_test(NAME WorkingDirectory4 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND WorkingDirectory)
@@ -33,18 +33,18 @@ add_test(NAME WorkingDirectory5 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/.. COMMAND
 add_test(WorkingDirectory6 WorkingDirectory WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..)
 
 set_tests_properties(WorkingDirectory4 PROPERTIES
-  PASS_REGULAR_EXPRESSION "Working directory: ${CMAKE_BINARY_DIR}"
+  PASS_REGULAR_EXPRESSION "Working directory: -->${CMAKE_BINARY_DIR}<--"
 )
 
 string(REGEX REPLACE "/[^/]*$" "" _parent_dir "${CMAKE_BINARY_DIR}")
 
 set_tests_properties(WorkingDirectory5 PROPERTIES
-  PASS_REGULAR_EXPRESSION "Working directory: ${_parent_dir}"
+  PASS_REGULAR_EXPRESSION "Working directory: -->${_parent_dir}<--"
 )
 
 string(REGEX REPLACE "/[^/]*$" "" _wd_exe "${CMAKE_BINARY_DIR}")
 get_filename_component(_default_cwd "${_wd_exe}" ABSOLUTE)
 
 set_tests_properties(WorkingDirectory6 PROPERTIES
-  PASS_REGULAR_EXPRESSION "Working directory: ${_default_cwd}"
+  PASS_REGULAR_EXPRESSION "Working directory: -->${_default_cwd}<--"
 )
diff --git a/Tests/TestsWorkingDirectory/main.cxx b/Tests/TestsWorkingDirectory/main.cxx
index e1c24ba..6a3a6be 100644
--- a/Tests/TestsWorkingDirectory/main.cxx
+++ b/Tests/TestsWorkingDirectory/main.cxx
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
   char buf[2048];
   const char *cwd = Getcwd(buf, sizeof(buf));
 
-  fprintf(stdout, "Working directory: %s\n", cwd);
+  fprintf(stdout, "Working directory: -->%s<--", cwd);
 
   return 0;
 }

-----------------------------------------------------------------------

Summary of changes:
 Tests/TestsWorkingDirectory/CMakeLists.txt |   26 +++++++++++++++-----------
 Tests/TestsWorkingDirectory/main.cxx       |    2 +-
 2 files changed, 16 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list