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 sub_directory).

  add_custom_target(build-app
      COMMAND make -C ${APP_BUILD_DIR})

This fails of course if the user decided to use ninja.

We can assume that the caller's build is always using the same generator
as the callee's one.

I know there is CMAKE_GENERATOR - I could do it with 'IF()', but is
there a variable carrying the generator-command which I can use to
replace the bare 'make'?

Thank you in advance.

regards,
--
Patrick.



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to