[CMake] Redefine target in nested project

Alexander Neundorf a.neundorf-work at gmx.net
Mon Apr 27 15:16:38 EDT 2009


On Monday 27 April 2009, Marcel Loose wrote:
> Hi all,
>
> I was wondering whether it's possible to somehow redefine an existing
> target within a nested project. Let me give an example.
>
> Suppose my CMake project has the following structure
>
> bigproject
>   subproject_1
>   subproject_2
>
> where bigproject, subproject_1 and subproject_2 are all CMake projects
> (i.e., their CMakeLists.txt files all contain a project() command).
>
> Now, suppose there's some generic target (e.g. 'check') that I would
> like to be defined for each of these projects, such that I can do
>
>   $ cd /path/to/build/directory/bigproject && make check
>
> but also
>
>   $ cd /path/to/build/directory/bigproject/subproject_1 && make check
>
> Is this possible at all?

Is it this issue ?
http://public.kitware.com/Bug/view.php?id=6348

Alex


More information about the CMake mailing list