[CMake] Install skips some targets

Petri Hodju petrihodju at yahoo.com
Tue Oct 7 07:41:07 EDT 2008


Hi,

I have put together a simple build system of which I have attached to this mail a small sample. The sample builds two binaries (bin1 & bin2) and two libraries (lib1 & lib2) so that bin1 depends on lib1, bin2 depends on lib2, and lib1 depends on lib2.

The build phase goes just fine but the installation step skips the bin1 and lib1 installation and I can't figure out why this happens. Following is the output of the build & install process.

Br,
Petri Hodju

----8<----8<----8<----8<----

host:~/misc/code/buildsys/make/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- add_bin_dirs:
--  + /home/pho/misc/code/buildsys/make/../src/bin/bin1
--  + /home/pho/misc/code/buildsys/make/../src/bin/bin2
-- add_lib_dirs:
--  + /home/pho/misc/code/buildsys/make/../src/lib/lib1
--  + /home/pho/misc/code/buildsys/make/../src/lib/lib2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pho/misc/code/buildsys/make/build
host:~/misc/code/buildsys/make/build$ make
Scanning dependencies of target lib2hdrs
[  0%] ln -sf /home/pho/misc/code/buildsys/src/lib/lib2/lib2.h /home/pho/misc/code/buildsys/make/../inc/lib2.h
[ 16%] Built target lib2hdrs
Scanning dependencies of target lib2
[ 33%] Building CXX object /home/pho/misc/code/buildsys/lib/CMakeFiles/lib2.dir/lib2.cc.o
Linking CXX shared library liblib2.so
[ 33%] Built target lib2
Scanning dependencies of target bin2
[ 50%] Building CXX object /home/pho/misc/code/buildsys/bin/CMakeFiles/bin2.dir/bin2.cc.o
Linking CXX executable bin2
[ 50%] Built target bin2
Scanning dependencies of target lib1hdrs
[ 50%] ln -sf /home/pho/misc/code/buildsys/src/lib/lib1/lib1.h /home/pho/misc/code/buildsys/make/../inc/lib1.h
[ 66%] Built target lib1hdrs
Scanning dependencies of target lib1
[ 83%] Building CXX object /home/pho/misc/code/buildsys/lib/CMakeFiles/lib1.dir/lib1.cc.o
Linking CXX shared library liblib1.so
[ 83%] Built target lib1
Scanning dependencies of target hdr
[ 83%] Built target hdr
Scanning dependencies of target lib
[ 83%] Built target lib
Scanning dependencies of target bin1
[100%] Building CXX object /home/pho/misc/code/buildsys/bin/CMakeFiles/bin1.dir/bin1.cc.o
Linking CXX executable bin1
[100%] Built target bin1
Scanning dependencies of target bin
[100%] Built target bin
Scanning dependencies of target project
[100%] Built target project
host:~/misc/code/buildsys/make/build$ make install
[ 16%] Built target lib2hdrs
[ 33%] Built target lib2
[ 50%] Built target bin2
[ 66%] Built target lib1hdrs
[ 83%] Built target lib1
[ 83%] Built target hdr
[ 83%] Built target lib
[100%] Built target bin1
[100%] Built target bin
[100%] Built target project
Install the project...
-- Install configuration: ""
-- Installing: /home/pho/misc/code/buildsys/make/../ins/bin/bin2
-- Set runtime path of "/home/pho/misc/code/buildsys/make/../ins/bin/bin2" to "/home/pho/misc/code/buildsys/make/../ins/lib"
-- Up-to-date: /home/pho/misc/code/buildsys/make/../ins/bin/bin2
-- Installing: /home/pho/misc/code/buildsys/make/../ins/lib/liblib2.so
-- Set runtime path of "/home/pho/misc/code/buildsys/make/../ins/lib/liblib2.so" to "/home/pho/misc/code/buildsys/make/../ins/lib"
-- Up-to-date: /home/pho/misc/code/buildsys/make/../ins/lib/liblib2.so
host:~/misc/code/buildsys/make/build$   

----8<----8<----8<----8<----






      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081007/784b1073/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildsys.tar.gz
Type: application/gzip
Size: 3279 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081007/784b1073/attachment.bin>


More information about the CMake mailing list