[CMake] CMake generated makefiles try to build a target that
does not exist (make[2]: *** No rule to make target ...)
Brad King
brad.king at kitware.com
Fri Oct 6 16:10:00 EDT 2006
Bill Tonkin wrote:
> The short story is that the CMake generated makefiles try to build a target
> that seems to exist, but with a slightly different name.
>
> make[2]: *** No rule to make target
> `../../libraries/my_a/CMakeFiles/my_a.di
> r/build'.
[snip]
> The content of CMakeLists.txt [1] is:
>
> project (my_one)
> set (my_a_dir ../../libraries/my_a)
> add_subdirectory (${my_one_SOURCE_DIR}/${my_a_dir}
> ${my_one_BINARY_DIR}/${my_a_dir})
> include_directories (${my_one_SOURCE_DIR}/${my_a_dir})
> link_directories (${my_one_BINARY_DIR}/${my_a_dir})
> add_executable (my_one_exe main.C)
> target_link_libraries (my_one_exe my_a)
[snip]
> Is this a bug? Any ideas how on what I should do?
Yes, but I think it has been fixed in the CVS version. The fix will be
in release 2.4.4. Please try building CMake from an anonymous CVS
checkout and try it to make sure it works.
Thanks,
-Brad
More information about the CMake
mailing list