[CMake] Fwd: Executable in the main directory

Eric Noulard eric.noulard at gmail.com
Wed Feb 2 16:42:18 EST 2011


Forgot the list initially


---------- Forwarded message ----------
From: Eric Noulard <eric.noulard at gmail.com>
Date: 2011/2/2
Subject: Re: [CMake] Executable in the main directory
To: Enrique Izaguirre <enrique.izaguirre at gmail.com>


2011/2/2 Enrique Izaguirre <enrique.izaguirre at gmail.com>:
> Hello,
>
> Is it possible to create an executable in your top directory if you don't
> have there any program? I mean, if all your programs .c and .cpp are in
> subdirectories contained in your top directory, each one with its own
> CMakeLists.txt.
>  I have three subdirectories, and all my programs are in these
> subdirectories. I don't have any in my main directory, but the executable
> should be created in the main directoy. Is it possible? How?

Yes you can.

You can control the output directory for executable/library using
EXECUTABLE_OUTPUT_PATH
and/or
LIBRARY_OUTPUT_PATH
see;
http://www.cmake.org/Wiki/CMake_Useful_Variables



More information about the CMake mailing list