[CMake] Building a tool immediately so it can be used later in same CMake run

2016-03-31 Thread Craig Scott
All, I originally planned to ask this question directly on this mailing list, but it got a bit more involved, so I posted it to stackoverflow instead. I'm interested if anyone can shed some more authoritative light on the proposed method for the following question: http://stackoverflow.com/q/3608

Re: [CMake] Creating a list of link directories from a variable

2016-03-31 Thread Hendrik Sattler
Hi, If the library is a shared object, try to NOT use all those libraries. If they are used in the library but are not part of its public API, you most likely don't need to link them. If you have no missing symbols when linking, you can avoid overlinking you program. If this is a static librar

[CMake] Creating a list of link directories from a variable

2016-03-31 Thread Salazar De Troya, Miguel
Hello I am trying to compile a program with a library that provides a bash script to generate the dependencies, libraries and the link directories for the Makefile. I want to generate a CMakeLists.txt that can handle these dependencies from that library. I have been able to come up with regexp

Re: [CMake] Mixing up project language settings?

2016-03-31 Thread Nicholas Braden
If the new C++ components are built optionally, I would use enable_language(CXX): https://cmake.org/cmake/help/latest/command/enable_language.html Otherwise, if the project will always need C++ support from now on, amend the project() statement. In this case it doesn't matter whether you add CXX o

[CMake] Mixing up project language settings?

2016-03-31 Thread Fedja Jeleskovic
Hi there! I am adding few components to the existing cmake driven C project, but new components need C++ compiler instead. Top level CMakeLists.text starts with: project (appName C) The question is whether I need to change to top level settings and just include CXX (or just remove C part since th

Re: [CMake] Issues using CPack for making a debian package

2016-03-31 Thread Wagner, David
On 23/03/2016 16:15, Domen Vrankar wrote: I'm considering working my problem around by shipping a patched copy of CPackDeb.cmake, using this `-l` option. Has anyone another solution? Other than disabling use of dpkg-shlibdeps with CPACK_DEBIAN_PACKAGE_SHLIBDEPS nothing comes to mind. Would you

Re: [CMake] add_custom_command() OUTPUT does not accept generator expressions, why?

2016-03-31 Thread Yves Frederix
Hi Brad, > > If anyone is interested in trying to implement generator expressions > for custom command outputs, I can provide more details to get started. I am interested in having a go at this. I recently ran into this issue at work as well and actually tried some things already. However, I real

Re: [CMake] add_custom_command() OUTPUT does not accept generator expressions, why?

2016-03-31 Thread Dan Liew
Hi, On 28 March 2016 at 15:05, Brad King wrote: > On 03/27/2016 06:11 AM, Dan Liew wrote: >> OUTPUT does not accept generator expressions, why? > > It hasn't been implemented. At least at one time it would have been > very hard to implement. I'm not sure now because there has been a lot > of re

Re: [CMake] using cmake to link header files: file could be found, is included, but build error when using nmake.

2016-03-31 Thread Petr Kmoch
Hi Karel, I've noticed a few points where you could start looking for a solution: * You're mentioning that CMake warns about some linking stuff, but the compiler error is one about including a header file. Libraries and headers are fundamentally different objects: header files are used by the com