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, master has been updated
       via  8542152626590db6a13b20aa3d36214186c6b40d (commit)
       via  a9428fc473ca6eff749bd9868e2caabf7f84cc39 (commit)
       via  e27437d0e0180fc03c44621b0918b559ee393efb (commit)
      from  bf64e50da4a36e17ea0e27a45a5277226e123210 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8542152626590db6a13b20aa3d36214186c6b40d
commit 8542152626590db6a13b20aa3d36214186c6b40d
Merge: bf64e50 a9428fc
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Apr 19 11:23:36 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Fri Apr 19 07:23:48 2019 -0400

    Merge topic 'test-find_package-resolve-symlinks'
    
    a9428fc473 Tests: Fix FindPackageTest when path to source has a symlink
    e27437d0e0 Tests/FindPackageTest: Tell Git to ignore temporary symlink path
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !3244


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9428fc473ca6eff749bd9868e2caabf7f84cc39
commit a9428fc473ca6eff749bd9868e2caabf7f84cc39
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Apr 18 16:01:33 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Apr 18 16:01:33 2019 -0400

    Tests: Fix FindPackageTest when path to source has a symlink
    
    Exclude a portion of the test that does not work in this case.

diff --git a/Tests/FindPackageTest/CMakeLists.txt 
b/Tests/FindPackageTest/CMakeLists.txt
index 972580c..6c876a7 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -205,15 +205,20 @@ if(UNIX)
     message(SEND_ERROR "SetFoundResolved_DIR set by find_package() is set to 
\"${SetFoundResolved_DIR}\" (expected \"${SetFoundResolved_EXPECTED}\")")
   endif()
 
-  # Resolve symlinks when finding the package.
-  set(CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS TRUE)
-  set(SetFoundResolved_DIR "")
-  find_package(SetFoundResolved)
-  # ./symlink points back here so it should be gone when resolved.
-  set(SetFoundResolved_EXPECTED "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
-  if(NOT "${SetFoundResolved_DIR}" STREQUAL "${SetFoundResolved_EXPECTED}")
-    message(SEND_ERROR "SetFoundResolved_DIR set by find_package() is set to 
\"${SetFoundResolved_DIR}\" (expected \"${SetFoundResolved_EXPECTED}\")")
+  # This part of the test only works if there are no symlinks in our path.
+  get_filename_component(real_src_dir "${CMAKE_CURRENT_SOURCE_DIR}" REALPATH)
+  if(real_src_dir STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+    # Resolve symlinks when finding the package.
+    set(CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS TRUE)
+    set(SetFoundResolved_DIR "")
+    find_package(SetFoundResolved)
+    # ./symlink points back here so it should be gone when resolved.
+    set(SetFoundResolved_EXPECTED "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+    if(NOT "${SetFoundResolved_DIR}" STREQUAL "${SetFoundResolved_EXPECTED}")
+      message(SEND_ERROR "SetFoundResolved_DIR set by find_package() is set to 
\"${SetFoundResolved_DIR}\" (expected \"${SetFoundResolved_EXPECTED}\")")
+    endif()
   endif()
+
   # Cleanup.
   unset(CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS)
   file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/symlink")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e27437d0e0180fc03c44621b0918b559ee393efb
commit e27437d0e0180fc03c44621b0918b559ee393efb
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Apr 18 16:00:50 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Apr 18 16:00:50 2019 -0400

    Tests/FindPackageTest: Tell Git to ignore temporary symlink path

diff --git a/Tests/FindPackageTest/.gitignore b/Tests/FindPackageTest/.gitignore
new file mode 100644
index 0000000..3aaef13
--- /dev/null
+++ b/Tests/FindPackageTest/.gitignore
@@ -0,0 +1 @@
+/symlink

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

Summary of changes:
 Tests/FindPackageTest/.gitignore     |  1 +
 Tests/FindPackageTest/CMakeLists.txt | 21 +++++++++++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)
 create mode 100644 Tests/FindPackageTest/.gitignore


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to