Re: [cmake-developers] [CMake] libc++ usage in CMake with Clang?

2018-08-21 Thread Ian Henriksen
On Tue, Aug 21, 2018 at 6:40 PM Craig Scott  wrote:

>
> On Wed, Aug 22, 2018 at 7:18 AM, Robert Dailey 
> wrote:
>
>> On Tue, Aug 21, 2018 at 3:47 PM Craig Scott 
>> wrote:
>> > Excuse the brevity, but it sounds like you might be looking for the
>> CXX_EXTENSIONS target property (sorry if I've misunderstood your problem,
>> let me know why it isn't appropriate if so). See the following article for
>> a more complete overview of this and related properties:
>> >
>> > https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/
>>
>> Unfortunately that's not the same. Extensions manage C++ language
>> features and STL capabilities, but -stdlib is for selecting an STL
>> implementation, AFAIK. Such as GNU STL and LLVM STL (which is libc++
>> to clang).
>>
>
> Sorry, yes I misunderstood your problem. After a little digging, it seems
> like you probably shouldn't be using the -stdlib option on Linux
>  anyway. FWIW, for Android,
> the roadmap
> 
> is converging on a single STL implementation too.
>

All that first link says is that -stdlib is a flag that is specific to
clang and that it shouldn't be used with gcc. You can use clang on Linux
with either libstdc++ or libc++. I often use libc++ on Linux by setting
CMAKE_CXX_FLAGS on the command line, though I'll admit that for me it's
usually just to check if problems that come up are OS dependent, compiler
dependent, or standard library dependent. You have to be careful since
libstdc++ and libc++ have incompatible ABIs, but it's a useful feature.
That said, I have no idea if specifying the standard library implementation
merits handling at the CMake level since only clang supports switching
anyway.

Just my two cents though.

Best,

Ian


> Regarding your earlier comment:
>
> I'll explain a bit why I'm asking. I noticed that for code bases that
>> work on Android plus other UNIX platforms, they unconditionally
>> specify `-stdlib=libc++`, however this doesn't work on Ubuntu by
>> default, which uses gnu stl + gcc/clang. So  you get compiler errors.
>> There's no way for me to "search" a platform to see if it is eligible
>> for the libc++ flag, I simply have to either disable it completely or
>> conditionally include it based on target platform and/or toolchain.
>> None of these really address the root cause.
>
> If you are trying to control which STL to use for Android builds, CMake 
> variables like CMAKE_ANDROID_STL_TYPE are probably the more appropriate way 
> to do that rather than hard-coding compiler flags. This would also mean that 
> non-Android builds won't be affected since they would simply ignore that 
> variable (and target properties it may affect) and should then pick up the 
> right STL implementation automatically.The Android-specific variable would 
> ideally be set in a toolchain file rather than in the project itself.
>
>
> --
>
> Craig Scott
> Melbourne, Australia
> https://crascit.com
>
> New book released: Professional CMake: A Practical Guide
> 
> --
>
> 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:
> https://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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] libc++ usage in CMake with Clang?

2018-08-21 Thread Craig Scott
On Wed, Aug 22, 2018 at 7:18 AM, Robert Dailey 
wrote:

> On Tue, Aug 21, 2018 at 3:47 PM Craig Scott 
> wrote:
> > Excuse the brevity, but it sounds like you might be looking for the
> CXX_EXTENSIONS target property (sorry if I've misunderstood your problem,
> let me know why it isn't appropriate if so). See the following article for
> a more complete overview of this and related properties:
> >
> > https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/
>
> Unfortunately that's not the same. Extensions manage C++ language
> features and STL capabilities, but -stdlib is for selecting an STL
> implementation, AFAIK. Such as GNU STL and LLVM STL (which is libc++
> to clang).
>

Sorry, yes I misunderstood your problem. After a little digging, it seems
like you probably shouldn't be using the -stdlib option on Linux
 anyway. FWIW, for Android,
the roadmap
 is
converging on a single STL implementation too.

Regarding your earlier comment:

I'll explain a bit why I'm asking. I noticed that for code bases that
> work on Android plus other UNIX platforms, they unconditionally
> specify `-stdlib=libc++`, however this doesn't work on Ubuntu by
> default, which uses gnu stl + gcc/clang. So  you get compiler errors.
> There's no way for me to "search" a platform to see if it is eligible
> for the libc++ flag, I simply have to either disable it completely or
> conditionally include it based on target platform and/or toolchain.
> None of these really address the root cause.

If you are trying to control which STL to use for Android builds,
CMake variables like CMAKE_ANDROID_STL_TYPE are probably the more
appropriate way to do that rather than hard-coding compiler flags.
This would also mean that non-Android builds won't be affected since
they would simply ignore that variable (and target properties it may
affect) and should then pick up the right STL implementation
automatically.The Android-specific variable would ideally be set in a
toolchain file rather than in the project itself.


-- 

Craig Scott
Melbourne, Australia
https://crascit.com

New book released: Professional CMake: A Practical Guide

-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] libc++ usage in CMake with Clang?

2018-08-21 Thread Robert Dailey
On Tue, Aug 21, 2018 at 3:47 PM Craig Scott  wrote:
> Excuse the brevity, but it sounds like you might be looking for the 
> CXX_EXTENSIONS target property (sorry if I've misunderstood your problem, let 
> me know why it isn't appropriate if so). See the following article for a more 
> complete overview of this and related properties:
>
> https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/

Unfortunately that's not the same. Extensions manage C++ language
features and STL capabilities, but -stdlib is for selecting an STL
implementation, AFAIK. Such as GNU STL and LLVM STL (which is libc++
to clang).
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] Quiet option for cmake

2018-08-21 Thread Craig Scott
A user has recently been asking
 about reducing the
output coming from a FetchContent population when nothing needs to be done
(i.e. the content has already been populated). Because this is implemented
as a sub-build, you always see the following extra lines in the main
project's configure output (during the main configure, I'm not talking here
about the same messages at the end of the main configure):

-- Configuring done
-- Generating done
-- Build files have been written to: ...

I'm wondering if it makes sense to add support for a --quiet or --silent
option to cmake (and probably ccmake and cmake gui) which would skip these
messages? It would be an option question whether ordinary status messages
and messages which don't set any message mode should still be output for
such an option (maybe they would for --quiet but not for --silent). While
FetchContent is the motivation for this, perhaps other uses of CMake may
also find it useful as well.

-- 
Craig Scott
Melbourne, Australia
https://crascit.com

New book released: Professional CMake: A Practical Guide

-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] libc++ usage in CMake with Clang?

2018-08-21 Thread Craig Scott
On Tue, Aug 21, 2018 at 11:41 PM, Robert Dailey 
wrote:

> I'll explain a bit why I'm asking. I noticed that for code bases that
> work on Android plus other UNIX platforms, they unconditionally
> specify `-stdlib=libc++`, however this doesn't work on Ubuntu by
> default, which uses gnu stl + gcc/clang. So  you get compiler errors.
> There's no way for me to "search" a platform to see if it is eligible
> for the libc++ flag, I simply have to either disable it completely or
> conditionally include it based on target platform and/or toolchain.
> None of these really address the root cause.
>
> I'm not even really sure what a find module for this would do... but
> typically find modules don't provide compiler flags, so I'm not sure
> if that's the right tool for the job. Would love to hear from the
> developers on this, so I've cross posted to the dev mailing list in
> this reply.
>


Excuse the brevity, but it sounds like you might be looking for the
CXX_EXTENSIONS target property (sorry if I've misunderstood your problem,
let me know why it isn't appropriate if so). See the following article for
a more complete overview of this and related properties:

https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/





> On Mon, Aug 20, 2018 at 10:05 PM Thompson, KT  wrote:
> >
> > I'm also interested in the answer to Robert's question.  I've been using
> >
> >   set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++")
> >
> > but it seems like there should be a more elegant approach.
> >
> > -tk
> >
> > -Original Message-
> > From: CMake  On Behalf Of Robert Dailey
> > Sent: Monday, August 20, 2018 11:48 AM
> > To: CMake 
> > Subject: [CMake] libc++ usage in CMake with Clang?
> >
> > Is the only way to use libc++ to muck with compile flags? Or is there a
> proper find module for this or something? Is there a more CMake-esque way
> of specifying the STL library to use with the toolchain?
> > --
> >
> > 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:
> > https://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:
> https://cmake.org/mailman/listinfo/cmake-developers
>



-- 
Craig Scott
Melbourne, Australia
https://crascit.com

New book released: Professional CMake: A Practical Guide

-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] brief CDash outage

2018-08-21 Thread Zack Galbreath
This is complete.  As always, please let us know if you notice anything
that doesn't seem right.

On Tue, Aug 21, 2018 at 1:12 PM, Zack Galbreath 
wrote:

> We will be upgrading the system that cdash.org runs on at 2:30pm EDT
> today (a little over an hour from now).  We expect the system to be down
> for 15-30 minutes (or less).
>
> I'll reply to this message when the upgrade is complete.
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] brief CDash outage

2018-08-21 Thread Zack Galbreath
We will be upgrading the system that cdash.org runs on at 2:30pm EDT today
(a little over an hour from now).  We expect the system to be down for
15-30 minutes (or less).

I'll reply to this message when the upgrade is complete.
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Shared libraries

2018-08-21 Thread REIX, Tony
Hi Chuck,


Thanks for the information.


We launch cmake on MariaDB code with:

   -DBUILD_SHARED_LIBS=true


Moreover, here are the few places in MariaDB code where BUILD_SHARED_LIBS 
appears:

# grep -R BUILD_SHARED_LIBS *
CMakeCache.txt:BUILD_SHARED_LIBS:UNINITIALIZED=true
pcre/CMakeLists.txt:# IF(NOT BUILD_SHARED_LIBS)
pcre/CMakeLists.txt:# ENDIF(NOT BUILD_SHARED_LIBS)
pcre/CMakeLists.txt:#  MESSAGE(STATUS "  Build shared libs ... : 
${BUILD_SHARED_LIBS}")
plugin/aws_key_management/CMakeLists.txt:-DBUILD_SHARED_LIBS=OFF


What does the first line means ?


Thx/Regards,



Cordialement,

Tony Reix

tony.r...@atos.net

ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net



De : Chuck Atkins 
Envoyé : mardi 21 août 2018 18:02
À : REIX, Tony
Cc : CMake Developers
Objet : Re: [cmake-developers] Shared libraries

Hi Tony,

I expect what your seeing is likely the result of how MaraiaDBhas specifically 
implemented their CMake build.  The only builtin CMake variable to control this 
is BUILD_SHARED_LIBS, which when set to "ON" changes the behavior of 
add_library(foo) to be add_library(foo SHARED), instead of the default 
add_library(foo STATIC).  The other BUILD_STATIC_LIBS and DISABLE_SHARED are 
variables are not builtin to CMake and are part of however they have chosen to 
implement their build.

CMake builds are typically designed to produce a single configuration, i.e. 
shared release or static debug, etc.  Often, however, because to have the 
flexibility to do otherwise. projects will try to instead implement a build 
that produces several configurations in a single pass.  It seems this is what 
MariaDB has done and as such the variables to control it will be unique and 
specific to that project and how they've decided to implement it.

--
Chuck Atkins
Staff R Engineer, Scientific Computing
Kitware, Inc.


On Thu, Aug 9, 2018 at 12:23 PM REIX, Tony 
mailto:tony.r...@atos.net>> wrote:

Hi,


On AIX, when building MongoC 1.11, cmake 3.11.4 generates lib*.so files and 
lib*.a files which contain .o files.

On AIX, we should get libraries lib*.a containing the lib*.so file.

I've tried to use:

-DBUILD_SHARED_LIBS=ON  \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_C_CREATE_SHARED_LIBRARY=ON  \
-DCMAKE_CXX_CREATE_SHARED_LIBRARY=ON
and I see that, for MariaDB, someone has tried with:

-DDISABLE_SHARED=OFF


None seems to work.


Which CMake variable should I use for asking CMAKE to generate shared libraries 
rather than static ones: lib*.a file containing .so files rather than .o files.


Thanks


Cordialement,

Tony Reix

tony.r...@atos.net

ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net
--

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:
https://cmake.org/mailman/listinfo/cmake-developers
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Shared libraries

2018-08-21 Thread Chuck Atkins
Hi Tony,

I expect what your seeing is likely the result of how MaraiaDBhas
specifically implemented their CMake build.  The only builtin CMake
variable to control this is BUILD_SHARED_LIBS, which when set to "ON"
changes the behavior of add_library(foo) to be add_library(foo SHARED),
instead of the default add_library(foo STATIC).  The other
BUILD_STATIC_LIBS and DISABLE_SHARED are variables are not builtin to CMake
and are part of however they have chosen to implement their build.

CMake builds are typically designed to produce a single configuration, i.e.
shared release or static debug, etc.  Often, however, because to have the
flexibility to do otherwise. projects will try to instead implement a build
that produces several configurations in a single pass.  It seems this is
what MariaDB has done and as such the variables to control it will be
unique and specific to that project and how they've decided to implement it.

--
Chuck Atkins
Staff R Engineer, Scientific Computing
Kitware, Inc.


On Thu, Aug 9, 2018 at 12:23 PM REIX, Tony  wrote:

> Hi,
>
>
> On AIX, when building MongoC 1.11, cmake 3.11.4 generates lib*.so files
> and lib*.a files which contain .o files.
>
> On AIX, we should get libraries lib*.a containing the lib*.so file.
>
> I've tried to use:
>
> -DBUILD_SHARED_LIBS=ON  \
> -DBUILD_STATIC_LIBS=OFF \
> -DCMAKE_C_CREATE_SHARED_LIBRARY=ON  \
> -DCMAKE_CXX_CREATE_SHARED_LIBRARY=ON
> and I see that, for MariaDB, someone has tried with:
>
> -DDISABLE_SHARED=OFF
>
>
> None seems to work.
>
>
> Which CMake variable should I use for asking CMAKE to generate shared
> libraries rather than static ones: lib*.a file containing .so files rather
> than .o files.
>
>
> Thanks
>
>
> Cordialement,
>
> Tony Reix
>
> tony.r...@atos.net
>
> ATOS / Bull SAS
> ATOS Expert
> IBM Coop Architect & Technical Leader
> Office : +33 (0) 4 76 29 72 67
> 1 rue de Provence - 38432 Échirolles - France
> www.atos.net
> 
> --
>
> 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:
> https://cmake.org/mailman/listinfo/cmake-developers
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] libc++ usage in CMake with Clang?

2018-08-21 Thread Robert Dailey
I'll explain a bit why I'm asking. I noticed that for code bases that
work on Android plus other UNIX platforms, they unconditionally
specify `-stdlib=libc++`, however this doesn't work on Ubuntu by
default, which uses gnu stl + gcc/clang. So  you get compiler errors.
There's no way for me to "search" a platform to see if it is eligible
for the libc++ flag, I simply have to either disable it completely or
conditionally include it based on target platform and/or toolchain.
None of these really address the root cause.

I'm not even really sure what a find module for this would do... but
typically find modules don't provide compiler flags, so I'm not sure
if that's the right tool for the job. Would love to hear from the
developers on this, so I've cross posted to the dev mailing list in
this reply.
On Mon, Aug 20, 2018 at 10:05 PM Thompson, KT  wrote:
>
> I'm also interested in the answer to Robert's question.  I've been using
>
>   set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++")
>
> but it seems like there should be a more elegant approach.
>
> -tk
>
> -Original Message-
> From: CMake  On Behalf Of Robert Dailey
> Sent: Monday, August 20, 2018 11:48 AM
> To: CMake 
> Subject: [CMake] libc++ usage in CMake with Clang?
>
> Is the only way to use libc++ to muck with compile flags? Or is there a 
> proper find module for this or something? Is there a more CMake-esque way of 
> specifying the STL library to use with the toolchain?
> --
>
> 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:
> https://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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] RfD: deprecate link_directories() and link_libraries()

2018-08-21 Thread Gregor Jasny via cmake-developers

Hello,

On 20.08.18 19:10, Brad King wrote:

On 08/15/2018 01:30 PM, Rolf Eike Beer wrote:

My dislike against these functions is probably known, and now I would like to
bring this to a new level: I would like to formally deprecate these functions.
I don't think they serve any useful purpose anymore, given that now even the
pkg-config module can (and does) return absolute paths to the libraries.


What harm does their presence cause?

Please ask on the user list to see if people are using them.

I suspect they may be used by some projects to link to special runtime
libraries when cross-compiling.  We'd need to make sure there is a
better way for all such use cases before deprecating the commands.


We use link_directories() on Windows to give the windows linker the path 
to the boost libraries. Those use '#pragma comment lib' to link required 
libs.


How would one deal with '#pragma comment lib' w/o link_directories()?

Thanks,
Gregor
--

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:
https://cmake.org/mailman/listinfo/cmake-developers