Re: [CMake] Generator expressions containing spaces

2018-04-24 Thread Yves Frederix
wishing I could just write something like > > add_compile_options( > $<$:-Wall -Wextra -Werror> > $<$:-Wall -Wextra -Werror> > $<$:-Wall -Wextra -Werror> > ) > > instead. > > I can't depend on CMake 3.8+ just yet, but I'll reme

Re: [CMake] Generator expressions containing spaces

2018-04-23 Thread Yves Frederix
ot;$<1 :${args}>" > > COMMAND_EXPAND_LISTS > > ) > > > > > > *From: *CMake on behalf of Yves Frederix < > yves.frederix+cm...@gmail.com> > *Date: *Monday 23 April 2018 at 13:08 > *To: *"cmake@cmake.org" > *Subject: *[CMa

[CMake] Generator expressions containing spaces

2018-04-23 Thread Yves Frederix
Hi, I recently learned that the COMMAND line in a custom command supports generator expressions. In particular, what makes this powerful is that if the expression evaluates to the empty string, no corresponding code will be added to the target (as documented in the docs

Re: [CMake] Add dependencies to the automoc/autorcc target?

2017-01-17 Thread Yves Frederix
Works like a charm. Thanks a lot! Yves On Tue, Jan 17, 2017 at 1:46 PM, Nils Gladitz wrote: > On 01/17/2017 12:02 PM, Yves Frederix wrote: > >> Hi all, >> >> I have a situation in which I would need to define a dependency for >> the automoc target. Is it possible t

Re: [CMake] Add dependencies to the automoc/autorcc target?

2017-01-17 Thread Yves Frederix
*existing* target. In other words, it should read: > > add_custom_command(TARGET foo PRE_BUILD COMMAND ${CMAKE_COMMAND} -E touch > ${CMAKE_BINARY_DIR}/myfile.txt) > > (and hopefully it is immediately obvious that the 'sleep' command should go > - CMake will never execute that comman

[CMake] Add dependencies to the automoc/autorcc target?

2017-01-17 Thread Yves Frederix
Hi all, I have a situation in which I would need to define a dependency for the automoc target. Is it possible to do this somehow? Basically, I have a setup in which a resource that is to be embedded is generated by another target. However, due to parallelism in the build and the lack of a depend

Re: [CMake] add_custom_command() OUTPUT does not accept generator expressions, why?

2016-03-31 Thread Yves Frederix
Hi Brad, > > If anyone is interested in trying to implement generator expressions > for custom command outputs, I can provide more details to get started. I am interested in having a go at this. I recently ran into this issue at work as well and actually tried some things already. However, I real

Re: [CMake] Why does INTERFACE type targets only support whitelisted properties?

2016-01-08 Thread Yves Frederix
> Still at the very least this might be an argument to whitelist SOURCE_DIR. > > An argument for the whitelist diagnostics might be that it reduces reports > from users which try to set build properties that do not have any effect in > context of interface targets. You are explicitly mentioning '

Re: [CMake] Why does INTERFACE type targets only support whitelisted properties?

2016-01-08 Thread Yves Frederix
> It might help the discussion if you could elaborate what use cases you have > in mind for non-whitelisted properties. I deliberately did not mention my particular use case from the start simply because I am interested in the reasoning behind the limitation, not directly in how I can work around

[CMake] Why does INTERFACE type targets only support whitelisted properties?

2016-01-08 Thread Yves Frederix
Hi all, Motivated by my own struggles with targets of type INTERFACE and a recent post on this list, I was wondering what is the rationale behind allowing only a whitelisted set of properties on targets of this type. I understand that one of the use cases for INTERFACE libraries is to have a way t

Re: [CMake] Problem when using variable_watch with Visual Studio generator in 3.4.1

2015-12-10 Thread Yves Frederix
David Cole wrote: > Out of curiosity, what output do you get (with 3.4.1) when you comment out > your call to variable_watch? Do you still get error output, but without > strange symbols in it? Or is there no error output in that case? > > > On Thursday, December 10, 2015, Yves F

[CMake] Problem when using variable_watch with Visual Studio generator in 3.4.1

2015-12-10 Thread Yves Frederix
Hi all, I am experiencing problems during the CMake configure step when using the function variable_watch. Consider the following minimal CMakeLists file: cmake_minimum_required(VERSION 3.4) project(test CXX) function(myhook _variable _access _value _current_list_file _stack) if("${_va

[CMake] Temporarily redefining CMake functions

2015-10-10 Thread Yves Frederix
Hi all, I have a use case in which I would like to temporarily overwrite standard CMake functions (e.g., add_library). After searching the mailing list, I found that when a function is redefined, the original function is still available but with an underscore prefix, e.g., function(add_library)

[CMake] Change ctest verbosity from inside a script?

2015-04-02 Thread Yves Frederix
Hi all, For one of our projects, I have recently started experimenting with a build setup based on a single ctest script that performs configure, build and runs the unit tests. One thing that is slightly bothering me at the moment with this solution, is that I seem to be unable to set the build ve

Re: [CMake] VS2012 builds using v3.1.0 are a lot slower than v2.8.12

2015-01-21 Thread Yves Frederix
Ok, so it all seems to boil down to the following: - 2.8.12: "cmake --build" uses devenv to build, which in turn picks up a setting ("maximum number of parallel project builds") from the VS IDE at build time. As this was set to 8 on my machine, by default the build used parallellization with 8 co

Re: [CMake] VS2012 builds using v3.1.0 are a lot slower than v2.8.12

2015-01-20 Thread Yves Frederix
res with hyperthreading (also to windows they show as 8 cores). > > For maximum parallel build capability, it should be set to the same as > the number of cores you have. Yves Tue, Jan 20, 2015 at 7:10 AM, Yves Frederix > wrote: >>>> 3.1.0:10m50s >>>>

Re: [CMake] VS2012 builds using v3.1.0 are a lot slower than v2.8.12

2015-01-20 Thread Yves Frederix
>> 3.1.0:10m50s >> 2.8.12: 4m02s >> 3.1.0 (/MP): 6m29s >> 2.8.12 (/MP): 3m48s > > I cannot reproduce that. On my machine for OpenCV (as of commit > 5e92a777) I get about the same time for either version of CMake. > > 3.1.0 : 8m57s > 2.8.12.2 : 8m58s > 3.1.0(/MP): 4m52s >

Re: [CMake] VS2012 builds using v3.1.0 are a lot slower than v2.8.12

2015-01-17 Thread Yves Frederix
e settings. 3.1.0:10m50s 2.8.12: 4m02s 3.1.0 (/MP): 6m29s 2.8.12 (/MP): 3m48s This does not look entirely the same as for the Crypto example, but the performance decrease is at least very much visible. Best regards, Yves On Fri, Jan 16, 2015 at 5:24 PM, Yves Frederix wrote: > Hi

Re: [CMake] VS2012 builds using v3.1.0 are a lot slower than v2.8.12

2015-01-16 Thread Yves Frederix
Hi, >> 3.1.0: >> ALL Crypto Crypto_sCrypto_test >> real0m38.211s 0m14.023s 0m7.003s0m14.691s >> >> 2.8.12: >> ALL Crypto Crypto_sCrypto_test >> real0m27.230s 0m17.110s

Re: [CMake] VS2012 builds using v3.1.0 are a lot slower than v2.8.12

2015-01-16 Thread Yves Frederix
> Are you building the same configuration in both cases? > Use > > cmake --build . --config Debug > > or > > cmake --build . --config Release Yes, I used "--config Release" in both cases. > > to specify the configuration. You could also compare the .vcxproj > files that are generated. I had

[CMake] VS2012 builds using v3.1.0 are a lot slower than v2.8.12

2015-01-15 Thread Yves Frederix
Hi all, I recently made the upgrade from v2.8.12 to v3.1.0. Unfortunately, I am now experiencing a serious decrease in build speed for the VS2012 Win64 builds. I have searched the cmake mailings but I was unable to find a reference to a similar issue. To give an idea about the difference I am obs