Re: [CMake] Can find_package(...) distinguish between debug and release installs?

2018-04-10 Thread Saad Khattak
Thanks Bo. I have added the suffix to my libraries already, however with some 3rd party libraries that I am getting with FetchContent, I have no control over how they name their libraries. Now, their Config.cmake files have release targets that are globbed by one of the CMake config files (which

[CMake] FetchContent and find_package

2018-04-10 Thread Saad Khattak
Hi, My project is setup in such a way that I perform a FetchContent 'only if' my find_package fails. This works very well until I start building different configurations. Let's say I generate and build Debug for my project. My project tries to find_package(LibA QUIET) and cannot find it. So, it p

Re: [CMake] FetchContent and find_package

2018-04-10 Thread Craig Scott
On Tue, Apr 10, 2018 at 11:07 PM, Saad Khattak wrote: > Hi, > > My project is setup in such a way that I perform a FetchContent 'only if' > my find_package fails. > > This works very well until I start building different configurations. > Let's say I generate and build Debug for my project. My pr

Re: [CMake] FetchContent and find_package

2018-04-10 Thread Saad Khattak
Thank you Craig. >> Imported targets are definitely more preferable though Can you please elaborate on this? On Tue, Apr 10, 2018 at 10:23 AM Craig Scott wrote: > > On Tue, Apr 10, 2018 at 11:07 PM, Saad Khattak > wrote: > >> Hi, >> >> My project is setup in such a way that I perform a FetchC

[CMake] Order of IMPORTED target include directories

2018-04-10 Thread Ephi Sinowitz (BLOOMBERG/ 919 3RD A)
Hi, I would like to ensure that all include directories propagated from IMPORTED targets come after the include directories propagated from non-imported targets. On gcc the includes from IMPORTED targets are marked with -isystem which effectively moves these directories to the end of the includ

Re: [CMake] FetchContent and find_package

2018-04-10 Thread Craig Scott
On Wed, Apr 11, 2018 at 2:28 AM, Saad Khattak wrote: > Thank you Craig. > > >> Imported targets are definitely more preferable though > > Can you please elaborate on this? > Variables are the old way of passing details about a target to a consuming target. It was customary to provide one variabl

[CMake] use analyze with visual studio

2018-04-10 Thread Tiago Macarios
I am trying to pass the analyze flags to cl.exe, but I cannot figure out how to get it working, example: cmake_minimum_required (VERSION 2.8.11) set (CMAKE_VERBOSE_MAKEFILE ON) project (cppcore) add_executable (const const.cpp) target_compile_options (const analyze -analyze:plugin EspXEngine.dll)

Re: [CMake] Can find_package(...) distinguish between debug and release installs?

2018-04-10 Thread Bo Zhou
Hi, Since you're using FetchContent/ExternalProject_Add, you could create a special stage installation folder for those external projects, organize them by different configurations, for example. 3rdParty/Debug/zlib/include+lib 3rdParty/Release/zlib/include+lib So with this way, the name from th