[CMake] Troubles with add_subdirectory

Pierre-Julien Villoud PVilloud at movea.com
Tue Jul 7 04:33:59 EDT 2009


Hi everyone

I have three projects with their CMakeLists.txt and I would like to create a top CMakeLists.txt. So I do this :

cmake_minimum_required(VERSION 2.6)

add_subdirectory(Project1)
add_subdirectory(Project2)
add_subdirectory(Project3)

Note that in each CMakeLists.txt of the three projects, I include a file with generic rules.

At the top, the cmake is fine but when I run make :

Project1\CMakeFiles\ Project1.dir\build.make:43: CMakeFiles/ Project1.dir/depend.make: No such file or directory
Project1\CMakeFiles\ Project1.dir\build.make:46: CMakeFiles/ Project1.dir/progress.make: No such file or directory
Project1\CMakeFiles\ Project1.dir\build.make:49: CMakeFiles/ Project1.dir/flags.make: No such file or directory

Anyone see what's wrong ?

Another thing that has nothing to do with this, When I choose the Visual Studio 8 generator, it outputs a project by target. Is there any way to exclude some targets so they don't have a project ?

Thanks in advance

Pierre-Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090707/cca37a72/attachment-0001.htm>


More information about the CMake mailing list