[CMake] Out of Source CMakeLists
Ma O-Nigiri
ma at o-nigiri.me
Tue Jan 20 15:35:47 EST 2015
Thanks guys - you both hit on my fallback plan. I had a feeling it wouldn't
be trivial to get that working without actually adding some functionality
to cmake itself.
I'll just keep my builds out of tree so I don't interfere with the existing
build system!
Cheers
On Tue, Jan 20, 2015 at 12:00 PM, Gonzalo Garramuno <ggarra13 at gmail.com>
wrote:
> On 20/01/15 15:57, Ma O-Nigiri wrote:
>
>>
>> Is this possible? I tried fiddling with some of the path variables and it
>> didn't pan out.
>>
> I believe what you want is not possible. However, you can have:
>
> cmake/modules
> FindOpenEXR.cmake
> mytool
> CMakeLists.txt ( with add_subdirectory( src ) )
> src/
> CMakeLists.txt (with compilation directives )
> file.cpp
>
> To compile, you create a build directory, like:
> $ cd (root of project)
> $ mkdir build-linux64
> $ cd build-linux64
> $ cmake ..
> $ make && make install
>
> This keeps all the files that cmake creates out of your source tree.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150120/a75095d3/attachment.html>
More information about the CMake
mailing list