Re: [CMake] GCC: -std=g++14 vs -std=c++14

2016-06-14 Thread Patrick Boettcher
On Mon, 13 Jun 2016 20:05:23 +0200
Patrick Boettcher  wrote:
> > You also need to correctly set the CXX_EXTENSIONS properties to get
> > a standard standard.  
> 
> Yep, 
> 
>   set(CXX_EXTENSIONS OFF)
> 
> seems to do the trick - thanks.

Well, it is 
  
  set(CMAKE_CXX_EXTENSIONS OFF)

actually. Before the target-definition (add_library or add_executable).


--
Patrick.
-- 

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] Finding libxml2 when building llvm/clang

2016-06-14 Thread Edward Diener
Building llvm/clang from source involves using CMake. I am building 
llvm/clang from source on Windows using CMake 3.5.2. I am not a clang 
developer, just a clang user. Similarly I just use CMake rather than 
understand or write CMakeLists.txt files.


I reported a problem to clang where building a 32-bit version of clang 
succeeds but building a 64-bit version of clang fails with xml link 
errors. I have A 32-bit libxml2 binary in my path from gnuwin32, but not 
a 64-bit binary of libxml2 in my path.


I was told by clang developers that one of the tools which clang builds 
uses xml and libxml2 if it is available, otherwise uses some other 
technology for the tool. The suggestion was that the problem I am 
encountering is that of CMake; that CMake does not recognize that the 
libxml2 which I have is the 32-bit version and instead thinks that it is 
the 64-bit version and therefore attempts erroneously to use it in the 
64-bit build of clang.


Does anybody know what might be happening here ? I do not create the 
CMakeLists.txt files used by llvm/clang so I do not know how the use of 
libxml2 can be optionally specified in them.


--

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] CMAKE - troubles finding executables/paths - Windows 7 / MinGW

2016-06-14 Thread Martin Weber
Yes, I know this [1] thread is old, but it hurts me, too.

This is what I found:
The mingw32 installer (mingw32-get, IIRC) no longer places a key in the 
windows registry.

So if anyone installed mingw32 in a directory other than c:/MinGW/,
cmake will not find it.
After adding the bin directory of the mingw install location to %PATH%, cmake 
will detect mingw32-make, but it will complain saying 'the compiler is not 
able to build a single program'. 
This happens because cc1.exe (which is *not* in the bin directory) cannot find 
the DLLs located in the bin directory. You have to manually copy the DLLs to 
the directory containing cc1.exe.

Maybe someone finds this useful.

Martin

[1] https://cmake.org/pipermail/cmake/2011-May/044637.html

-- 
Cd wrttn wtht vwls s mch trsr.


-- 

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] Provide configuration settings for users

2016-06-14 Thread Elizabeth A. Fischer
Cedric,

I would highly recommend an auto-builder such as Spack as a good way to
have a system that automatically downloads and installs dependencies for
your software.  My software requires about 50 dependencies (once recursive
dependencies are counted), and I've successfully used Spack to have others
install it.  See instructions for installing my software stack using Spack
at:

   https://github.com/citibeth/icebin

(Most of these instructions are for bootstrapping Spack on old machines,
and not directly for my particular software).

This approach is a lot easier for you and your users, and more flexible to
boot:

 1. You don't have to deal with advanced/esoteric features like
ExternalProject, CMakeList templates, etc.

 2. It doesn't matter what build system your dependencies were written
with.  (I've heard of people writing CMake builds for all their
dependencies.  As much as I like CMake, that seems like a painful way to
proceed).

 3. Consider what would happen if every project used ExternalProject for
its dependencies: we'd be unable to link projects together as soon as they
share a sub-dependency, since every project would be building its own.  You
really want to build a coherent software DAG (Directed Acyclic Graph) at a
level ABOVE the single-project level, in order to avoid duplicate /
conflicting packages in your build.  For that reason, the project-building
level (CMake) is fundamentally the wrong place to do this.  It should be
done by auto-builders on top of the project level (Spack, EasyBuild,
MacPorts, Gentoo Portage, etc).

-- Elizabeth



On Tue, Jun 14, 2016 at 6:28 AM, Cedric Doucet 
wrote:

>
> Hello,
>
> is there a native way to provide configuration settings for the users of a
> software?
>
> For example, I develop a software which depends on several 3rd party
> libraries which are automatically downloaded and installed with the
> ExternalProject module.
> My CMake configuration scripts are written so as to handle these 3rd party
> libraries.
> During installation of the software, header files and libraries are copied
> to the destination directory but (of course) without their 3rd party
> dependencies.
>
> Therefore, if a user wants to use my software, he has to handle these 3rd
> party libraries during compilation and linking steps.
> Depending on the skills of the user, it may be difficult to achieve it.
>
> I would like to know if there exists a native way of providing sufficient
> configuration information so that users do not have to handle these
> libraries.
> For the moment, I provide a CMakeLists template but I wonder if it's the
> best possible solution.
>
> Best regards,
>
> Cédric Doucet
>
> --
>
> 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] Provide configuration settings for users

2016-06-14 Thread Chuck Atkins
Hi Cedric,

It sounds like creating a package config file is exactly what you need.
When installed, a user will be able to consume your project with
"find_package(Foo)".  That will locate and read the package config file
which will create an imported target Foo::Foo.  This imported target will
cary with it all of the necessary link dependency information.

See https://cmake.org/cmake/help/v3.6/manual/cmake-packages.7.html for more
details.

- Chuck

On Tue, Jun 14, 2016 at 6:28 AM, Cedric Doucet 
wrote:

>
> Hello,
>
> is there a native way to provide configuration settings for the users of a
> software?
>
> For example, I develop a software which depends on several 3rd party
> libraries which are automatically downloaded and installed with the
> ExternalProject module.
> My CMake configuration scripts are written so as to handle these 3rd party
> libraries.
> During installation of the software, header files and libraries are copied
> to the destination directory but (of course) without their 3rd party
> dependencies.
>
> Therefore, if a user wants to use my software, he has to handle these 3rd
> party libraries during compilation and linking steps.
> Depending on the skills of the user, it may be difficult to achieve it.
>
> I would like to know if there exists a native way of providing sufficient
> configuration information so that users do not have to handle these
> libraries.
> For the moment, I provide a CMakeLists template but I wonder if it's the
> best possible solution.
>
> Best regards,
>
> Cédric Doucet
>
> --
>
> 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] Provide configuration settings for users

2016-06-14 Thread Cedric Doucet

Hello, 

is there a native way to provide configuration settings for the users of a 
software? 

For example, I develop a software which depends on several 3rd party libraries 
which are automatically downloaded and installed with the ExternalProject 
module. 
My CMake configuration scripts are written so as to handle these 3rd party 
libraries. 
During installation of the software, header files and libraries are copied to 
the destination directory but (of course) without their 3rd party dependencies. 
Therefore, if a user wants to use my software, he has to handle these 3rd party 
libraries during compilation and linking steps. 
Depending on the skills of the user, it may be difficult to achieve it. 

I would like to know if there exists a native way of providing sufficient 
configuration information so that users do not have to handle these libraries. 
For the moment, I provide a CMakeLists template but I wonder if it's the best 
possible solution. 

Best regards, 

Cédric Doucet 
-- 

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