[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 target "B" which requires target "A" that
is not in the export set.

I can solve the problem by installing A, but there is no need to. It is a
temporary target that is statically linked. I just need to export for
creating a package config file, so there's no need for the package config
to ever need to worry about statically linked libraries.

Is there a workaround for this?

Long story short, I am trying to replicate convenience libraries from
autotools. I'm having a hell of time doing it. I can use lists of sources,
but that requires passing around global variables that include the sources
and others that include the required libraries. This is far messier and far
less convenient. I've tried object libraries, and while they eliminate the
global source variables and prevent rebuilding things, they fail when the
source is nested, and you want to build a "super library" from smaller
object libraries, which I believe is a fairly common working pattern.
Building a static library that is never installed works really well ...
until I go to create a package config file. Then this export fails.

Thanks,
--Jack
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[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 linker being used, so there doesn't 
seem to be a good way to use a flag, such as the --as-needed flag, if it's not 
*required*, but is "nice to have", but isn't available on all platforms.

So what's the best way to do such a check?

(I'm assuming here that, for all generators on UN*X platforms, linking is done 
by using the compiler driver, so that you don't have to worry about, for 
example, using -Wl,{linker flag} with some generators and just {linker flag} 
with other generators.)
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


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 TARGET a_target PROPERTY LINK_LIBRARIES)
foreach(lib ${libs})
  if(TARGET ${lib})
# If this is a library, get its transitive dependencies
get_property(trans TARGET ${lib} PROPERTY INTERFACE_LINK_LIBRARIES)
foreach(tran ${trans})
  if(TARGET ${tran})
get_property(path TARGET ${tran} PROPERTY LOCATION)
file(APPEND "${CMAKE_BINARY_DIR/libs.txt" "${path}\n")
  endif()
endforeach()
get_property(path TARGET ${lib} PROPERTY LOCATION)
file(APPEND "${CMAKE_BINARY_DIR}/libs.txt" "${path}\n")
  else()
file(APPEND "${CMAKE_BINARY_DIR}/libs.txt" "${lib}\n")
  endif()
endforeach()

I am using cmake 2.8.11.2, perhaps this property doesn't do what I thought
it would with this version of cmake?

Thanks,

Tom

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 a dependency on foo.lib (on Windows) and
> libfoo.a on Linux.
>
> And so forth.  What I would like to do is after everything is set up,
> query the properties of bar
> and find the list of libraries linked into bar in such a fashion I get
> that platform's specific library name (instead of the library's target
> name).
>
> IS this possible?  I read the docs and didn't see a property for
> getting this list.  Did I miss something?  If so I plan on using
> either get_property of get_target_property.
>
> Thanks.
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

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_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 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 target "B" which requires target "A"
> that
> > is not in the export set.
> >
> > I can solve the problem by installing A, but there is no need to. It is a
> > temporary target that is statically linked. I just need to export for
> > creating a package config file, so there's no need for the package
> config to
> > ever need to worry about statically linked libraries.
> >
> > Is there a workaround for this?
> >
> > Long story short, I am trying to replicate convenience libraries from
> > autotools. I'm having a hell of time doing it. I can use lists of
> sources,
> > but that requires passing around global variables that include the
> sources
> > and others that include the required libraries. This is far messier and
> far
> > less convenient. I've tried object libraries, and while they eliminate
> the
> > global source variables and prevent rebuilding things, they fail when the
> > source is nested, and you want to build a "super library" from smaller
> > object libraries, which I believe is a fairly common working pattern.
> > Building a static library that is never installed works really well ...
> > until I go to create a package config file. Then this export fails.
> >
> > Thanks,
> > --Jack
> >
> > --
> >
> > Powered by www.kitware.com
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Kitware offers various services to support the CMake community. For more
> > information on each offering, please visit:
> >
> > CMake Support: http://cmake.org/cmake/help/support.html
> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
> > CMake Training Courses: http://cmake.org/cmake/help/training.html
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

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 simply not
include the target.cmake file in my package config prototype. I can just
include my targets as variables the same way a FindXXX.cmake file does.
Makes the syntax slightly uglier in that you cannot refer to B by target
name. It also might break the expectations of a user who thinks a package
should include target names.

I've started several discussions here on convenience libraries, and I think
I'm starting to realize the Cmake team has a different definition than I
do. To me, a convenience lib is not just an archived collection of sources.
The convenience lib is already linked to any external libs and already was
compiled with any special flags--in essence it's fully cooked. The nice
thing about this is that it keeps all the details specific to that part of
the code confined to that code's place on disc and that part of the code's
CMakeLists.txt. Object libraries and source list variables require that
other information to be passed around as well, leaking the convenience
lib's requirements all over the code tree. You could argue that that means
A should be a plain old library, then, but installing it serves no purpose.
It will like never be referenced outside of the code tree, and it pollutes
the system library folder.



On Fri, Jan 22, 2016 at 1:20 PM, Jack Stalnaker 
wrote:

> 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_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 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 target "B" which requires target "A"
>> that
>> > is not in the export set.
>> >
>> > I can solve the problem by installing A, but there is no need to. It is
>> a
>> > temporary target that is statically linked. I just need to export for
>> > creating a package config file, so there's no need for the package
>> config to
>> > ever need to worry about statically linked libraries.
>> >
>> > Is there a workaround for this?
>> >
>> > Long story short, I am trying to replicate convenience libraries from
>> > autotools. I'm having a hell of time doing it. I can use lists of
>> sources,
>> > but that requires passing around global variables that include the
>> sources
>> > and others that include the required libraries. This is far messier and
>> far
>> > less convenient. I've tried object libraries, and while they eliminate
>> the
>> > global source variables and prevent rebuilding things, they fail when
>> the
>> > source is nested, and you want to build a "super library" from smaller
>> > object libraries, which I believe is a fairly common working pattern.
>> > Building a static library that is never installed works really well ...
>> > until I go to create a package config file. Then this export fails.
>> >
>> > Thanks,
>> > --Jack
>> >
>> > --
>> >
>> > Powered by www.kitware.com
>> >
>> > Please keep messages on-topic and check the CMake FAQ at:
>> > http://www.cmake.org/Wiki/CMake_FAQ
>> >
>> > Kitware offers various services to support the CMake community. For more
>> > information on each offering, please visit:
>> >
>> > CMake Support: http://cmake.org/cmake/help/support.html
>> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> > CMake Training Courses: http://cmake.org/cmake/help/training.html
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://public.kitware.com/mailman/listinfo/cmake
>>
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:

[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 library and the executable.
In addition, I would like my library to be able to be compiled by itself 
(its own project).


Can someone point me how to do this?  I set it up for my program with 
v2.8 but now this is failing on 3.4.2.


--
Gonzalo Garramuño
ggarr...@gmail.com

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[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 different platforms and devices that they 
need to support (a total of 15 different configurations being built from 
the same Buildroot tree) so we have introduced a meta-build system to 
drive all them. This toplevel meta-build system is generated by CMake, 
and uses the Buildroot.cmake module to wrap Buildroot's own Makefile.


This is a rough initial release, with only minimal documentation and 
examples. Questions, bug reports and patches are welcome, although I 
don't yet know how much time we'll be able to devote to on-going 
maintenance.


If it turns out to be widely useful then maybe we can look at supporting 
it as part of the Buildroot or CMake projects. I hope it is of interest 
to some readers of this list, anyway!


Thanks
Sam

--
Sam Thursfield, Codethink Ltd.
Office telephone: +44 161 236 5575
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


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.  Modified code is, ignoring J. Decker's suggestion about
> using generator expressions to get the path to the target's output.
>
> get_property(libs TARGET a_target PROPERTY LINK_LIBRARIES)
> foreach(lib ${libs})
>   if(TARGET ${lib})
> # If this is a library, get its transitive dependencies
> get_property(trans TARGET ${lib} PROPERTY INTERFACE_LINK_LIBRARIES)
> foreach(tran ${trans})
>   if(TARGET ${tran})
> get_property(path TARGET ${tran} PROPERTY LOCATION)
> file(APPEND "${CMAKE_BINARY_DIR/libs.txt" "${path}\n")
>   endif()
> endforeach()
> get_property(path TARGET ${lib} PROPERTY LOCATION)
> file(APPEND "${CMAKE_BINARY_DIR}/libs.txt" "${path}\n")
>   else()
> file(APPEND "${CMAKE_BINARY_DIR}/libs.txt" "${lib}\n")
>   endif()
> endforeach()
>
> I am using cmake 2.8.11.2, perhaps this property doesn't do what I thought
> it would with this version of cmake?
>
> Thanks,
>
> Tom
>
> On Fri, Jan 22, 2016 at 9:23 AM, Tom Kacvinsky <
> tom.kacvin...@vectorcast.com> 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 a dependency on foo.lib (on Windows) and
>> libfoo.a on Linux.
>>
>> And so forth.  What I would like to do is after everything is set up,
>> query the properties of bar
>> and find the list of libraries linked into bar in such a fashion I get
>> that platform's specific library name (instead of the library's target
>> name).
>>
>> IS this possible?  I read the docs and didn't see a property for
>> getting this list.  Did I miss something?  If so I plan on using
>> either get_property of get_target_property.
>>
>> Thanks.
>>
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[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 variable the semicolons are removed !
and then
add_library(lib ${COMPILE_ONLY}) fails

why is it removing the semicolons ?
Vania

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[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 version will follow (as soon as 
there is time), but I would be really happy if some developers from the 
community could comment on the current state and give some feedback.

I tested it so far with the CMake build and tests and discovering and executing 
the whole lot of 400+ tests runs well so far. Let me know what could/should be 
improved.

You can download the latest version of the extension here:

https://github.com/micst/CTestTestAdapter/blob/micst/CTestTestAdapter.vsix

Check the sources on github here:

https://github.com/micst/CTestTestAdapter

best regards,
Michael


-Original Message-
From: Tobias Becker [mailto:becker.t...@gmail.com] 
Sent: Saturday, November 22, 2014 11:35 PM
Subject: [CMake] CTest integration in Visual Studio TestExplorer

So I tried my luck with creating an extension for Visual Studio that allows you 
to use the Test Explorer to discover and run your CTests.  You can download it 
in the visual studio gallery. Read about it on 
http://thetoeb.de/2014/11/22/ctest-integration-visualstudio/ .

I'd be happy if anyone wanted to give me feedback or contribute on 
https://github.com/toeb/CTestTestAdapter ;)

Sorry for the shameless plug (but hey - its free)


Kind Regards,

Tobias
-- next part --
An HTML attachment was scrubbed...
URL: 


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


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.*cc" " " COMPILE_ONLY a.cc b.cc foo_u.cc foo_v.cc 
c.cc y.cc)

So, command string will concatenate all the input strings in a single string.

To keep semi colons, you have to pass ALL_SOURCES as a string, not a list:
string(REGEX REPLACE "foo.*cc" " " COMPILE_ONLY “${ALL_SOURCES}")






On 22/01/16 12:29, "CMake on behalf of Vania Joloboff"  wrote:

>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 variable the semicolons are removed !
>and then
>add_library(lib ${COMPILE_ONLY}) fails
>
>why is it removing the semicolons ?
>Vania
>
>-- 
>
>Powered by www.kitware.com
>
>Please keep messages on-topic and check the CMake FAQ at: 
>http://www.cmake.org/Wiki/CMake_FAQ
>
>Kitware offers various services to support the CMake community. For more 
>information on each offering, please visit:
>
>CMake Support: http://cmake.org/cmake/help/support.html
>CMake Consulting: http://cmake.org/cmake/help/consulting.html
>CMake Training Courses: http://cmake.org/cmake/help/training.html
>
>Visit other Kitware open-source projects at 
>http://www.kitware.com/opensource/opensource.html
>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[Cmake-commits] CMake branch, master, updated. v3.4.2-895-gdcf977e

2016-01-22 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  dcf977ea1a97f41fe19a871235dc75e85891e478 (commit)
   via  7dbfdddf33ab2d52e471c8533897bc2d7aeb40c9 (commit)
  from  666487a402310ea69ac20b1d6dceb20746d16f6a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcf977ea1a97f41fe19a871235dc75e85891e478
commit dcf977ea1a97f41fe19a871235dc75e85891e478
Merge: 666487a 7dbfddd
Author: Brad King 
AuthorDate: Fri Jan 22 09:25:30 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Fri Jan 22 09:25:30 2016 -0500

Merge topic 'fix-use-generator-target'

7dbfdddf cmExportInstallFileGenerator: Fix crash in FindNamespaces


---

Summary of changes:
 Source/cmExportInstallFileGenerator.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.4.2-899-g1d9c539

2016-01-22 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  1d9c539cf72e29014e1d03cdede0cd15e64426d7 (commit)
   via  f98ae28e3dd633126e7897a593f2d15ba68a75d9 (commit)
  from  ddb09ec8f91e7215d867c83d9229d3558bf2c166 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d9c539cf72e29014e1d03cdede0cd15e64426d7
commit 1d9c539cf72e29014e1d03cdede0cd15e64426d7
Merge: ddb09ec f98ae28
Author: Brad King 
AuthorDate: Fri Jan 22 09:25:36 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Fri Jan 22 09:25:36 2016 -0500

Merge topic 'test-fltk_wrap_ui'

f98ae28e Tests: Cover fltk_wrap_ui on an executable that links libraries


---

Summary of changes:
 Tests/Wrapping/CMakeLists.txt|   10 ++
 .../IntelVSImplicitPath/hello.f => Tests/Wrapping/fltk2.fl   |0
 .../LinkInterfaceLoop/main.c => Wrapping/wrapFLTK.c} |0
 3 files changed, 6 insertions(+), 4 deletions(-)
 copy Modules/IntelVSImplicitPath/hello.f => Tests/Wrapping/fltk2.fl (100%)
 copy Tests/{CMakeOnly/LinkInterfaceLoop/main.c => Wrapping/wrapFLTK.c} (100%)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.4.2-2088-ge9ac370

2016-01-22 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  e9ac370789a1020b85e7a928ffd97673cf79afad (commit)
   via  1d9c539cf72e29014e1d03cdede0cd15e64426d7 (commit)
   via  ddb09ec8f91e7215d867c83d9229d3558bf2c166 (commit)
   via  dcf977ea1a97f41fe19a871235dc75e85891e478 (commit)
   via  666487a402310ea69ac20b1d6dceb20746d16f6a (commit)
   via  f81ccc575331b4e184622b192deac2865931de19 (commit)
  from  54f9e335ddf7cd14e89f63eb688ad01c56b1a4fa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9ac370789a1020b85e7a928ffd97673cf79afad
commit e9ac370789a1020b85e7a928ffd97673cf79afad
Merge: 54f9e33 1d9c539
Author: Brad King 
AuthorDate: Fri Jan 22 09:26:02 2016 -0500
Commit: Brad King 
CommitDate: Fri Jan 22 09:26:02 2016 -0500

Merge branch 'master' into next


---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.4.2-2082-g54f9e33

2016-01-22 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  54f9e335ddf7cd14e89f63eb688ad01c56b1a4fa (commit)
   via  b94e855d5fbf5cae975034ce5d7836425c8ad87f (commit)
  from  d194d14ba6d2d685ce50a01830f00f07f67650b7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54f9e335ddf7cd14e89f63eb688ad01c56b1a4fa
commit 54f9e335ddf7cd14e89f63eb688ad01c56b1a4fa
Merge: d194d14 b94e855
Author: Brad King 
AuthorDate: Fri Jan 22 08:36:15 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Fri Jan 22 08:36:15 2016 -0500

Merge topic 'FindBoost-1.61' into next

b94e855d FindBoost: Add support for Boost 1.61


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b94e855d5fbf5cae975034ce5d7836425c8ad87f
commit b94e855d5fbf5cae975034ce5d7836425c8ad87f
Author: Sergei Nikulov 
AuthorDate: Fri Jan 22 10:50:25 2016 +0300
Commit: Brad King 
CommitDate: Fri Jan 22 08:35:04 2016 -0500

FindBoost: Add support for Boost 1.61

diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index edfed8e..c3058ea 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -707,7 +707,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
 set(_Boost_TIMER_DEPENDENCIES chrono system)
 set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono 
date_time atomic)
 set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION VERSION_LESS 106000 AND Boost_VERSION VERSION_LESS 
106100)
+  elseif(NOT Boost_VERSION VERSION_LESS 106000 AND Boost_VERSION VERSION_LESS 
106200)
 set(_Boost_CHRONO_DEPENDENCIES system)
 set(_Boost_COROUTINE_DEPENDENCIES context system)
 set(_Boost_FILESYSTEM_DEPENDENCIES system)
@@ -821,7 +821,7 @@ else()
   # information in _Boost_COMPONENT_DEPENDENCIES.  See the
   # instructions at the top of _Boost_COMPONENT_DEPENDENCIES.
   set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
-"1.60.0" "1.60"
+"1.61.0" "1.61" "1.60.0" "1.60"
 "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" 
"1.55"
 "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
 "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"

---

Summary of changes:
 Modules/FindBoost.cmake |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.4.2-897-gddb09ec

2016-01-22 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  ddb09ec8f91e7215d867c83d9229d3558bf2c166 (commit)
   via  9b08c6233052fa1c3d393ee474c874f997491f7b (commit)
  from  dcf977ea1a97f41fe19a871235dc75e85891e478 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ddb09ec8f91e7215d867c83d9229d3558bf2c166
commit ddb09ec8f91e7215d867c83d9229d3558bf2c166
Merge: dcf977e 9b08c62
Author: Brad King 
AuthorDate: Fri Jan 22 09:25:33 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Fri Jan 22 09:25:33 2016 -0500

Merge topic 'FindPNG-imported-targets'

9b08c623 FindPNG: Create an imported PNG::PNG target (#15911)


---

Summary of changes:
 Help/release/dev/FindPNG-imported-targets.rst |4 ++
 Modules/FindPNG.cmake |   50 +
 Tests/CMakeLists.txt  |4 ++
 Tests/{FindTIFF => FindPNG}/CMakeLists.txt|8 ++--
 Tests/FindPNG/Test/CMakeLists.txt |   16 
 Tests/FindPNG/Test/main.c |   20 ++
 6 files changed, 91 insertions(+), 11 deletions(-)
 create mode 100644 Help/release/dev/FindPNG-imported-targets.rst
 copy Tests/{FindTIFF => FindPNG}/CMakeLists.txt (55%)
 create mode 100644 Tests/FindPNG/Test/CMakeLists.txt
 create mode 100644 Tests/FindPNG/Test/main.c


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.4.2-893-g666487a

2016-01-22 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  666487a402310ea69ac20b1d6dceb20746d16f6a (commit)
   via  40249bccdf9c66453433da3608da9cc89cbee675 (commit)
  from  f81ccc575331b4e184622b192deac2865931de19 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=666487a402310ea69ac20b1d6dceb20746d16f6a
commit 666487a402310ea69ac20b1d6dceb20746d16f6a
Merge: f81ccc5 40249bc
Author: Brad King 
AuthorDate: Fri Jan 22 09:25:27 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Fri Jan 22 09:25:27 2016 -0500

Merge topic 'fix-pkg_search_module-cache'

40249bcc FindPkgConfig: set standard variables in the cache


---

Summary of changes:
 Modules/FindPkgConfig.cmake|3 +++
 .../FindPkgConfig/FindPkgConfig_cache_variables.cmake  |   16 
 Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake|1 +
 3 files changed, 20 insertions(+)
 create mode 100644 
Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


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 CMakeList.txt (one in the lib
> dir, one in the exe dir) to build the library and the executable.
> In addition, I would like my library to be able to be compiled by itself
> (its own project).
>
> Can someone point me how to do this?  I set it up for my program with v2.8
> but now this is failing on 3.4.2.


I recently tried doing this and wrote it up as a record for myself.
Of course, I don't know if it's the right way, but I'm doing it this
way until I figure out a better way...

See if this helps and let me know if you figure out something better:

http://www.rwanwork.info/sysdocs/cmake/overview/

Ray
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[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 forth.  What I would like to do is after everything is set up,
query the properties of bar
and find the list of libraries linked into bar in such a fashion I get
that platform's specific library name (instead of the library's target
name).

IS this possible?  I read the docs and didn't see a property for
getting this list.  Did I miss something?  If so I plan on using
either get_property of get_target_property.

Thanks.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [cmake-developers] Using CMake generated ninja file as a subninja file

2016-01-22 Thread Ben Boeckel
On Fri, Jan 22, 2016 at 17:34:03 +0100, Nicolas Desprès wrote:
> I have pushed a first draft of the patch here:
> 
> https://github.com/nicolasdespres/CMake/commit/67a4faad47378c07c97a29dd229d6f9fa500763b
> 
> I have tested with a small project and it looks good.

Looks like a good start to me as well. I added some comments on the
commit.

> I would like to add some regression tests but I don't know from where to
> start.
> 
> The principle would be to duplicate and modify existing tests so that
> CMAKE_NINJA_OUTPUT_PATH_PREFIX is set to "sub/" and the build directory is
> changed from _build to _build/sub. A dummy build.ninja file containing
> "subninja sub/build.ninja" should be generated in _build/build.ninja and
> ninja should be called from _build instead of _build/sub.
> 
> It would be great if you could point me some existing tests that could
> serve as a base to do the above.

The RunCMake test infrastructure would probably be the best place to
start. It could be modified to do some of this work.

Thanks,

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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 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 forth.  What I would like to do is after everything is set up,
>> query the properties of bar
>> and find the list of libraries linked into bar in such a fashion I get
>> that platform's specific library name (instead of the library's target
>> name).
>>
>> IS this possible?  I read the docs and didn't see a property for
>> getting this list.  Did I miss something?  If so I plan on using
>> either get_property of get_target_property.
>>
>> Thanks.
>
> Answering my own question
>
> get_property(libs TARGET a_target PROPERTY LINK_LIBRARIES)
> foreach(lib ${libs})
>   if(TARGET ${lib})
> get_property(path TARGET ${lib} PROPERTY LOCATION)
> message(STATUS ${path})
>   else()
> message(STATUS ${lib})
>   endif()
> endforeach()
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


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 dependency on foo.lib (on Windows) and
>libfoo.a on Linux.
>
>And so forth.  What I would like to do is after everything is set up,
>query the properties of bar
>and find the list of libraries linked into bar in such a fashion I get
>that platform's specific library name (instead of the library's target
>name).

Is that the description of your problem or part of your idea of a solution?

If you need the real list after the executable is built, you can use
https://cmake.org/cmake/help/v3.4/module/GetPrerequisites.html

I use that to assemble a  build directory on windows where the executable can 
be debugged easily. Use it as part of a post build cmake script that of 
configured with the proper search paths.

>IS this possible?  I read the docs and didn't see a property for
>getting this list.  Did I miss something?  If so I plan on using
>either get_property of get_target_property.
>
>Thanks.

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [cmake-developers] Using CMake generated ninja file as a subninja file

2016-01-22 Thread Nicolas Desprès
Ben,

I have pushed a first draft of the patch here:

https://github.com/nicolasdespres/CMake/commit/67a4faad47378c07c97a29dd229d6f9fa500763b

I have tested with a small project and it looks good.

I would like to add some regression tests but I don't know from where to
start.

The principle would be to duplicate and modify existing tests so that
CMAKE_NINJA_OUTPUT_PATH_PREFIX is set to "sub/" and the build directory is
changed from _build to _build/sub. A dummy build.ninja file containing
"subninja sub/build.ninja" should be generated in _build/build.ninja and
ninja should be called from _build instead of _build/sub.

It would be great if you could point me some existing tests that could
serve as a base to do the above.

Cheers,
Nicolas

On Wed, Jan 6, 2016 at 7:46 PM, Nicolas Desprès 
wrote:

>
>
> On Wed, Jan 6, 2016 at 7:35 PM, Ben Boeckel 
> wrote:
>
>> On Wed, Jan 06, 2016 at 19:26:11 +0100, Nicolas Desprès wrote:
>> > Is that variable already available or a name suggestion? I cannot find
>> any
>> > reference to it neither in the source nor in the documentation.
>>
>> It's a suggestion.
>>
>
> Ok, works for me too.
>
>
>> > This is acceptable for me since I have a custom generator that would
>> write
>> > the top build.ninja containing "subninja sub/build.ninja". The end-user
>> is
>> > supposed to run ninja from the top directory not from the top/sub/
>> > directory.
>>
>> It looks like subclassing cmLocalNinjaGenerator to override some
>> path-related bits and it should work (though it has changed enough with
>> cmState that I can't tell what exactly without doing more digging).
>>
>> The hardest problem is going to be with testing. Every generate step
>> will also have to dump a build.ninja file out so that it can be properly
>> tested.
>>
>> Brad is back later this week and may have other ideas too.
>>
>> I will try to have a patch working on a helloworld project first and I
> will get back to you for the testing part. That would be the hardest part
> indeed.
>
> Thanks for your help.
>
> --
> Nicolas Desprès
>



-- 
Nicolas Desprès
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] [CMake 0015933]: The install command should have an option to only install built targets

2016-01-22 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15933 
== 
Reported By:Ilya
Assigned To:
== 
Project:CMake
Issue ID:   15933
Category:   CMake
Reproducibility:N/A
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-01-22 10:05 EST
Last Modified:  2016-01-22 10:05 EST
== 
Summary:The install command should have an option to only
install built targets
Description: 
For library projects it common to provide different targets for static and
shared versions of the library.

Often, one only needs either shared or static library. It would be convenient if
install command would allow one to only install targets that were built. E.g. if
one builds a target via `cmake --build . --target sharedlib` calling `cmake
--build . --target install` should install only sharedlib without making static
version.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-01-22 10:05 Ilya   New Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


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 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 target "B" which requires target "A" that
> is not in the export set.
>
> I can solve the problem by installing A, but there is no need to. It is a
> temporary target that is statically linked. I just need to export for
> creating a package config file, so there's no need for the package config to
> ever need to worry about statically linked libraries.
>
> Is there a workaround for this?
>
> Long story short, I am trying to replicate convenience libraries from
> autotools. I'm having a hell of time doing it. I can use lists of sources,
> but that requires passing around global variables that include the sources
> and others that include the required libraries. This is far messier and far
> less convenient. I've tried object libraries, and while they eliminate the
> global source variables and prevent rebuilding things, they fail when the
> source is nested, and you want to build a "super library" from smaller
> object libraries, which I believe is a fairly common working pattern.
> Building a static library that is never installed works really well ...
> until I go to create a package config file. Then this export fails.
>
> Thanks,
> --Jack
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [cmake-developers] CMake daemon for user tools

2016-01-22 Thread James Johnston
> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org]
> On Behalf Of Milian Wolff
> Sent: Thursday, January 21, 2016 22:31
> To: Daniel Pfeifer
> Cc: CMake Developers; Stephen Kelly
> Subject: Re: [cmake-developers] CMake daemon for user tools
> 
> > What do you think about string interning? I started a cmString class
> > [2] that stores short strings inplace and puts long strings into a
> > pool. Copies never allocate extra memory and equality comparison is
> > always O(1).
> > In addition to `operator<` (which is lexicographical) there is a O(1)
> > comparison that can be used where lexicographical ordering is not
> > required (ie. for lookup tables).
> >
> > [1] https://en.wikipedia.org/wiki/String_interning
> > [2] https://github.com/purpleKarrot/CMake/commits/string-pool
> 
> Imo, you should replace this custom code by a boost::flyweight of
std::string.
> That said, I think this can have a significant impact on the memory
footprint
> of CMake, considering how heavy it relies on strings internally. But it
also
> seems to mutate strings a lot. I've seen places e.g. where a list of
compile-
> time known identifiers is prepended with "CMAKE_" at runtime. This is slow
> with normal strings (reallocations), but will also be slow with a
flyweight or
> interning, possibly even leading to the pollution of the internal pool
with
> temporary strings.
> 
> Did you measure any impact on both, runtime speed and memory footprint
> yet?

I was wondering the same.  I would guess maybe the biggest impact would be
the inplace storage of strings for small sized strings.  But to know the
inplace buffer size would probably require some profiling and measurement of
string sizes... otherwise it is just a wild guess... 

Maybe for testing, you can swap out the string header file on your system
with one that logs allocations/string sizes, and perhaps also profiles the
time it takes to make each allocation?

The interesting question is: could inplace storage be used for 95% of the
cases such that fussing with string interning becomes unnecessary
complexity?  If so, then you mentioned equality comparison as another issue:
the interesting question there is how much time is spent on allocations vs
comparisons...

In another application I worked on, I was able to get a big improvement in
performance by replacing usage of std::vector in one place with a custom
vector that stack-allocated the first 10 items (i.e. fixed-size C array as a
member variable of the class), and then reverted to a regular vector after
that.  But to pick the number "10" required some profiling/measurement.  The
remaining use of the heap was so negligible as to not be worth improving.

Best regards,

James Johnston


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[Cmake-commits] CMake branch, master, updated. v3.4.2-900-g4a3fa1e

2016-01-22 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  4a3fa1e8a09ef1fa674d36c1188bb73aed0de231 (commit)
  from  1d9c539cf72e29014e1d03cdede0cd15e64426d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a3fa1e8a09ef1fa674d36c1188bb73aed0de231
commit 4a3fa1e8a09ef1fa674d36c1188bb73aed0de231
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Sat Jan 23 00:01:04 2016 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Sat Jan 23 00:01:04 2016 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 58d6bee..72ac6eb 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 4)
-set(CMake_VERSION_PATCH 20160122)
+set(CMake_VERSION_PATCH 20160123)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits