[CMake] FindCxxTest doesn't look in CXXTEST_INCLUDE_DIR for helper executables (patch included)

Tyler Roscoe tyler at cryptio.net
Mon Mar 2 18:33:10 EST 2009


FindCxxTest is a simple module. Other than a helper macro, it mostly
just does:

find_path(CXXTEST_INCLUDE_DIR cxxtest/TestSuite.h)
find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl)
find_program(CXXTEST_PYTHON_TESTGEN_EXECUTABLE cxxtestgen.py)

It figures out where CxxTest is installed, but then it doesn't use this
information to help CMake locate the helper scripts. 

This seems like a bug to me. Should I open an issue in the tracker?

I've also written a (so simple that I can do it) patch to fix the issue
(included inline below). Should I attach the patch to the issue?

Thanks,
tyler


--- FindCxxTest.cmake.orig-tmr  2009-03-02 15:23:36.000000000 -0800
+++ FindCxxTest.cmake   2009-03-02 15:25:31.000000000 -0800
@@ -120,8 +120,8 @@
 #=============================================================

 find_path(CXXTEST_INCLUDE_DIR cxxtest/TestSuite.h)
-find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl)
-find_program(CXXTEST_PYTHON_TESTGEN_EXECUTABLE cxxtestgen.py)
+find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl PATHS ${CXXTEST_INCLUDE_DIR})
+find_program(CXXTEST_PYTHON_TESTGEN_EXECUTABLE cxxtestgen.py PATHS ${CXXTEST_INCLUDE_DIR})

 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG CXXTEST_INCLUDE_DIR)



More information about the CMake mailing list