Re: [CMake] coding style for modules

2018-01-05 Thread Stephen Orso
On Fri, 5 Jan 2018 18:16:08 +0300 Dave Milter wrote: > b)Include this project as git submodule and use ExternalProject to >>> invoke `cmake` and `cmake --build` >> This would be a clean solution if you want to build libfoo as part of yur >> project. >> > Thank you for answer, but how handle cross

Re: [CMake] CTest not searching for the correct executable

2018-01-05 Thread Saad Khattak
That was it, thanks Nils! For future reference, after adding the test like Nils suggested, calling "ctest" wouldn't work as it now needs your configuration: ctest -C Debug On Fri, Jan 5, 2018 at 11:16 AM Nils Gladitz wrote: > On 05.01.2018 17:11, Saad Khattak wrote: > > Hi, > > Suppose I have

Re: [CMake] CTest not searching for the correct executable

2018-01-05 Thread Nils Gladitz
On 05.01.2018 17:11, Saad Khattak wrote: Hi, Suppose I have something like this: add_executable(MyTest main.cpp) set_target_properties(MyTest   PROPERTIES   DEBUG_POSTFIX _d   RELEASE_POSTFIX _r   ) add_test(RunTests MyTest) # where MyTest is the I expect CMake to recognize that "MyTest" has

[CMake] CTest not searching for the correct executable

2018-01-05 Thread Saad Khattak
Hi, Suppose I have something like this: add_executable(MyTest main.cpp) set_target_properties(MyTest PROPERTIES DEBUG_POSTFIX _d RELEASE_POSTFIX _r ) add_test(RunTests MyTest) # where MyTest is the I expect CMake to recognize that "MyTest" has executables that are named "MyTest_d" and "

Re: [CMake] coding style for modules

2018-01-05 Thread Dave Milter
On Fri, Jan 5, 2018 at 12:09 AM, Alexander Neundorf wrote:> >> b)Include this project as git submodule and use ExternalProject to >> invoke `cmake` and `cmake --build` > > This would be a clean solution if you want to build libfoo as part of yur > project. > Thank you for answer, but how handle c

Re: [CMake] RPATH for pkg-config

2018-01-05 Thread Franck Houssen
- Mail original - > De: "Alexander Neundorf" > À: "Franck Houssen" > Cc: cmake@cmake.org > Envoyé: Jeudi 4 Janvier 2018 22:04:02 > Objet: Re: [CMake] RPATH for pkg-config > > On 2018 M01 4, Thu 10:06:26 CET Franck Houssen wrote: > ... > > ... > > target_include_directories(main PUBLIC

Re: [CMake] RPATH for pkg-config

2018-01-05 Thread Franck Houssen
Working !... At last ! Thanks :D I suspected an ordering problem: I already tried to change the position of "setting CMAKE_INSTALL_RPATH" before / after "calling target_link_libraries"... But didn't try to do this BEFORE add_executable ! Would be nice to add this in the doc https://cmake.org