> CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
> PROJECT(PREFIX C)
> SET(CMAKE_VERBOSE_MAKEFILE ON)
> ADD_LIBRARY(f SHARED f.c)
> INSTALL(TARGETS f
> RUNTIME DESTINATION bin
> LIBRARY DESTINATION lib
> ARCHIVE DESTINATION lib)
>
> with ${CMAKE_SOURCE_DIR}/f.c containing just "void f(void){}". After
> configuring/building/installing, a reconfiguration with a modified
> CMAKE_INSTALL_PREFIX does not result in recompiling or relinking.
Hi Michael,
In you simple example adding SET(CMAKE_INSTALL_RPATH
"${CMAKE_INSTALL_PREFIX}/lib") before ADD_LIBRARY(...) does trigger a re-build
of the library when changing the length of CMAKE_INSTALL_PREFIX. The reason for
this behavior was given by Alex Neundorf:
> Then you set the install RPATH once to "/build/mato/ROOT/install/lib" and
> then
> to "/build/mato/ROOT/install2/lib", which is one byte longer. So the binary
> has to be created again with one byte more room for the install RPATH.
The fact that the build is re-done because I change the length of the
installation destination I would call this a bug and not really a feature.
-------------------------------------------------------------
Pere Mato CERN, PH Department, CH 1211 Geneva 23, Switzerland
e-mail: [email protected] tel: +41 22 76 78696
fax: +41 22 76 68792 gsm: +41 76 48 70855
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake