Re: [CMake] Ninja generator: skip checking of dependencies when building a target

2015-05-21 Thread Stephen Kelly
Taylor Braun-Jones wrote: > Does the CMake Ninja generator support a way to skip dependencies when > building a target? Something like the target_name/fast feature for the > Makefile generator? [1] I believe the last time that was raised was http://thread.gmane.org/gmane.comp.programming.tool

[CMake] (no subject)

2015-05-21 Thread Lucas . Pettey
Hello, I am trying to compile a code written in C, but using an external library that contains C++ functions. I am on a Cray system and everything works if I manually link with the cray CC wrapper. When I change the linker language with this command: set_property(TARGET adh PROPERTY LINKER_LAN

[CMake] Always build a source file

2015-05-21 Thread Gabriele Greco
Hi guys, I'm a long time lurker but I've never wrote here also if I'm using cmake since a few years. What is the clean way to enforce the compilation of a selected source file every time I build it (also if not changed)? I do it this way: add_custom_command(TARGET mytarget POST_BUILD

[CMake] Ninja generator: skip checking of dependencies when building a target

2015-05-21 Thread Taylor Braun-Jones
Does the CMake Ninja generator support a way to skip dependencies when building a target? Something like the target_name/fast feature for the Makefile generator? [1] Thanks, Taylor [1] http://www.cmake.org/Wiki/CMake_FAQ#Is_there_a_way_to_skip_checking_of_dependent_libraries_when_compiling.3F --

Re: [CMake] How to skip steps and use default values in ExternalProject_Add command?

2015-05-21 Thread Cedric Doucet
Thank you very much for your help, Petr! I will try it! Cheers, Cédric - Mail original - > De: "Petr Kmoch" > À: "Cedric Doucet" > Cc: cmake@cmake.org > Envoyé: Jeudi 21 Mai 2015 14:21:48 > Objet: Re: [CMake] How to skip steps and use default values in > ExternalProject_Add command?

Re: [CMake] How to skip steps and use default values in ExternalProject_Add command?

2015-05-21 Thread Petr Kmoch
No idea on this one. The trick I showed is "vanilla CMake," a direct consequence of the CMake parsing & string processing algorithm. What you're asking is about the internals of ExternalProject_Add, of which I know nothing. Petr On Thu, May 21, 2015 at 1:43 PM, Cedric Doucet wrote: > > Hi Petr!

Re: [CMake] How to skip steps and use default values in ExternalProject_Add command?

2015-05-21 Thread Cedric Doucet
Hi Petr! Thank you for the trick: it's very powerful! Does this mean that these two calls are equivalent if I write: set(the_configure_command CONFIGURE_COMMAND) ? ExternalProject_Add(${${LIBRARY}_LOWERNAME} PREFIX ${${LIBRARY}_PREFIX} URL ${${LIBRARY}_URL} ${the_configure_command} ) E

Re: [CMake] How to skip steps and use default values in ExternalProject_Add command?

2015-05-21 Thread Petr Kmoch
Hi Cedric. When doing things like that, remember that CMake's "named arguments" are arguments just like any other. So you can easily obtain them from variable expansion; something like this: if(${LIBRARY}_CONFIGURE_COMMAND) set(the_configure_command CONFIGURE_COMMAND ${${LIBRARY}_CONFIGURE_COMM

[CMake] How to skip steps and use default values in ExternalProject_Add command?

2015-05-21 Thread Cedric Doucet
Hello, I would like to loop on a list of libraries to download and install, by calling the ExternalProject_Add command for each of these libraries. To do that, I need to define some commands for each library, like CONFIGURE_COMMAND, BUILD_COMMAND and INSTALL_COMMAND. These commands may differ