Re: [CMake] PROPERTY for list of link libraries

2016-01-22 Thread Tom Kacvinsky
Ah yes, that was it. Switching to 3.3.2 did the trick. Time to upgrade cmake. On Fri, Jan 22, 2016 at 4:40 PM, Tom Kacvinsky wrote: > I am now having a problem with transitive dependencies. I need all > libraries that are linked in. I am missing the ones that are linked in > transitively. M

Re: [CMake] PROPERTY for list of link libraries

2016-01-22 Thread Tom Kacvinsky
I am now having a problem with transitive dependencies. I need all libraries that are linked in. I am missing the ones that are linked in transitively. Modified code is, ignoring J. Decker's suggestion about using generator expressions to get the path to the target's output. get_property(libs T

[CMake] Checking whether particular *linker* flags are supported

2016-01-22 Thread Guy Harris
CMake has the macros CHECK_C_COMPILER_FLAG and CHECK_CXX_COMPILER_FLAG, which allow checking for whether a given C or C++ compiler flag is supported by the compiler being used. However, there's no CHECK_LINKER_FLAG macro, so that you can check whether a given *linker* flag is supported by the l

Re: [CMake] exclude a dependency from export

2016-01-22 Thread Jack Stalnaker
I've found several workarounds, though I'm not sure of the long term ramifications. 1. I can "install" library A to CMAKE_CURRENT_BINARY_DIR effectively doing nothing. Since A is never referenced, only consumed, this should be okay? 2. I can remove the export from both A's and B's install, and si

Re: [CMake] exclude a dependency from export

2016-01-22 Thread Jack Stalnaker
Private doesn't work because the names in A need to be part of the public interface. On Fri, Jan 22, 2016 at 11:51 AM, Nicholas Braden < nicholas11bra...@gmail.com> wrote: > Have you tried using the PRIVATE keyword when linking to A? > > https://cmake.org/cmake/help/latest/command/target_link_lib

Re: [CMake] exclude a dependency from export

2016-01-22 Thread Nicholas Braden
Have you tried using the PRIVATE keyword when linking to A? https://cmake.org/cmake/help/latest/command/target_link_libraries.html#libraries-for-a-target-and-or-its-dependents On Fri, Jan 22, 2016 at 9:14 AM, Jack Stalnaker wrote: > Is there any way to exclude a dependency from an export? If I bu

Re: [CMake] PROPERTY for list of link libraries

2016-01-22 Thread Hendrik Sattler
Am 22. Januar 2016 15:23:53 MEZ, schrieb Tom Kacvinsky : >I have need for a cross platform methods of getting libraries linked >into an executable. > >Say for instance, we have > >add_library(foo STATIC a.c) >add_exceutable(bar b.c) >target_link_libraries(bar foo) > >So I know for that bar has a

Re: [CMake] PROPERTY for list of link libraries

2016-01-22 Thread J Decker
LOCATION was/is deprecated... the preferred method is generator expressions https://cmake.org/cmake/help/v3.3/manual/cmake-generator-expressions.7.html $ $ On Fri, Jan 22, 2016 at 7:19 AM, Tom Kacvinsky wrote: > On Fri, Jan 22, 2016 at 9:23 AM, Tom Kacvinsky > wrote: >> I have need for a cross p

[CMake] exclude a dependency from export

2016-01-22 Thread Jack Stalnaker
Is there any way to exclude a dependency from an export? If I build a static library target "A" but do not wish to install it, and then link that target to another target "B" using target_link_libraries(B A), and then attempt to export B, I get the error message: install (EXPORT "B" ...) includes

Re: [CMake] PROPERTY for list of link libraries

2016-01-22 Thread Tom Kacvinsky
On Fri, Jan 22, 2016 at 9:23 AM, Tom Kacvinsky wrote: > I have need for a cross platform methods of getting libraries linked > into an executable. > > Say for instance, we have > > add_library(foo STATIC a.c) > add_exceutable(bar b.c) > target_link_libraries(bar foo) > > So I know for that bar has

[CMake] PROPERTY for list of link libraries

2016-01-22 Thread Tom Kacvinsky
I have need for a cross platform methods of getting libraries linked into an executable. Say for instance, we have add_library(foo STATIC a.c) add_exceutable(bar b.c) target_link_libraries(bar foo) So I know for that bar has a dependency on foo.lib (on Windows) and libfoo.a on Linux. And so for

Re: [CMake] Shared library for a executable

2016-01-22 Thread Raymond Wan
Hi Gonzalo, On Fri, Jan 22, 2016 at 1:49 AM, Gonzalo wrote: > I have the need to have a shared library be created and then this same > library be accessed by my executable. > I want both to remain in different sibling directories and have one main > CMakeList.txt that would call the other two C

Re: [CMake] string regexp replace removes the semicolons

2016-01-22 Thread CHEVRIER, Marc
Hi, Command file(GLOB) returns a CMake list (in a CMake list, items are separated by ;) Now you pass to command string the content of the list, so the list is expanded: in your example, string(REGEX REPLACE "foo.*cc" " " COMPILE_ONLY ${ALL_SOURCES}) Is equivalent to: string(REGEX REPLACE "foo.

[CMake] CTest integration in Visual Studio TestExplorer

2016-01-22 Thread Stuermer, Michael SP/HZA-ZSEP
Hello everyone, picking up the line from Tobias from around a year ago I changed a few things in the ctest unittest adapter. It now works for both Visual Studio 2013 and 2015. 2012 is supported in general but I didn't try it (means: I can install it). Merging and pull request for original versi

[CMake] string regexp replace removes the semicolons

2016-01-22 Thread Vania Joloboff
Hi I want to remove from a list of sources those that start with 'foo' So I have file(GLOB ALL_SOURCES "*.cc") # this gives ALL_SOURCES = "a.cc;b.cc;foo_u.cc;foo_v.cc;c.cc;y.cc" # separated by semicolons string(REGEX REPLACE "foo.*cc" " " COMPILE_ONLY ${ALL_SOURCES}) But in the COMPILE_ONLY va

[CMake] Announcing Buildroot.cmake: a CMake module that wraps the Buildroot build system

2016-01-22 Thread Sam Thursfield
Hello I'd like to announce the release of Buildroot.cmake, available here: This was developed thanks to Teufel, who make the Raumfeld multi-room audio system. The firmware for Raumfeld speakers is built using Buildroot. There are several differen

[CMake] Shared library for a executable

2016-01-22 Thread Gonzalo
I have the need to have a shared library be created and then this same library be accessed by my executable. I want both to remain in different sibling directories and have one main CMakeList.txt that would call the other two CMakeList.txt (one in the lib dir, one in the exe dir) to build the li