Re: [CMake] print a message during a specific build target

2015-12-04 Thread Christopher Sean Morrison
Thanks, that worked for printing a message during our “check” target. Makes sense for “if (TARGET…)” to truthfully enter if that target name exists. What threw me off, I think, was having "TARGET test” not actually pass and misunderstanding the docs that this would embed logic in the generato

Re: [CMake] print a message during a specific build target

2015-11-24 Thread Parag Chandra
The if() statements are executed when CMake runs, because you’re basically adding logic to the “meta-build” process that generates your build system; not the build system itself. Maybe you can use “add_custom_target” to create targets which do nothing but print the desired message, and then use

[CMake] print a message during a specific build target

2015-11-23 Thread Christopher Sean Morrison
Hi, I’m trying to print a message for a particular build target and am a bit stuck. I found that the IF statement has a TARGET keyword that should truthfully match for a particular build target, but it doesn’t seem to be working at least the way I’m trying to use it and would expect it to wor