Re: [CMake] How should config packages handle components?

2017-09-05 Thread Robert Dailey
In the case where I'm exporting 1 target.cmake script per component for a single package, could someone provide an example on how to manage dependencies? There are 2 types of dependencies: 1. Dependencies on external packages 2. Cross-dependencies within the same package (i.e. on other components

Re: [CMake] Adding compile and build type tests to CMake/CTest

2017-09-05 Thread Edward Diener
On 9/5/2017 2:47 AM, Dvir Yitzchaki wrote: There's already CheckCXXSourceCompiles and friends. The only problem is that try_compile is not scriptable otherwise you could let the test invoke ${CMAKE_COMMAND} -P check_source_compiles.cmake. To put it succinctly CMake should adding compile-time t

Re: [CMake] Adding compile and build type tests to CMake/CTest

2017-09-05 Thread Edward Diener
On 9/4/2017 9:51 AM, Roger Leigh wrote: On 04/09/17 14:40, Edward Diener wrote: Boost Build has tests for running an application successfully or not, for compiling one or more source files successfully or not, and for building one or more source files into an exe or not. These tests in Boost B

Re: [CMake] Should configuration package files define module package variables?

2017-09-05 Thread Robert Dailey
On Sat, Sep 2, 2017 at 3:08 AM, P F wrote: > In general, if the library does not have any dependencies, you can just > export the targets directly to the config.cmake file: > > install(TARGETS foo EXPORT foo-config) > install(EXPORT foo-config DESTINATION lib/cmake/foo) > > However, if the librar

Re: [CMake] CMake Coverage broken with Ninja

2017-09-05 Thread Brad King
On 09/05/2017 07:42 AM, Gerhard Gappmeier wrote: > Could you already verify if this problem is also the cause for the > coverage issue? I tried your example in a fully out-of-source build (where the build tree is not inside the source tree), and coverage works. -Brad -- Powered by www.kitware.c

Re: [CMake] CMake Coverage broken with Ninja

2017-09-05 Thread Gerhard Gappmeier
Hi Brad, thanks for that information. It is great to see that you are working on this. Could you already verify if this problem is also the cause for the coverage issue? On 09/05/2017 01:31 PM, Brad King wrote: > On 09/02/2017 03:14 AM, Gerhard Gappmeier wrote: >> This is quite annoying, inconsi

Re: [CMake] CMake Coverage broken with Ninja

2017-09-05 Thread Brad King
On 09/02/2017 03:14 AM, Gerhard Gappmeier wrote: > This is quite annoying, inconsistent with Makefiles and was already > reported once here: https://cmake.org/Bug/print_bug_page.php?bug_id=13894 > AFAIK this was never fixed. Discussion of that issue is now here: https://gitlab.kitware.com/cmake

Re: [CMake] Path to vc_redist

2017-09-05 Thread Roman Wüger
Thank you Robert, I came up with the following, maybe someone has a better idea: if (WIN32) if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64-bit set(REDIST_ARCH x64) else() set(REDIST_ARCH x86) endif() set(REDIST_FILE vcredist_${REDIST_ARCH}.exe) set(CMAKE_INSTALL_SYST

Re: [CMake] Adding compile and build type tests to CMake/CTest

2017-09-05 Thread Dvir Yitzchaki
There's already CheckCXXSourceCompiles and friends. The only problem is that try_compile is not scriptable otherwise you could let the test invoke ${CMAKE_COMMAND} -P check_source_compiles.cmake. -Original Message- From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Roger Leigh Se