Re: [CMake] CMake generator executable variable

2016-06-22 Thread Patrick Boettcher
Hi Petr, On Wed, 22 Jun 2016 16:52:17 +0200 Petr Kmoch wrote: > Hi Patrick. > > If the "subproject" is also CMake-generated, as you say, the best way > to build it would be: > > add_custom_target(build-app > COMMAND ${CMAKE_COMMAND} --build #... other options as > appropriate ) > > You

Re: [CMake] CMake generator executable variable

2016-06-22 Thread Petr Kmoch
Hi Patrick. If the "subproject" is also CMake-generated, as you say, the best way to build it would be: add_custom_target(build-app COMMAND ${CMAKE_COMMAND} --build #... other options as appropriate ) You might also have to set the WORKING_DIRECTORY. This should give you a generator-agnos

[CMake] CMake generator executable variable

2016-06-22 Thread Patrick Boettcher
Hi list, In my project some people use Ninja as a generator, some use GNU Make. In a part of my projects I have a add_custom_command() which runs, for convenience, the build of another cmake-generated project in another dir using a different set of compilers (which is the reason for not being a s