Re: [CMake] Handling of generator expressions

2017-11-22 Thread Roberto Di Remigio
Dear Oleksii, indeed it works! Thank you! I have opened an issue on the CMake repository: https://gitlab.kitware.com/cmake/cmake/issues/17501 I think it could still be a bug, since target_compile_definitions and target_link_libraries seem to evaluate the expression differently. All the best, R

Re: [CMake] Handling of generator expressions

2017-11-22 Thread Oleksii Vilchanskyi
UPD. forgot to CC the mailing list Hi, I am also confused by this and decided to test it. I found a long thread from 2012 that discusses list expansion issues. It doesn't tell though whether the patch was mainlined. tld

Re: [CMake] Handling of generator expressions

2017-11-21 Thread Robert Maynard
Hi Roberto, Can you please report this as an issue ( https://gitlab.kitware.com/cmake/cmake ) as this looks like a bug in the way we are parsing generator expressions in target_link_libraries. The target_link_libraries fully supports taking a list of linker flags when it isn't part of a generator

[CMake] Handling of generator expressions

2017-11-19 Thread Roberto Di Remigio
Hello, I am trying to compile the following code snippet: int main(int argc, char ** argv) { int stack_array[100]; stack_array[1] = 0; return stack_array[argc + 100]; // BOOM } The followin CMakeLists.txt works fine, but you can notice that target_compile_options takes a list, while target_