Re: [CMake] Generator expressions: Identifying when they're used in a custom command?

2018-02-19 Thread Alan W. Irwin
On 2018-02-19 13:03-0700 Sam Edwards wrote: Alan, I'm kicking myself for leaving off the DEPENDS in add_custom_target as that is the most essential part of what you suggested. Bah! I tried copying in your changes verbatim and I'm still left with an output that produces IS_INTERROGATE=0. This i

Re: [CMake] Generator expressions: Identifying when they're used in a custom command?

2018-02-19 Thread Elvis Stansvik
2018-02-19 21:03 GMT+01:00 Sam Edwards : > Alan, > > I'm kicking myself for leaving off the DEPENDS in add_custom_target as that > is the most essential part of what you suggested. Bah! > > I tried copying in your changes verbatim and I'm still left with an output > that produces IS_INTERROGATE=0.

Re: [CMake] Generator expressions: Identifying when they're used in a custom command?

2018-02-19 Thread Sam Edwards
Alan, I'm kicking myself for leaving off the DEPENDS in add_custom_target as that is the most essential part of what you suggested. Bah! I tried copying in your changes verbatim and I'm still left with an output that produces IS_INTERROGATE=0. This is on both 3.9.6 (my development machine) and 2.

Re: [CMake] Generator expressions: Identifying when they're used in a custom command?

2018-02-19 Thread Alan W. Irwin
On 2018-02-18 19:47-0700 Sam Edwards wrote: Alan, Thanks for your help! I tried to implement that paradigm myself in a small example CMakeLists.txt which I've attached, but the addition of a depending custom target doesn't seem to change the context of the 'this' target. In other words, the IS_

Re: [CMake] Generator expressions: Identifying when they're used in a custom command?

2018-02-18 Thread Sam Edwards
Alan, Thanks for your help! I tried to implement that paradigm myself in a small example CMakeLists.txt which I've attached, but the addition of a depending custom target doesn't seem to change the context of the 'this' target. In other words, the IS_INTERROGATE property is still read from fake_ta

Re: [CMake] Generator expressions: Identifying when they're used in a custom command?

2018-02-18 Thread Alan W. Irwin
On 2018-02-18 03:49-0700 Sam Edwards wrote: However, when it came time to actually set this IS_INTERROGATE property, I could find no way to apply it to a custom command. I guess this makes sense - custom commands aren't targets, after all. But I couldn't convert my custom command to a custom tar

[CMake] Generator expressions: Identifying when they're used in a custom command?

2018-02-18 Thread Sam Edwards
Hi list! I'm working on a CMake buildsystem for the Panda3D project. The project is essentially a C++ 3D engine with its own custom Python binding generator known as Interrogate. The basic idea is that after a library's C++ code is compiled in the usual way, the C++ source files and headers are pa