Re: [CMake] cmake-2.8.12: generator expression error when linker flags have comma

2013-10-20 Thread Nick Hutchinson
target_link_libraries() is supposed to work for linker flags as well:

cmake version 2.8.12
  target_link_libraries
   Link a target to given libraries.

 target_link_libraries( [item1 [item2 [...]]]
   [[debug|optimized|general] ] ...)

   Specify libraries or flags to use when linking a given target.  The
   named  must have been created in the current directory by a
   command such as add_executable or add_library.  The remaining
   arguments specify library names or flags.


On 20 Oct 2013, at 09:13, Rolf Eike Beer  wrote:

> Am Samstag, 19. Oktober 2013, 18:01:55 schrieb Jed Brown:
>> I just upgraded from cmake-2.8.11.2 to 2.8.12 and now get errors when a
>> comma ',' appears in a linker flag.  Test case below.  Note that this is
>> but one of many reasons for a comma to appear in linker flags.
>> 
>> https://gist.github.com/jedbrown/7062540
>> 
>>$ mkdir build && cd build
>>$ cmake -DDEP_LIBS:STRING='-Wl,--start-group -llapack -lblas
>> -Wl,--end-group' ..
> 
>> target_link_libraries(foo ${DEP_LIBS})
> 
> target_link_libraries is about libraries. No wonder it breaks if you pass 
> other stuff in there. I wonder if using FindBLAS and FindLAPACK would help 
> you 
> out of that.
> 
> Eike--
> 
> 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://www.cmake.org/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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Faking a library

2013-10-19 Thread Nick Hutchinson
As of 2.8.12, you can set target properties on an imported library to
specify its include directories, compile options etc, and these will be
automatically propagated to any other target that links to it via
target_link_libraries(). No more tedious faffing about with global
variables like GTEST_INCLUDE_DIRS, GTEST_LIBRARIES etc. It's really quite
nice.

Check the 2.8.12 CMake docs for target properties that start with
"INTERFACE".

Nick


On 19 October 2013 08:59, Magnus Therning  wrote:

> On Sat, Oct 19, 2013 at 11:28:53AM +0400, Игорь Пашев wrote:
> > 2013/10/19 Magnus Therning :
> > > Is it possible to put the include path in some property on the library
> > > as well, to avoid using a separate variable for that?
> >
> > SET_TARGET_PROPERTIES (target PROPERTIES 
> )
>
> Of course, but then how do I use it conveniently?
>
> Would it be possible, by choosing a good property name, to simply do
>
> target_include_directories(one_test PRIVATE
> target
> )
>
> Or would I have to
>
> get_target_property(INC_DIR target )
> target_include_directories(one_test PRIVATE
> ${INC_DIR}
> )
>
> in which case using a property wouldn't give me very much.
>
> /M
>
> --
> Magnus Therning  OpenPGP: 0xAB4DFBA4
> email: mag...@therning.org   jabber: mag...@therning.org
> twitter: magthe   http://therning.org/magnus
>
> The British have "the perfect temperament to be hackers--technically
> skilled, slightly disrespectful of authority, and just a touch of
> criminal behavior".
>  -- Mary Ann Davidson, Oracle's Security Chief
>
> --
>
> 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://www.cmake.org/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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Bug fix requests for the *next* release of CMake...

2012-11-11 Thread Nick Hutchinson
http://public.kitware.com/Bug/view.php?id=13574


On 8/11/2012, at 5:39 PM, cmake-requ...@cmake.org wrote:

> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
> David Cole
> Sent: mercredi 7 novembre 2012 20:41
> To: cmake; CMake Developers
> Subject: [CMake] Bug fix requests for the *next* release of CMake...
> 
> Hi all,
> 
> Replies requested. Short replies only. Read on. Just a short reply with bug 
> numbers or links to the bugs is all we need here.
> 
> Example one-line reply:
> 
>  http://public.kitware.com/Bug/view.php?id=13571
> 
> Please move specific discussions into the bugs themselves or start a new 
> thread to talk about it... Replies on this thread should just be a collector 
> for bug numbers.
> 
> We are aiming for approximately quarterly releases from now on, scheduling 
> them every 3 to 4 months. The next release of CMake will likely be version 
> 2.8.11, scheduled to have an "rc1" release candidate on Wed. January 9, 2013 
> -- just 9 weeks from today.
> 
> If you have a particular issue that you think should be fixed for inclusion 
> in 2.8.11, please bring it up within the next two weeks.
> Ideally, each issue will be discussed as needed on the mailing list to come 
> to any consensus about what should be done to fix it, and then an entry in 
> the bug tracker may be used to keep it on the radar screen, and to track 
> activity related to it. You can see what's already on the roadmap for this 
> release here:
> 
>  http://public.kitware.com/Bug/roadmap_page.php?version_id=103
> 
> Patches are always welcome. Patches that include testing of any new features, 
> or tests that prove a bug is really fixed on the dashboards, (basically any 
> patch with testing) is preferred over a patch with no testing. Also, if you 
> are *adding* code, then you also probably need to add *tests* of that code, 
> so that the coverage percentage stays as is or rises.
> 
> Please discuss issues here as needed, and add notes to existing issues in the 
> bug tracker that you are interested in seeing fixed -- we will be looking at 
> the mailing list and activity in the bug tracker to help prioritize the bug 
> fixes that will occur in the near future.
> 
> 
> Thanks,
> David Cole
> Kitware, Inc.
> 
> 
> P.S. - as a nice summary of what we accomplished in the CMake 2.8.10 release, 
> see here:
> http://public.kitware.com/Bug/changelog_page.php?version_id=100 -- it 
> currently lists 58 issues that we resolved: nice job, everybody!
> 
> (Many of those were specifically addressed because somebody asked for it 
> right here on the mailing list... Don't be shy!)
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 
> 

--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake