From 36c3f31c63eb121093234db5f0b5b21cc3774c67 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Fri, 16 Mar 2012 23:28:56 +0200 Subject: [PATCH] Add support for CxxTest 4 in FindCxxTest. Backport a patch backport_support_cxxtest4.diff from cmake master. (Closes: #662982) --- debian/changelog | 3 ++ debian/patches/backport_support_cxxtest4.diff | 42 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 46 insertions(+) create mode 100644 debian/patches/backport_support_cxxtest4.diff diff --git a/debian/changelog b/debian/changelog index 3e740b952..570c84744 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ cmake (2.8.7-4) UNRELEASED; urgency=low able to properly find ruby 1.9.1 as packaged in Debian now. (Closes: #643949) Patch: backport_findruby_improvements.diff + * Add support for CxxTest 4 in FindCxxTest (backport a patch from cmake + master). (Closes: #662982) Thanks to Simone Rossetto. + Patch: backport_support_cxxtest4.diff -- Modestas Vainius Fri, 16 Mar 2012 22:10:41 +0200 diff --git a/debian/patches/backport_support_cxxtest4.diff b/debian/patches/backport_support_cxxtest4.diff new file mode 100644 index 000000000..a8479d4bf --- /dev/null +++ b/debian/patches/backport_support_cxxtest4.diff @@ -0,0 +1,42 @@ +From: Droscy +From: Simone Rossetto +Subject: FindCxxTest: Add support for CxxTest 4 (#13022) +Bug: http://public.kitware.com/Bug/view.php?id=13022 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662982 +Forwarded: yes +Origin: backport, commit:a556137608ac63318183c957c0c3f221fc943017 +Applied-Upstream: 2.8.8 +Last-Update: 2012-03-07 + +In CxxTest version 4 the Perl generator has been deleted and the +Python generator is installed without the ".py" extension. + +--- a/Modules/FindCxxTest.cmake ++++ b/Modules/FindCxxTest.cmake +@@ -9,6 +9,7 @@ + # Only used in the case both Python & Perl + # are detected on the system to control + # which CxxTest code generator is used. ++# Valid only for CxxTest version 3. + # + # NOTE: In older versions of this Find Module, + # this variable controlled if the Python test +@@ -159,7 +160,8 @@ find_package(PythonInterp QUIET) + find_package(Perl QUIET) + + find_path(CXXTEST_INCLUDE_DIR cxxtest/TestSuite.h) +-find_program(CXXTEST_PYTHON_TESTGEN_EXECUTABLE cxxtestgen.py ++find_program(CXXTEST_PYTHON_TESTGEN_EXECUTABLE ++ NAMES cxxtestgen cxxtestgen.py + PATHS ${CXXTEST_INCLUDE_DIR}) + find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl + PATHS ${CXXTEST_INCLUDE_DIR}) +@@ -167,7 +169,7 @@ find_program(CXXTEST_PERL_TESTGEN_EXECUT + if(PYTHONINTERP_FOUND OR PERL_FOUND) + include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) + +- if(PYTHONINTERP_FOUND AND (CXXTEST_USE_PYTHON OR NOT 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}) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG diff --git a/debian/patches/series b/debian/patches/series index 87fbee995..aa056713b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ mipsel_is_little_endian.diff paths_in_regex_espace_metachars.diff backport_findpython_fixes.diff backport_findruby_improvements.diff +backport_support_cxxtest4.diff