[cmake-developers] Test suite broken if PackageMaker not installed in default location
Nicolas Desprès
nicolas.despres at gmail.com
Tue May 1 13:50:58 EDT 2012
On Tue, May 1, 2012 at 5:51 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
> 2012/5/1 David Cole <david.cole at kitware.com>:
>>>
>>> That's what I saw actually, but mine was not in the list. Setting
>>> CPACK_INSTALLER_PROGRAM as in line 390 does not help because the it is
>>> not "transfered" to the test project.
>>>
>>> Is there a robust way to tell cmake where is installed PackageMaker if
>>> it is not installed in one of the searched paths?
>>>
>>
>> Not yet, but we can definitely fix that moving forward.
>
> Some CPack generators assumes some commands are found.
> RPM assumes rpmbuild
> NSIS assumes makensis
> PackageMaker assumes PackageMaker
>
> simply testing the system (APPLE, LINUX, Windows...) may not be enough
> or even worse (or better depending on your opinion), some people
> may want to uses some unusual packager on particular system
> like using DEB or RPM on MacOS:
> see http://public.kitware.com/Bug/view.php?id=13064
>
> Some tests in CMake source tree already checks that the required tool
> is found **before** adding the test but it causes code duplication.
> (because users may have to do the very same check in their project)
> so may be we need something like:
>
> cpack -G <GEN> --check-only that would verify that the <GEN>
> CPack generator may be run?
Why not creating a CMakeFindPackageMaker.cmake instead of making it
built-in the C++ code? Most of the other "build tools" required by
cmake already have their module like: CMakeUnixFindMake.cmake,
CMakeFindXCode.cmake, CMakeNinjaFindMake.cmake, etc...
>
> Concerning a way to make CPACK_INSTALLER_PROGRAM be
> transmitted to the test, it's possible if we define a CPack Project Config file
> template for this test and forward the definition of CPACK_INSTALLER_PROGRAM
> done at CMake time (using configure_file on the CPack project config
> file) to CPack time.
>
That's a good idea. Also, if not found the CPACK_INSTALLER_PROGRAM is
not set to NOT-FOUND. Using a module as I suggested above could give
use a variable to set via the GUI.
Thanks,
-Nico
More information about the cmake-developers
mailing list