[CMake] INSTALL command doesn't behave as documented
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Sat Aug 19 13:02:12 EDT 2006
On 2006-08-19 09:45+0200 Thomas Arcila wrote:
> Hi,
>
> I've just found a bug. Documentation states that RENAME is allowed for
> PROGRAMS
> while it's actually refused by CMake.
> I've made my way making the renaming before the installation
> (using CONFIGURE_FILE(COPYONLY) I don't know if it's the right way)
> but I think that's important to be able to install under a different name.
I confirm this bug with CMake 2.4.3 built and run on Linux (Debian stable).
software at chickadee> ls
CMakeLists.txt test.dat
software at chickadee> cat CMakeLists.txt
project(test)
install(PROGRAMS test.dat DESTINATION ${CMAKE_BINARY_DIR}/install
RENAME test_renamed.dat)
software at chickadee> cmake .
-- Check for working C compiler: gcc
-- Check for working C compiler: gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: c++
-- Check for working CXX compiler: c++ -- works
-- Configuring done
-- Generating done
-- Build files have been written to: /home/software/plplot_cvs/HEAD/test_cmake
software at chickadee> make install
Install the project...
-- Install configuration: ""
CMake Error: Error in cmake code at
/home/software/plplot_cvs/HEAD/test_cmake/cmake_install.cmake:30:
FILE INSTALL option RENAME may be used only with FILES.
Current CMake stack:
/home/software/plplot_cvs/HEAD/test_cmake/cmake_install.cmake
make: *** [install] Error 255
Thomas, as a temporary workaround for this bug you can use install(FILES ...
) instead. RENAME works fine for me in that case.
install(FILES ... ) is documented as identical to install(PROGRAMS .... )
except for the default permissions which you can override to be what you
need for executables.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list