[CMake] CPack, MinGW, strip

Eric Noulard eric.noulard at gmail.com
Wed Feb 2 09:21:00 EST 2011


2011/2/2 Peter Kümmel <syntheticpp at gmx.net>:
> On 02.02.2011 13:43, Eric Noulard wrote:
>>
>> 2011/2/2 Peter Kümmel<syntheticpp at gmx.net>:
>>>
>>> CMake 2.8.3:
>>>
>>> When I install with "mingw32-make install/strip"
>>> the installed files are stripped.
>>>
>>> But when I set CPACK_STRIP_FILES to 1 and
>>> use NSIS with "mingw32-make package" the binaries
>>> are not stripped.
>>>
>>> CPackConfig.cmake looks correct:
>>>
>>> SET(CPACK_BINARY_NSIS "ON")
>>> ...
>>> SET(CPACK_CMAKE_GENERATOR "MinGW Makefiles")
>>> ...
>>> SET(CPACK_STRIP_FILES "1")
>>>
>>>
>>> Is this a bug, or is there a simple fix.
>>
>> Should work for any generator.
>> Could you try with a fresh clean build tree?
>>
>> Would you try with ZIP or any other CPack generator?
>>
>> Could you confirm you are on Windows?
>>
>> Would you be able to give 2.8.4-rc2 a try?
>> http://www.cmake.org/files/v2.8/?C=M;O=D
>> (to be sure the problem is there too).
>
> Tried on Windows with master and a fresh clean build and
> it is still there.
>
> The problem is a missing slash in the generated install rule
> in cmake_install.cmake:
>
>    IF(CMAKE_INSTALL_DO_STRIP)
>      EXECUTE_PROCESS(COMMAND ".../strip.exe"
> "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}...")
>    ENDIF(CMAKE_INSTALL_DO_STRIP)
>
>
> DESTDIR is a path without a slash at the end.
>
> Attached patch helps, but I don't know if this ts the right place to add the
> fix.
> Better would be when the if checks if the unpacked variable starts with a
> slash.
> Or maybe checking CPACK_TEMPORARY_INSTALL_DIRECTORY?


Thank you for the analysis and patch.
I won't personnally be able to handle right now.
Woud you be kind enough to file a bug report  and attach your patch to
the new bug entry ?
That way the bug can be properly tracked and may be assigned to
someone else right away.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list