Re: [CMake] test depending on code compilation

2018-01-12 Thread Mario Werner
On 2018-01-11 18:03, Franck Houssen wrote: > > > - Mail original - >> De: "Mario Werner" >> À: cmake@cmake.org >> Envoyé: Jeudi 11 Janvier 2018 16:27:18 >> Objet: Re: [CMake] test depending on code compilation >> > [snip] > >>

Re: [CMake] test depending on code compilation

2018-01-11 Thread Mario Werner
On 2018-01-10 10:47, Franck Houssen wrote: > [snip] > > The 2 unexpected problems I have left are: > 1) mytestexe is compiled everytime I type "make" which is a solution but > is not really what I am looking for (also compiled when I type "make > check" which is expected). >     => is there a way

Re: [CMake] How to do platform specific setup?

2017-07-26 Thread Mario Werner
Hi Robert, I usually do all my platform and compiler specific customization in a toolchain file [1]. Such a toolchain file is more or less standard CMake script which get executed before the root CMakeLists.txt from the project is processed. When invoking cmake for the first time you simply specif

Re: [CMake] Using target_link_libraries INTERFACE with static libraries

2017-06-01 Thread Mario Werner
Hi Luis, as you correctly concluded, if 'Foo' is not part of the public interface of 'Bar', then the PRIVATE is the correct specifier. However, you don't have to add 'Foo' to the consumers of 'Bar' (e.g., 'MyApp'). If everything works as expected, CMake automatically tracks the link dependency fr

Re: [CMake] Are the current scoping rules for functions intended and documented?

2016-11-16 Thread Mario Werner
Hi Brad, unfortunately I failed to file an issue to keep track of this feature request. Gitlab always recognizes the text as spam and discards it. I tried the following title and text: Title - Function and macro definitions should

Re: [CMake] Are the current scoping rules for functions intended and documented?

2016-11-15 Thread Mario Werner
function and macro definitions. As soon as I have more time on my hands I may come back to it and give it try. Cheers, Mario On 2016-11-14 19:47, Brad King wrote: > On 11/14/2016 10:29 AM, Mario Werner wrote: >> I was just surprised by the scoping rules of CMake when it comes to &g

[CMake] Are the current scoping rules for functions intended and documented?

2016-11-14 Thread Mario Werner
Hi, I was just surprised by the scoping rules of CMake when it comes to function definitions and sub scopes (i.e., subdirectories). I expected that function definitions adhere to the same scoping rules as variables. More concretely, I assumed that function definitions in a sub scope are only valid

Re: [CMake] ctest: how to include pre- and post- processing commands

2016-07-01 Thread Mario Werner
Hi Ted, On 2016-06-30 14:37, TS wrote: > [snip] > Is it possible to have a ctest which involves preprocessing as well as > postprocessing. The code to test is myCode.exe, which writes an output file. > PASS or FAIL is the result of comparison of output against reference data. AFAIK, there is curr