[CMake] CMake generated makefiles try to build a target that does not exist (make[2]: *** No rule to make target ...)

Bill Tonkin wmt at clinton.com
Fri Oct 6 16:18:33 EDT 2006


Brad,

I will give the CVS sources a try and report back.  Thank you for your help.

Best Regards,
Bill

-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com]
Sent: Friday, October 06, 2006 4:10 PM
To: Bill Tonkin
Cc: cmake at cmake.org
Subject: Re: [CMake] CMake generated makefiles try to build a target
that does not exist (make[2]: *** No rule to make target ...)


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