Re: [CMake] CMAKE_COLOR_MAKEFILE

2015-06-09 Thread Iosif Neitzke
The CMake variable CMAKE_COLOR_MAKEFILE sets the preference to generate a colored Makefile at Configure time. At Build time, regardless if CMAKE_COLOR_MAKEFILE=ON, you can use 'make COLOR=0' to turn off Makefile color dynamically. Running through cmake with 'cmake --build -- COLOR=0' does the s

Re: [CMake] getting a build parameter from a file

2015-06-09 Thread Dave Yost
> On 2015-06-09, at 8:05 AM, David Cole wrote: > > Why not just use configure_file because I didn’t know about it. Thanks! > to write ${metals} into the file... > configure_file only actually touches/writes-to/updates the file if the > contents are different... > > Then you can just depend on

[CMake] CMAKE_COLOR_MAKEFILE

2015-06-09 Thread Dave Yost
Hey, I love colors. But one of my users doesn’t. Why doesn’t this work? CMAKE_COLOR_MAKEFILE=OFF cmake .. If that worked, he could set it and forget it. Instead, he has to do this: cmake -DCMAKE_COLOR_MAKEFILE=OFF .. -- Powered by www.kitware.com Please keep messages on-topic and check the CM

Re: [CMake] Migrating from another build system that maintains its own source file lists

2015-06-09 Thread Kevin Houlihan
>From Alan's suggestions and some fiddling here's the solution I came up with to the problem I posted a while back. Seems to work. (I have no idea what the etiquette is on a mailing list like this for posting chunks of code so just tell me if I'm doing anything wrong.) The problem is that there's

Re: [CMake] determining which system headerfile provides a given function

2015-06-09 Thread René J . V . Bertin
Ok, let me rephrase the question to see what other kind of constructive answers that'll lead to: how does one check which header file provides the prototype for a function from the system libraries? Function in question: reallocf; can apparently be in either stdlib.h or bsd/stdlib.h . -- Pow

Re: [CMake] determining which system headerfile provides a given function

2015-06-09 Thread Stephen Kelly
René J.V. Bertin wrote: > Hello, > > I need to determine the availability of a certain function (reallocf) and > which headerfile provides its prototype. If there is a function that > handles this case I must have overlooked it (including on google), so I > tried repeating a check_symbol_exist()

Re: [CMake] Backup copy on install?

2015-06-09 Thread Bill Hoffman
On 6/9/2015 1:56 PM, Chris Johnson wrote: We do use a globally included set of CMake rules in all of our CMakeLists.txt files, so if there's a bit of code that could be added there, that would be sufficient. All suggestions welcome! You might be able to do something with install(CODE ...) At

[CMake] determining which system headerfile provides a given function

2015-06-09 Thread René J . V . Bertin
Hello, I need to determine the availability of a certain function (reallocf) and which headerfile provides its prototype. If there is a function that handles this case I must have overlooked it (including on google), so I tried repeating a check_symbol_exist() call repeatedly with the various k

[CMake] Backup copy on install?

2015-06-09 Thread Chris Johnson
About a year ago we converted our build system, which used a huge pile of custom Makefile code, to use CMake. It has been working well for us. But now, the boss (who dabbles at the command line) and a couple of the developers are asking for a "feature" which went away with that conversion. Namel

Re: [CMake] Visual Studio Project System Extensibilty

2015-06-09 Thread Parag Chandra
Somewhat related: CLion, the new C/C++ IDE from JetBrains, uses CMake directly as its project system: https://www.jetbrains.com/clion/ Not free, but also cross-platform. Parag Chandra Senior Software Engineer, Mobile Team Mobile: +1.919.824.1410 [https://www.ionicsecurity.com/IonicSigHz.png]<

Re: [CMake] Visual Studio Project System Extensibilty

2015-06-09 Thread Nagy-Egri Máté Ferenc via CMake
I’m curious too, but I think that it would be easier to use a fixed format for project representation, such as the suggested CPS, and have it generate a CMake file if an update is needed. CMake generally lacks any kind of structure, users are generally free to roam about the script language. Q

Re: [CMake] install(TARGETS) does not work with configuration-specific destinations

2015-06-09 Thread David Cole via CMake
Updating the documentation for this would help... Do you have time to propose a patch which updates the wording of the documentation to stress the importance of parameter ordering? On Tue, Jun 9, 2015 at 4:31 AM, Alessio wrote: > Ah! Specifying the CONFIGURATIONS argument *before* the DESTINATI

Re: [CMake] getting a build parameter from a file

2015-06-09 Thread David Cole via CMake
Why not just use configure_file to write ${metals} into the file... configure_file only actually touches/writes-to/updates the file if the contents are different... Then you can just depend on that file and you don't need a separate timestamp file. HTH, David C. On Tue, Jun 9, 2015 at 1:05 AM,

Re: [CMake] add_custom_command and variable arguments

2015-06-09 Thread Nils Gladitz
On 06/09/2015 01:40 PM, Roman Savchenko wrote: I whant to add custom command in such way: add_custom_target(my_target) add_custom_command(TARGET my_target POST_BUILD COMMAND script ${LIST}) set(LIST "") function(add_to_target source) add_executable(source ${source}) add_dependency(my

[CMake] add_custom_command and variable arguments

2015-06-09 Thread Roman Savchenko
HI All, I whant to add custom command in such way: add_custom_target(my_target) add_custom_command(TARGET my_target POST_BUILD COMMAND script ${LIST}) set(LIST "") function(add_to_target source) add_executable(source ${source}) add_dependency(my_target ${source}) list(APPEND LIST ${

Re: [CMake] CTest and grouped test with custom_target

2015-06-09 Thread Nils Gladitz
On 06/09/2015 12:09 PM, Nils Gladitz wrote: Addendum ... don't quote the entire commandline; quote individual arguments (or omit quotes): add_custom_target(check-integration COMMAND ${CMAKE_CTEST_COMMAND} -L check-integration --output-on-failure) Nils -- Powered by www.kitware.com Pleas

Re: [CMake] CTest and grouped test with custom_target

2015-06-09 Thread Nils Gladitz
On 06/09/2015 11:48 AM, Roman Savchenko wrote: I whant create goups of test and add them to custom targets, e.g. //unit test add_custom_target(check-unit "COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure") add_test_to_target(check-unit ${TEST1}) //integration tests add_custom_target(check-int

[CMake] CTest and grouped test with custom_target

2015-06-09 Thread Roman Savchenko
Hi all, I whant create goups of test and add them to custom targets, e.g. //unit test add_custom_target(check-unit "COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure") add_test_to_target(check-unit ${TEST1}) //integration tests add_custom_target(check-integration "COMMAND ${CMAKE_CTEST_COMMAND}

Re: [CMake] install(TARGETS) does not work with configuration-specific destinations

2015-06-09 Thread Alessio
Ah! Specifying the CONFIGURATIONS argument *before* the DESTINATION ones works as intended. It would really help if the documentation was changed to reflect the importance of parameter ordering here. install(TARGETS ${target} COMPONENT ${component} CONFI