[Cmake-commits] CMake branch, next, updated. v3.6.2-2584-ga537a44

Brad King brad.king at kitware.com
Wed Sep 28 11:30:07 EDT 2016


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  a537a44bcfd45e3d21b696eb21e162bcf64f8b40 (commit)
       via  32ee69c56241e4991269a8d114339878363ead61 (commit)
      from  15b19da7315b135a6b0026024eed8b7a17851229 (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=a537a44bcfd45e3d21b696eb21e162bcf64f8b40
commit a537a44bcfd45e3d21b696eb21e162bcf64f8b40
Merge: 15b19da 32ee69c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 28 11:30:07 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Sep 28 11:30:07 2016 -0400

    Merge topic 'FindCxxTest-no-unix-interp' into next
    
    32ee69c5 FindCxxTest: Do not run cxxtestgen through interpreter unless necessary


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32ee69c56241e4991269a8d114339878363ead61
commit 32ee69c56241e4991269a8d114339878363ead61
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 28 11:25:54 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 28 11:27:20 2016 -0400

    FindCxxTest: Do not run cxxtestgen through interpreter unless necessary
    
    On platforms that support shebang lines the `cxxtestgen` script should
    be able to execute without an explicit interpreter.  Do this if possible
    so that the proper interpreter specified by the shebang line is honored.
    Ideally we shouldn't even need to find `python` in this case, but that
    will be a larger change better made by a dedicated module maintainer.
    
    Closes: #16331

diff --git a/Modules/FindCxxTest.cmake b/Modules/FindCxxTest.cmake
index 62489f9..9ba1ff3 100644
--- a/Modules/FindCxxTest.cmake
+++ b/Modules/FindCxxTest.cmake
@@ -58,7 +58,8 @@
 #        The test generator that is actually used (chosen using user preferences
 #        and interpreters found in the system)
 #    CXXTEST_TESTGEN_INTERPRETER (since CMake 2.8.3)
-#        The full path to the Perl or Python executable on the system
+#        The full path to the Perl or Python executable on the system, on
+#        platforms where the script cannot be executed using its shebang line.
 #
 #
 #
@@ -210,7 +211,13 @@ if(PYTHONINTERP_FOUND OR PERL_FOUND)
 
    if(PYTHONINTERP_FOUND AND (CXXTEST_USE_PYTHON OR NOT PERL_FOUND OR NOT DEFINED CXXTEST_USE_PYTHON))
       set(CXXTEST_TESTGEN_EXECUTABLE ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE})
-      set(CXXTEST_TESTGEN_INTERPRETER ${PYTHON_EXECUTABLE})
+      execute_process(COMMAND ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE} --version
+        OUTPUT_VARIABLE _CXXTEST_OUT ERROR_VARIABLE _CXXTEST_OUT RESULT_VARIABLE _CXXTEST_RESULT)
+      if(_CXXTEST_RESULT EQUAL 0)
+        set(CXXTEST_TESTGEN_INTERPRETER "")
+      else()
+        set(CXXTEST_TESTGEN_INTERPRETER ${PYTHON_EXECUTABLE})
+      endif()
       FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG
           CXXTEST_INCLUDE_DIR CXXTEST_PYTHON_TESTGEN_EXECUTABLE)
 

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

Summary of changes:
 Modules/FindCxxTest.cmake |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list