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  2163549609422b71eed2cfc233d02de995209395 (commit)
       via  38dcdd76413c012a569eccb67c195f1d6840e2b8 (commit)
      from  576d01fed4c760cd20e702cf064d207173b9f845 (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=2163549609422b71eed2cfc233d02de995209395
commit 2163549609422b71eed2cfc233d02de995209395
Merge: 576d01f 38dcdd7
Author:     Craig Scott <craig.sc...@crascit.com>
AuthorDate: Fri Apr 6 23:46:55 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Fri Apr 6 19:47:07 2018 -0400

    Merge topic 'UseSWIG-bugfixes'
    
    38dcdd7641 UseSWIG: Ensure tests are usable in multi-config mode.
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1934


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38dcdd76413c012a569eccb67c195f1d6840e2b8
commit 38dcdd76413c012a569eccb67c195f1d6840e2b8
Author:     Marc Chevrier <marc.chevr...@sap.com>
AuthorDate: Thu Apr 5 12:09:53 2018 +0200
Commit:     Marc Chevrier <marc.chevr...@sap.com>
CommitDate: Thu Apr 5 12:09:53 2018 +0200

    UseSWIG: Ensure tests are usable in multi-config mode.
    
    Fixes: #17875

diff --git a/Tests/UseSWIG/BasicConfiguration.cmake 
b/Tests/UseSWIG/BasicConfiguration.cmake
index 7329856..d025d2a 100644
--- a/Tests/UseSWIG/BasicConfiguration.cmake
+++ b/Tests/UseSWIG/BasicConfiguration.cmake
@@ -2,6 +2,13 @@
 find_package(SWIG REQUIRED)
 include(${SWIG_USE_FILE})
 
+# Path separator
+if (WIN32)
+  set (PS "$<SEMICOLON>")
+else()
+  set (PS ":")
+endif()
+
 unset(SWIG_LANG_TYPE)
 unset(SWIG_LANG_INCLUDE_DIRECTORIES)
 unset(SWIG_LANG_DEFINITIONS)
diff --git a/Tests/UseSWIG/BasicPerl/CMakeLists.txt 
b/Tests/UseSWIG/BasicPerl/CMakeLists.txt
index 10c1cd8..476ef0e 100644
--- a/Tests/UseSWIG/BasicPerl/CMakeLists.txt
+++ b/Tests/UseSWIG/BasicPerl/CMakeLists.txt
@@ -8,15 +8,7 @@ set(language "perl")
 
 include (../BasicConfiguration.cmake)
 
-if (WIN32)
-  file (TO_CMAKE_PATH "$ENV{PATH}" perl_path)
-  string (REPLACE ";" "$<SEMICOLON>" perl_path "${perl_path}")
-  set (perl_env "PATH=$<TARGET_FILE_DIR:example>$<SEMICOLON>${perl_path}")
-else()
-  set (perl_env "LD_LIBRARY_PATH=$<TARGET_FILE_DIR:example>")
-endif()
-
 add_test (NAME BasicPerl
-  COMMAND "${CMAKE_COMMAND}" -E env "${perl_env}"
-  "${PERL_EXECUTABLE}" "-I$<TARGET_FILE_DIR:example>"
+  COMMAND "${PERL_EXECUTABLE}" "-I${CMAKE_CURRENT_BINARY_DIR}"
+                               "-I$<TARGET_FILE_DIR:example>"
   "${CMAKE_CURRENT_SOURCE_DIR}/../runme.pl")
diff --git a/Tests/UseSWIG/BasicPython/CMakeLists.txt 
b/Tests/UseSWIG/BasicPython/CMakeLists.txt
index 1ca4e25..cf1d821 100644
--- a/Tests/UseSWIG/BasicPython/CMakeLists.txt
+++ b/Tests/UseSWIG/BasicPython/CMakeLists.txt
@@ -9,5 +9,5 @@ set(language "python")
 include (../BasicConfiguration.cmake)
 
 add_test (NAME BasicPython
-  COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:example>"
+  COMMAND "${CMAKE_COMMAND}" -E env 
"PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}${PS}$<TARGET_FILE_DIR:example>"
   "${Python_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py")
diff --git a/Tests/UseSWIG/LegacyConfiguration.cmake 
b/Tests/UseSWIG/LegacyConfiguration.cmake
index 640c713..1acc05a 100644
--- a/Tests/UseSWIG/LegacyConfiguration.cmake
+++ b/Tests/UseSWIG/LegacyConfiguration.cmake
@@ -5,6 +5,13 @@ set (CMAKE_WARN_DEPRECATED FALSE)
 find_package(SWIG REQUIRED)
 include(${SWIG_USE_FILE})
 
+# Path separator
+if (WIN32)
+  set (PS "$<SEMICOLON>")
+else()
+  set (PS ":")
+endif()
+
 unset(SWIG_LANG_TYPE)
 if(${language} MATCHES python)
   find_package(PythonInterp REQUIRED)
diff --git a/Tests/UseSWIG/LegacyPerl/CMakeLists.txt 
b/Tests/UseSWIG/LegacyPerl/CMakeLists.txt
index 0def5f5..90d92f4 100644
--- a/Tests/UseSWIG/LegacyPerl/CMakeLists.txt
+++ b/Tests/UseSWIG/LegacyPerl/CMakeLists.txt
@@ -8,15 +8,7 @@ set(language "perl")
 
 include (../LegacyConfiguration.cmake)
 
-if (WIN32)
-  file (TO_CMAKE_PATH "$ENV{PATH}" perl_path)
-  string (REPLACE ";" "$<SEMICOLON>" perl_path "${perl_path}")
-  set (perl_env 
"PATH=$<TARGET_FILE_DIR:${SWIG_MODULE_example_REAL_NAME}>$<SEMICOLON>${perl_path}")
-else()
-  set (perl_env 
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:${SWIG_MODULE_example_REAL_NAME}>")
-endif()
-
 add_test (NAME LegacyPerl
-  COMMAND "${CMAKE_COMMAND}" -E env "${perl_env}"
-  "${PERL_EXECUTABLE}" "-I$<TARGET_FILE_DIR:${SWIG_MODULE_example_REAL_NAME}>"
+  COMMAND "${PERL_EXECUTABLE}" "-I${CMAKE_CURRENT_BINARY_DIR}"
+                               
"-I$<TARGET_FILE_DIR:${SWIG_MODULE_example_REAL_NAME}>"
   "${CMAKE_CURRENT_SOURCE_DIR}/../runme.pl")
diff --git a/Tests/UseSWIG/LegacyPython/CMakeLists.txt 
b/Tests/UseSWIG/LegacyPython/CMakeLists.txt
index 11a0d28..03facb1 100644
--- a/Tests/UseSWIG/LegacyPython/CMakeLists.txt
+++ b/Tests/UseSWIG/LegacyPython/CMakeLists.txt
@@ -9,5 +9,5 @@ set(language "python")
 include (../LegacyConfiguration.cmake)
 
 add_test (NAME LegacyPython
-  COMMAND "${CMAKE_COMMAND}" -E env 
"PYTHONPATH=$<TARGET_FILE_DIR:${SWIG_MODULE_example_REAL_NAME}>"
+  COMMAND "${CMAKE_COMMAND}" -E env 
"PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}${PS}$<TARGET_FILE_DIR:${SWIG_MODULE_example_REAL_NAME}>"
   "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py")
diff --git a/Tests/UseSWIG/ModuleVersion2/CMakeLists.txt 
b/Tests/UseSWIG/ModuleVersion2/CMakeLists.txt
index 92cbcd3..3f9d363 100644
--- a/Tests/UseSWIG/ModuleVersion2/CMakeLists.txt
+++ b/Tests/UseSWIG/ModuleVersion2/CMakeLists.txt
@@ -10,6 +10,12 @@ include(${SWIG_USE_FILE})
 find_package(Python2 REQUIRED COMPONENTS Interpreter Development)
 find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
 
+if (WIN32)
+  set (PS $<SEMICOLON>)
+else()
+  set (PS ":")
+endif()
+
 set (UseSWIG_MODULE_VERSION 2)
 unset(CMAKE_SWIG_FLAGS)
 
@@ -41,12 +47,6 @@ set_target_properties (example2 PROPERTIES
 target_link_libraries(example2 PRIVATE Python3::Python)
 
 
-if (WIN32)
-  set (PS $<SEMICOLON>)
-else()
-  set (PS ":")
-endif()
-
 add_test (NAME ModuleVersion2.example1
   COMMAND "${CMAKE_COMMAND}" -E env 
"PYTHONPATH=$<TARGET_PROPERTY:example1,SWIG_SUPPORT_FILES_DIRECTORY>${PS}$<TARGET_FILE_DIR:example1>"
   "${Python2_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py")
diff --git a/Tests/UseSWIG/MultipleModules/CMakeLists.txt 
b/Tests/UseSWIG/MultipleModules/CMakeLists.txt
index d495007..578825f 100644
--- a/Tests/UseSWIG/MultipleModules/CMakeLists.txt
+++ b/Tests/UseSWIG/MultipleModules/CMakeLists.txt
@@ -12,6 +12,13 @@ find_package(Python REQUIRED COMPONENTS Interpreter 
Development)
 find_package(Perl REQUIRED)
 find_package(PerlLibs REQUIRED)
 
+# Path separator
+if (WIN32)
+  set (PS "$<SEMICOLON>")
+else()
+  set (PS ":")
+endif()
+
 unset(CMAKE_SWIG_FLAGS)
 
 set_property(SOURCE "../example.i" PROPERTY CPLUSPLUS ON)
@@ -51,19 +58,11 @@ target_link_libraries(example2 PRIVATE ${PERL_LIBRARY})
 
 
 add_test (NAME MultipleModules.Python
-  COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:example1>"
+  COMMAND "${CMAKE_COMMAND}" -E env 
"PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/Python${PS}$<TARGET_FILE_DIR:example1>"
   "${Python_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py")
 
 
-if (WIN32)
-  file (TO_CMAKE_PATH "$ENV{PATH}" perl_path)
-  string (REPLACE ";" "$<SEMICOLON>" perl_path "${perl_path}")
-  set (perl_env "PATH=$<TARGET_FILE_DIR:example2>$<SEMICOLON>${perl_path}")
-else()
-  set (perl_env "LD_LIBRARY_PATH=$<TARGET_FILE_DIR:example2>")
-endif()
-
 add_test (NAME MultipleModules.Perl
-  COMMAND "${CMAKE_COMMAND}" -E env "${perl_env}"
-  "${PERL_EXECUTABLE}" "-I$<TARGET_FILE_DIR:example2>"
+  COMMAND "${PERL_EXECUTABLE}" "-I${CMAKE_CURRENT_BINARY_DIR}/Perl"
+                               "-I$<TARGET_FILE_DIR:example2>"
   "${CMAKE_CURRENT_SOURCE_DIR}/../runme.pl")
diff --git a/Tests/UseSWIG/MultiplePython/CMakeLists.txt 
b/Tests/UseSWIG/MultiplePython/CMakeLists.txt
index 260a382..a5e3eed 100644
--- a/Tests/UseSWIG/MultiplePython/CMakeLists.txt
+++ b/Tests/UseSWIG/MultiplePython/CMakeLists.txt
@@ -10,6 +10,13 @@ include(${SWIG_USE_FILE})
 find_package(Python2 REQUIRED COMPONENTS Interpreter Development)
 find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
 
+# Path separator
+if (WIN32)
+  set (PS "$<SEMICOLON>")
+else()
+  set (PS ":")
+endif()
+
 unset(CMAKE_SWIG_FLAGS)
 
 set_property(SOURCE "../example.i" PROPERTY CPLUSPLUS ON)
@@ -44,9 +51,9 @@ target_link_libraries(example2 PRIVATE Python3::Python)
 
 
 add_test (NAME MultiplePython.example1
-  COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:example1>"
+  COMMAND "${CMAKE_COMMAND}" -E env 
"PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/Python2${PS}$<TARGET_FILE_DIR:example1>"
   "${Python2_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py")
 
 add_test (NAME MultiplePython.example2
-  COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:example2>"
+  COMMAND "${CMAKE_COMMAND}" -E env 
"PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/Python3${PS}$<TARGET_FILE_DIR:example2>"
   "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py")

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

Summary of changes:
 Tests/UseSWIG/BasicConfiguration.cmake       |    7 +++++++
 Tests/UseSWIG/BasicPerl/CMakeLists.txt       |   12 ++----------
 Tests/UseSWIG/BasicPython/CMakeLists.txt     |    2 +-
 Tests/UseSWIG/LegacyConfiguration.cmake      |    7 +++++++
 Tests/UseSWIG/LegacyPerl/CMakeLists.txt      |   12 ++----------
 Tests/UseSWIG/LegacyPython/CMakeLists.txt    |    2 +-
 Tests/UseSWIG/ModuleVersion2/CMakeLists.txt  |   12 ++++++------
 Tests/UseSWIG/MultipleModules/CMakeLists.txt |   21 ++++++++++-----------
 Tests/UseSWIG/MultiplePython/CMakeLists.txt  |   11 +++++++++--
 9 files changed, 45 insertions(+), 41 deletions(-)


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

Reply via email to