[CMake] Re: Why can't INSTALL(TARGET ...) find an executable that CMake built?e

Christian Convey christian.convey at gmail.com
Mon Jul 30 16:45:24 EDT 2007


On 7/30/07, Alexander Neundorf <a.neundorf-work at gmx.net> wrote:
>
> > When I ran "make install" repeatedly (any number of times), it always
> > fails.
>
> I can't reproduce this.
> Which version of cmake are you using ?

cjc at peace:~$ cmake --version
cmake version 2.4-patch 6

> Which steps do I have to execute to see the problem ?

Here's what I do:

cjc at peace:~$ mkdir p q
cjc at peace:~$ cd p
cjc at peace:~/p$ tar xf ../cjc-broken-install1.tar
cjc at peace:~/p$ cd ../q
cjc at peace:~/q$ ccmake ../p/cjc-broken-install1/


cjc at peace:~/q$ make install
Scanning dependencies of target MyLib
[ 50%] Building CXX object MyLib/CMakeFiles/MyLib.dir/foo1.o
Linking CXX static library libMyLib.a
[ 50%] Built target MyLib
Scanning dependencies of target MyApp
[100%] Building CXX object MyApp/CMakeFiles/MyApp.dir/hello.o
Linking CXX executable MyApp
[100%] Built target MyApp
Linking CXX executable CMakeFiles/CMakeRelink.dir/MyApp
Install the project...
-- Install configuration: ""
-- Install configuration: ""
-- Install configuration: ""
-- Installing /usr/local/bin/MyApp
CMake Error: Error in cmake code at
/home/cjc/q/MyApp/cmake_install.cmake:30:
FILE INSTALL cannot copy file
"/home/cjc/q/MyApp/CMakeFiles/CMakeRelink.dir/MyApp" to
"/usr/local/bin/MyApp".
Current CMake stack:
/home/cjc/q/cmake_install.cmake;/home/cjc/q/MyApp/cmake_install.cmake
make: *** [install] Error 255


More information about the CMake mailing list