-RM-229-MR-CMake won't find system installed cxxtest executable
When CxxTest is installed in /usr/bin and friends according to FHS and proper packaging our FindCxxTest.cmake script will fail:
0#11:49:29#math@voltaire# FiberClusteringToolbox/build/release >make [ 4%] [ 9%] [ 14%] Copying resources for ClusteringToolbox to build directory Copying resources for FiberClusteringToolbox_Global_linux to build directory Copying resources for FiberClusteringToolbox_Global to build directory [ 14%] Built target ResourceConfiguration_ClusteringToolbox [ 14%] Built target ResourceConfiguration_FiberClusteringToolbox_Global_linux [ 14%] Built target ResourceConfiguration_FiberClusteringToolbox_Global [ 90%] Built target ClusteringToolbox [ 95%] Generating unittest_WGaussProcess.cc make[2]: CXXTEST_PYTHON_TESTGEN_EXECUTABLE-NOTFOUND: Command not found make[2]: *** [unittest_WGaussProcess.cc] Error 127 make[1]: *** [CMakeFiles/unittest_WGaussProcess.dir/all] Error 2 make: *** [all] Error 2
As the script will not search in those paths:
find_path(CXXTEST_INCLUDE_DIR cxxtest/TestSuite.h) 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)
set(CXXTEST_INCLUDE_DIRS ${CXXTEST_INCLUDE_DIR})
However, there exists a new FindCxxTest.cmake script within the cmake-data debian package. Using this will succeed when outside of our build system. That means, just copying over to our code base will result in the following cmake error:
CMake Error at /home/math/repos/ow-modules/FiberClusteringToolbox/tools/cmake/FindCxxTest.cmake:170 (include): include could not find load file:/home/math/repos/ow-modules/FiberClusteringToolbox/tools/cmake/FindPackageHandleStandardArgs.cmake
Call Stack (most recent call first): /home/math/repos/ow-modules/FiberClusteringToolbox/tools/cmake/OpenWalnut.cmake:338 (FIND_PACKAGE) CMakeLists.txt:52 (INCLUDE)
So either we adapt the find script and replace the old one, or remove it. I suggest for adapting as removing it will leave systems with no such new cmake-data broken to unit test generation.
(from redmine: created on 2012-12-17, closed on 2012-12-20)