Re: [CMake] Build dependent targets

2019-11-19 Thread Eric Noulard
Le mar. 19 nov. 2019 à 11:52, Ellon Paiva a écrit : > Hi Eric, > > On 11/19/19 11:10 AM, Eric Noulard wrote: > > > > Le mar. 19 nov. 2019 à 11:03, Ellon Paiva a écrit : > >> Hi, >> >> I was wondering: is there any way to compile all targets th

Re: [CMake] Build dependent targets

2019-11-19 Thread Eric Noulard
Le mar. 19 nov. 2019 à 11:03, Ellon Paiva a écrit : > Hi, > > I was wondering: is there any way to compile all targets that depend on > a given target ? (i.e. the "dependent targets", if my English does not > fail). > > In my particular case, I have a huge project that contains many libs and > ex

Re: [CMake] CHECK_CXX_COMPILER_FLAG doesn't give correct result for -fsanitize=address

2019-10-25 Thread Eric Noulard
Le jeu. 24 oct. 2019 à 22:32, Turner, Adrian Keith via CMake < cmake@cmake.org> a écrit : > Hi CMake Mailing List, > > > I am using the CHECK_CXX_COMPILER_FLAG directive in a CMake file to > detect whether the compiler uses the "-fsanitize=address" compiler flag. > I'm using the g++ 7.3.0 compiler

Re: [CMake] Alternative locations for boost in cmake

2019-10-25 Thread Eric Noulard
Le ven. 25 oct. 2019 à 09:55, Mahmood Naderan via CMake a écrit : > Even with the latest 3.15.4, I get the same error > > > $ cmake --version > cmake version 3.15.4 > > CMake suite maintained and supported by Kitware (kitware.com/cmake). > $ cmake -DBoost_NO_SYSTEM_PATHS=ON > -DBOOST_INCLUDE_DIR=

Re: [CMake] Help request for hierarchical directory example

2019-10-18 Thread Eric Noulard
Le ven. 18 oct. 2019 à 12:53, David Aldrich a écrit : > Hi > > > > I'm learning how to use hierarchical directories in CMake and am trying to > get an example to work that I saw on YouTube. The example isn't doing what > I expect so I would be grateful for some help in understanding why. > > > >

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-10 Thread Eric Noulard
Le jeu. 10 oct. 2019 à 14:30, Eric Noulard a écrit : > > > Le jeu. 10 oct. 2019 à 14:02, Zakrzewski, Jakub < > jakub.zakrzew...@scheer-group.com> a écrit : > >> -- >> *From:* CMake on behalf of Eric Noulard < >> eric.noul..

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-10 Thread Eric Noulard
Le jeu. 10 oct. 2019 à 14:02, Zakrzewski, Jakub < jakub.zakrzew...@scheer-group.com> a écrit : > -- > *From:* CMake on behalf of Eric Noulard < > eric.noul...@gmail.com> > *Sent:* 10 October 2019 12:05 > *To:* DIXON, MARK C. > *Cc:* cmak

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-10 Thread Eric Noulard
Le jeu. 10 oct. 2019 à 13:08, DIXON, MARK C. a écrit : > On Thu, 10 Oct 2019, Eric Noulard wrote: > ... > > No they can't because the maximum size is burried into the binary ELF > file, > > that why CMake "reserve" some space with many "" in order

Re: [CMake] lintian errors when using cpack

2019-10-10 Thread Eric Noulard
Le jeu. 10 oct. 2019 à 11:58, Gillman, Matthew a écrit : > Hi Kerstin > > > > Sorry, I forgot to list them. Right now I only have the following set: > > > > SET(CPACK_GENERATOR "DEB") > > SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Me ") > > INCLUDE(CPack) > > > > I will try adding the two you suggest a

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-10 Thread Eric Noulard
Le jeu. 10 oct. 2019 à 10:36, DIXON, MARK C. a écrit : > On Wed, 9 Oct 2019, Aaron Cohen wrote: > > > Is it not feasible to just let the build system do whatever it is going > to > > and use "chrpath" or "patchelf" to change the rpath after-the-fact? > > Thanks for the suggestion, but I need to a

Re: [CMake] ?= Looking for an explanation: What exactly means "install" in cmake language

2019-10-08 Thread Eric Noulard
Le mar. 8 oct. 2019 à 12:52, Cornelis Bockemühl a écrit : > One more finding: the "magic" that QtCreator does to start example also > without any additional fiddling with the RPATH: it already contains a > RUNPATH, and this points to the shared library libshlibbu.so in it's build > tree location,

Re: [CMake] Looking for an explanation: What exactly means "install" in cmake language?

2019-10-07 Thread Eric Noulard
Le lun. 7 oct. 2019 à 16:49, Cornelis Bockemühl a écrit : > Thanks to both you and J Decker: I would say that this is still the part > that I understood! So basically the word "install" in cmake language could > be replaced by "copy" more or less in common human language - right? > Nope I oversi

Re: [CMake] Looking for an explanation: What exactly means "install" in cmake language?

2019-10-07 Thread Eric Noulard
I'll try some answer. In order to illustrate my words have a look at this figure: https://raw.githubusercontent.com/dev-cafe/cmake-cookbook/master/figures/cmake-times/cmake-times.jpg 1) When cmake "runs" (both cmake and generation times) you get your build tree configured and populated 2) At build

Re: [CMake] Adding CRC32 to ELF

2019-10-07 Thread Eric Noulard
Le lun. 7 oct. 2019 à 14:41, Vincent van Beveren a écrit : > Hello everyone, > > I'm setting up a new build targeting an embedded platform (LM32) and > trying to integrate a CRC32 into the resulting ELF. I have previously > done this using plain Makefiles with the following steps (pseudo code): >

Re: [CMake] Packaging a directory with CPack RPM

2019-09-16 Thread Eric Noulard
Le lun. 16 sept. 2019 à 18:12, Ashish Sadanandan < ashish.sadanan...@gmail.com> a écrit : > On Thu, Sep 12, 2019 at 4:57 AM Eric Noulard > wrote: > > > > > > > > Le jeu. 12 sept. 2019 à 02:27, Ashish Sadanandan < > ashish.sadanan...@gmail.com> a écrit

Re: [CMake] Packaging a directory with CPack RPM

2019-09-12 Thread Eric Noulard
Le jeu. 12 sept. 2019 à 02:27, Ashish Sadanandan < ashish.sadanan...@gmail.com> a écrit : > Hello, > I'm using CPack to create RPMs for an application. I have this working but > the CPack step is quite slow. While investigating this, I noticed that all > files in a directory I'm packaging, which c

Re: [CMake] How to use --build and --parallel?

2019-08-08 Thread Eric Noulard
gt; wanna confirm whether I wrote the syntax correctly. An example would > suffice. > this sequence works for me on Debian 9 and CMake 3.13.2: cd buildir cmake -G /path/to/srcdir cmake --build --parallel . What kind or error do you get when you do that? > On Fri, Aug 9, 20

Re: [CMake] How to use --build and --parallel?

2019-08-08 Thread Eric Noulard
Le ven. 9 août 2019 à 04:40, Heng Zhou a écrit : > Hi, > > I want to build a project using all cores of the machine. After cmake .., > I have tried > > cmake --build --parallel . > > and > > cmake --build . --parallel > > , but none of them works. So, what is the correct usage of --build and > --

Re: [CMake] find_file - strange behavior when using Android toolchain

2019-07-31 Thread Eric Noulard
Le mer. 31 juil. 2019 à 11:19, Stephan Menzel a écrit : > Thank you, Eric and Ugesh, > > Am Mi., 31. Juli 2019 um 09:16 Uhr schrieb Eric Doenges >: > >> My experience has been that find_file and friends behave in unexpected >> ways when you set CMAKE_SYSROOT. In our toolchain files, we set >> se

Re: [CMake] How to specify Redhat Developer Toolset compiler?

2019-06-20 Thread Eric Noulard
I would bet that enabling the toolset before launching CMake will do the trick. Otherwise set CC and/or CXX env var to the desired path before launching CMake. Le jeu. 20 juin 2019 à 17:39, David Aldrich a écrit : > My Centos 7.6 machine has CMake 3.13.5 and g++ 4.8.5 installed: > > $ /usr/bin/x

Re: [CMake] Why do executables link static libs that shared libs were built from?

2019-06-17 Thread Eric Noulard
Le lun. 17 juin 2019 à 02:01, Paul Smith a écrit : > On Sun, 2019-06-16 at 21:42 +0200, Eric Noulard wrote: > > Le dim. 16 juin 2019 à 18:26, Paul Smith a > > écrit : > > > But, that's not the only way to use shared libraries. I'm trying > > > t

Re: [CMake] Why do executables link static libs that shared libs were built from?

2019-06-16 Thread Eric Noulard
Le dim. 16 juin 2019 à 18:26, Paul Smith a écrit : > Let me just mention up-front that I spent about 2 weeks earlier this > year completely converting our circa-2011 cmake environment to ultra- > modern cmake: switching completely to TLL, interfaces, removing > virtually all if-statements and con

Re: [CMake] Individualized compile_commands.json per executable target?

2019-06-11 Thread Eric Noulard
Le mar. 11 juin 2019 à 05:16, Staley, Martin Frank via CMake < cmake@cmake.org> a écrit : > I'm using the Clang/LLMV APIs to build a code analysis tool that gives my > users some additional analysis of their C++ codes, above and beyond what > the compiler, proper, provides. > > With a set(CMAKE_EX

Re: [CMake] Conditional install() rules based on CPack generator

2019-06-05 Thread Eric Noulard
Le mer. 5 juin 2019 à 12:00, Mathieu Malaterre a écrit : > Hi there, > > I am trying to use NuGet generator for GDCM project. Typically my > install rules are as follow: > > add_library(foo SHARED foo.c) > install(TARGETS foo > EXPORT ${MY_TARGETS_NAME} > RUNTIME DESTINATION ${MY_INSTALL_BIN_

Re: [CMake] Dependency cycle - why?

2019-05-25 Thread Eric Noulard via CMake
Le sam. 25 mai 2019 à 13:51, Bill Somerville a écrit : > Hi Robert, > > thanks for that, the target name change does seem to help but I am still > unable to achieve my goal. Here is a simplified example that demonstrates > the problem: > > cmake_minimum_required (VERSION 3.1.0 FATAL_ERROR) > pro

Re: [CMake] cmake doesn't run all tests

2019-05-21 Thread Eric Noulard
Le mar. 21 mai 2019 à 11:45, hex a écrit : > hello, > > I have two modules in my CMake project: > > *root* > *├── foo* > *│ ├── CMakeLists.txt* > *│ ├── src* > *│ │ └── foo.c* > *│ └── tests* > *│ ├── foo_unit_test.c* > *│ └── CMakeLists.txt* > *├── CMakeLists.txt* > *└── mo

Re: [CMake] Custom RPM build failing for want of RPMBUILD_FLAGS

2019-03-28 Thread Eric Noulard
Le ven. 22 mars 2019 à 18:30, Stewart, Robert a écrit : > Have a look at the code I quoted from CPackRPM.cmake: > > if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT > CPACK_RPM_USER_BINARY_SPECFILE) > set(RPMBUILD_FLAGS "-bb") > > If CPACK_RPM_USER_BINARY_SPECFILE is defined, then

Re: [CMake] Custom RPM build failing for want of RPMBUILD_FLAGS

2019-03-22 Thread Eric Noulard
Le mer. 6 mars 2019 à 21:33, Stewart, Robert a écrit : > We've recently upgraded CMake from 2.8+ to 3.5+ (different versions on > different platforms). In so doing, our CMake invocation of CPack to create > RPMs now fails and I'm hoping someone can help. I have a spec file and I > want to run r

Re: [CMake] Custom RPM build failing for want of RPMBUILD_FLAGS

2019-03-22 Thread Eric Noulard
Le mer. 6 mars 2019 à 21:33, Stewart, Robert a écrit : > We've recently upgraded CMake from 2.8+ to 3.5+ (different versions on > different platforms). In so doing, our CMake invocation of CPack to create > RPMs now fails and I'm hoping someone can help. I have a spec file and I > want to run r

Re: [CMake] Troubles with include_directories

2019-03-10 Thread Eric Noulard
Le sam. 9 mars 2019 à 08:44, workbe...@gmx.at a écrit : > Hi everyone, > > i've a project setup that looks like this: > > > abc.h > > def.h > > and all my other .cpp and .h files are in the folder intern. Now my > CMakeLists.txt looks like this: > > cmake_minimum_required(VERSION 3.7) > project(B

Re: [CMake] Remove folders created by install

2019-02-20 Thread Eric Noulard
There are some possible solutions and reference here: https://stackoverflow.com/questions/41471620/cmake-support-make-uninstall Le sam. 16 févr. 2019 à 15:48, Felix Crazzolara a écrit : > Hi everyone > > For my smaller projects I'd like to have 'uninstall' functionality. To > remove installed fi

Re: [CMake] requiring parallel building but sequential linking

2019-02-17 Thread Eric Noulard
Le lun. 18 févr. 2019 à 00:01, Craig Scott a écrit : > > > On Mon, Feb 18, 2019 at 9:35 AM Domen Vrankar > wrote: > >> Hi, >> >> I'm building llvm project with CMake. >> While build process is compiling the code I prefer running "make -j3" on >> my 4 core pc (bumping processor to 100% on 3 of 4

Re: [CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Eric Noulard
e past. If there is not too much circular deps you may either break them by writing (by hand) a bunch of imported target or you can merge in the same CMake project the sub-projects belonging to the same cycle. Feasibility depends on the amount of projects (and cycle) you have. > > On Thu,

Re: [CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Eric Noulard
Le jeu. 14 févr. 2019 à 18:22, Timothy Wrona a écrit : > I have a collection of interdependent CMake projects (lots of legacy code) > that I want to convert to using CMake targets for linking. The code is > built in such a way that all projects run cmake generation, then all > projects build, the

Re: [CMake] Help with non-standard use of CMake

2019-01-02 Thread Eric Noulard
Hi Kyle & Donald, ctest scripting is documented in here as well: https://cmake.org/cmake/help/v3.13/manual/ctest.1.html#ctest-script Since this is generated from in-source documentation: https://github.com/Kitware/CMake/blob/master/Help/manual/ctest.1.rst may be an explanation on how to use ctes

Re: [CMake] Tracking progress of CMake TAR

2018-12-17 Thread Eric Noulard
n Windows. It looks like 7-zip can do that: see: https://sevenzip.osdn.jp/chm/cmdline/switches/bs.htm or: https://sourceforge.net/p/sevenzip/discussion/45797/thread/d10225f7/ I don't work on Windows those day so I won't be able to try it out. Eric > > On Mon, Dec 17, 2018 at 8:53 A

Re: [CMake] Tracking progress of CMake TAR

2018-12-17 Thread Eric Noulard
https://github.com/libarchive/libarchive/wiki/ManPageArchiveReadExtract3) but CMake code is not using it in any way. > and yes I'm using cmake -E tar .-. > > Any ideas? > Beside non-portable way no. > > On Mon, Dec 17, 2018 at 7:16 AM Eric Noulard > wrote: > >> I

Re: [CMake] Tracking progress of CMake TAR

2018-12-17 Thread Eric Noulard
I guess he is using cmake -E tar may be using 'v' verbose option from tar should be enough. i.e. cmake -E tar xvz your-archive.tar.gz It should display file names as they come out of the archive. So unless your very big archive only contains relatively big files, the output should evolve quite

Re: [CMake] Make errors when running ./bootstrap in Ubuntu 12.04

2018-12-14 Thread Eric Noulard
Did you try to pick a pre-compiled version of CMake? https://cmake.org/download/ https://github.com/Kitware/CMake/releases/download/v3.13.2/cmake-3.13.2-Linux-x86_64.tar.gz CMake is statically linked so installing a binary should work. Le ven. 14 déc. 2018 à 17:48, Paul Jeffries a écrit : > Dea

Re: [CMake] dependencies of cross compiliations

2018-12-10 Thread Eric Noulard
Le dim. 9 déc. 2018 à 12:24, Craig Scott a écrit : > On Tue, Dec 4, 2018 at 6:56 PM Torsten Robitzki > wrote: > >> > Am 27.11.2018 um 19:55 schrieb Eric Noulard : >> > >> > My assumption are: >> > a) when you cross-compile your build is a &q

Re: [CMake] New version forces rebuild all?

2018-12-04 Thread Eric Noulard
Le mar. 4 déc. 2018 à 11:44, Andy a écrit : > Problem are still. > Alone make also give me problems. > Do you have stripped down project example? > Ninja is replacement od cmake or make? > ninja (https://ninja-build.org/) is make replacement for which there is a CMake generator. https://cmake

Re: [CMake] Build and run an external project

2018-12-03 Thread Eric Noulard
Le mar. 4 déc. 2018 à 06:11, James Bigler a écrit : > Unfortunately I don't think your suggestion will work. > > I need to invoke a custom executable to build my project and not a > msproject. I also need to copy the executable into the build directory. > Sorry I miss the fact that you moved th

Re: [CMake] Build and run an external project

2018-12-03 Thread Eric Noulard
Did you check whether if https://cmake.org/cmake/help/latest/command/include_external_msproject.html wouldn't be better in your case? Le mar. 4 déc. 2018 01:43, James Bigler a écrit : > I have an external project that I would like to compile using their build > system, and be able to set the V

Re: [CMake] dependencies of cross compiliations

2018-11-27 Thread Eric Noulard
Le mar. 27 nov. 2018 à 11:28, Rolf Eike Beer a écrit : > Am 2018-11-09 10:04, schrieb Torsten Robitzki: > > Hi, > > I hope this question was not asked before. I work in the embedded > > field and there it is usually to have at least two different build > > platforms. The Host platform, where unit

Re: [CMake] Can an option enforce a default, even if cache is present?

2018-11-27 Thread Eric Noulard
Le mar. 27 nov. 2018 à 14:50, Mario Emmenlauer a écrit : > > Dear all, > > I've just discovered that option() behaves differently than I anticipated. > After reading the docs and searching with google I'm still confused how to > achieve my desired behaviour. > > What I've just learned is that uns

Re: [CMake] CPack RPM: file XXX conflicts with file from package filesystem-yyy...

2018-11-27 Thread Eric Noulard
5:37, Mario Emmenlauer wrote: > > > > Dear Eric, > > > > thanks a lot for this help! I think I have the pointers to move forward! > > One more detail below: > > > > On 23.11.18 11:36, Eric Noulard wrote: > >> Le ven. 23 nov. 2018 à 11:10, Mario Emmen

Re: [CMake] CPU specific compiler flags

2018-11-26 Thread Eric Noulard
Le lun. 26 nov. 2018 à 09:36, Ciccio Pasticcio a écrit : > Hi all, > > I'm refactoring some libraries cmake files to be compliant to the use of > targets instead of tons of variables. Since these libraries are > cross-compiled I'm facing some problem finding how to properly set some > specific fl

Re: [CMake] CPack RPM: file XXX conflicts with file from package filesystem-yyy...

2018-11-23 Thread Eric Noulard
Le ven. 23 nov. 2018 à 11:10, Mario Emmenlauer a écrit : > > Dear Eric, thanks for the help! Below more: > > On 22.11.18 18:20, Eric Noulard wrote: > > Le jeu. 22 nov. 2018 à 16:16, Mario Emmenlauer <mailto:ma...@emmenlauer.de>> a écri > > I'm

Re: [CMake] CPack RPM: file XXX conflicts with file from package filesystem-yyy...

2018-11-22 Thread Eric Noulard
Le jeu. 22 nov. 2018 à 16:16, Mario Emmenlauer a écri > > I'm trying to build an RPM with CPack, and everything seems to work, > but the resulting package can not be installed. I get Transaction check > error: > file / from install of conflicts with file from package > filesystem-3.2-25.el7.x8

Re: [CMake] How to find GTK3 in CMake

2018-11-21 Thread Eric Noulard
Le mer. 21 nov. 2018 à 09:46, David Demelier a écrit : > Le 20/11/2018 à 17:03, Harry Mallon a écrit : > > Hi, > > > > FindGTK and FindGTK2 exist in the CMake tree. How come there isn't one > for GTK3? Should the GTK2 one work, or is there another way? > > GNOME people don't like CMake (they use

Re: [CMake] cmake 3.12 - python libs / 32 / 64 bits

2018-11-15 Thread Eric Noulard
Le jeu. 15 nov. 2018 à 09:47, Stéphane Ancelot a écrit : > I agree. That was a debug snippet...but is wrong ... I setted up again the > toolchain, but does not help. > If you are using a proper toolchain for 32bit compilation. It looks like a bug in the find_package for Python in the cross-compi

Re: [CMake] Tips on reducing configure time

2018-11-14 Thread Eric Noulard
Le mer. 14 nov. 2018 à 13:25, Poughon Victor a écrit : > Yes you are correct on all your observations. We already use ninja and > ccache wherever we can. In fact we have an issue about the whole end-to-end > build performance where we track all effort on this throughout the project > (if you're i

Re: [CMake] Tips on reducing configure time

2018-11-14 Thread Eric Noulard
Le mer. 14 nov. 2018 à 12:06, Poughon Victor a écrit : > Thanks for the replies > > > > You can see configure times on our dashboard (switch to advanced view): > https://dash.orfeo-toolbox.org/index.php?project=OTB > > It ranges from 1-3min. There's even one windows machine that's at 4m30s. > So

Re: [CMake] Tips on reducing configure time

2018-11-14 Thread Eric Noulard
Hi Victor, Le mer. 14 nov. 2018 à 10:20, Poughon Victor a écrit : > Hi all > > I am working on a large C++ project using CMake ( > https://www.orfeo-toolbox.org/) and our 'configure' step takes quite a > lot of time. This can be annoying for developers working on features where > the configure s

Re: [CMake] CPack disable build all

2018-11-09 Thread Eric Noulard
Le ven. 9 nov. 2018 à 17:22, DKLind a écrit : > I have a very large project where each sub-project creates a debian > package. > > When "make/ninja package" is specified, it performs a "make/ninja all" > before packaging. I would prefer to perform a "make/ninja all" myself > before > I doing a "m

Re: [CMake] Signing individual binary and problem with PackageMaker CPack generator

2018-10-23 Thread Eric Noulard
Le mar. 23 oct. 2018 à 12:06, Craig Scott a écrit : > > > On Tue, Oct 23, 2018 at 4:43 PM Eric Noulard > wrote: > >> Le lun. 22 oct. 2018 à 23:05, Craig Scott a >> écrit : >> >>> >>>> Yes I agree that having build rpath is useful. >>

Re: [CMake] how to debug CPack creation

2018-10-22 Thread Eric Noulard
g your CMAKE_INSTALL_PREFIX if your CI is producing ready to use .deb / .rpm etc... package then you'd better use "/opt" as a prefix as suggested by Craig. > сб, 20 окт. 2018 г. в 17:59, Eric Noulard : > >> >> >> Le sam. 20 oct. 2018 à 10:54, Илья Шипицин a

Re: [CMake] Signing individual binary and problem with PackageMaker CPack generator

2018-10-22 Thread Eric Noulard
Le lun. 22 oct. 2018 à 23:05, Craig Scott a écrit : > >> Yes I agree that having build rpath is useful. >> I am not aware of any mechanism that enable calling some tool during >> CPack's install step. >> Moreover I don't use MacOS at all so I don't have any experience with >> PackageMaker. >> >>

Re: [CMake] Signing individual binary and problem with PackageMaker CPack generator

2018-10-22 Thread Eric Noulard
Le lun. 22 oct. 2018 à 11:56, Anatoly Belyaev a écrit : > We use "PackageMaker" generator on MacOS. But i don't think it is CPack > specific tool does call strip command. The code for RPATH rewrite and > strip cmd is located in cmake_install.cmake. As i understand CPack calls > make install to

Re: [CMake] how to debug CPack creation

2018-10-20 Thread Eric Noulard
> > > And the content is: > $ rpm -qpl softether-vpnserver-5.1.9660-1.x86_64.rpm > /lib > /lib/systemd > /lib/systemd/system > /lib/systemd/system/softether-vpnserver.service > /usr/libexec > /usr/libexec/softether > /usr/libexec/softether/vpnserver > /usr/libexec/softether/vpnserver/hamcore.se2 >

Re: [CMake] how to debug CPack creation

2018-10-20 Thread Eric Noulard
Le sam. 20 oct. 2018 à 10:54, Илья Шипицин a écrit : > > > сб, 20 окт. 2018 г. в 13:30, Eric Noulard : > >> >> >> Le sam. 20 oct. 2018 à 10:15, Илья Шипицин a >> écrit : >> >>> hi, >>> >>> we use cmake/cpack for mangling sys

Re: [CMake] how to debug CPack creation

2018-10-20 Thread Eric Noulard
Le sam. 20 oct. 2018 à 10:15, Илья Шипицин a écrit : > hi, > > we use cmake/cpack for mangling systemd scripts > > > https://github.com/SoftEtherVPN/SoftEtherVPN/blob/master/src/vpnserver/CMakeLists.txt#L26 > > what happens: > > (*) deb installs files to /usr/libexec > (*) cmake sets location as

Re: [CMake] Detailed graphviz graph?

2018-10-07 Thread Eric Noulard
Le sam. 6 oct. 2018 à 18:15, Jan Wielemaker a écrit : > On 03/10/18 09:53, Eric Noulard wrote: > > > > Are those three add_custom_xxx in the same directory? > > DEPENDS for custom_xxx do not cross directory. > > So this was not the problem. The problem was that o

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Eric Noulard
Le jeu. 4 oct. 2018 à 18:59, Marc CHEVRIER a écrit : > I am afraid that you cannot mix "optimized" or "debug" keywords with > "generator expressions" because keywords handling is done during evaluation > of command "target_link_libraries" and "generator expressions" are > evaluated during generat

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Eric Noulard
r ninja generator whereas you get proper "-lbar" I don't know why this happen but it really looks like a bug. > > > I don’t know if other CMake functions will react similarly bad to the > list/bool operator combo. > > > > Regards, > > Björn > > >

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Eric Noulard
Le jeu. 4 oct. 2018 à 16:53, Björn Blissing a écrit : > Hello Eric, > > > > The minimal example was just to display the expansion error. In real life > the code uses a Boolean variable (and the rest of the CMake code is much > larger as well). > It was just to show the expansion error you get if

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Eric Noulard
Le jeu. 4 oct. 2018 à 16:06, Björn Blissing a écrit : > Hello, > > > > I am having trouble with a conditional generator expression inside target > link libraries, which seems to expand incorrectly (or at least not the way > I expect). > > > > In short, I have a list of libraries that is found by

Re: [CMake] Detailed graphviz graph?

2018-10-03 Thread Eric Noulard
Le mer. 3 oct. 2018 à 09:19, Jan Wielemaker a écrit : > Hi, > > Debugging dependencies is not always easy. The -graphviz option is a > nice try, but only seems to do the built-in target types. Is there > some way to get the whole dependency graph, including custom targets > and possibly also th

Re: [CMake] Making variables visible in ccmake

2018-09-28 Thread Eric Noulard
Le ven. 28 sept. 2018 à 13:03, Dorier, Matthieu a écrit : > Ah then maybe I don't understand correctly what is supposed to be > displayed by ccmake. > My usage workflow, not sure it is the expected one but other CMake users/developers may correct me if my usage is wrong. 1) Launch ccmake in an

Re: [CMake] Making variables visible in ccmake

2018-09-28 Thread Eric Noulard
Le ven. 28 sept. 2018 à 11:59, Dorier, Matthieu a écrit : > Hi, > > > How do I make a variable visible in the ccmake tool? > > For example I would like the user to be able to edit BOOST_ROOT when > calling ccmake, how can I do that? > > > Right now all I see when first running ccmake is "EMPTY_CA

Re: [CMake] CMake Cookbook is out!!

2018-09-27 Thread Eric Noulard
Le jeu. 27 sept. 2018 à 23:49, Alan W. Irwin a écrit : > On 2018-09-27 20:26+0200 Eric Noulard wrote: > > > Hi CMakers, > > > > Hi try not do that too often but here comes a little promotion for a book > > which (I think) deserve attention. > > The CMake

[CMake] CMake Cookbook is out!!

2018-09-27 Thread Eric Noulard
Hi CMakers, Hi try not do that too often but here comes a little promotion for a book which (I think) deserve attention. The CMake Cookbook by Radovan Bast, Roberto Di Remigio https://www.packtpub.com/application-development/cmake-cookbook I'm not the author but I participate in the book review a

Re: [CMake] --config Parameter position relevant?

2018-09-19 Thread Eric Noulard
Le mer. 19 sept. 2018 à 13:43, Dennis Luehring a écrit : > build environment: > > Win7 x64 > VStudio 2017 Community Edition 15.8.4 (latest) > CMake 3.12.1 (x86) > git 2.19.0 (latest, x64) > Python 2.7.2 (x86) > > directory structure: > > D:/projects/fun/jit_tests/clang_from_src/ >llvm <-- git

Re: [CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Eric Noulard
Le mar. 11 sept. 2018 à 22:09, Michael Jackson a écrit : > I add it manually each and every time. I have to tell all new developers > to remember to add the flag otherwise they are still sitting after an hour > waiting on our code to compile wondering why it takes so long. Then it hits > us, "Oh,

Re: [CMake] Problems with static jpeg library

2018-09-11 Thread Eric Noulard
Le mar. 11 sept. 2018 à 16:10, a écrit : > Hi, > > thank you for your reply. I could solve the problem. The part I didn't > knew was that static libraries also needed to be compiled with -fPIC. > I've found a good summary of this topic at > https://lists.debian.org/debian-devel/2016/05/msg00309.h

Re: [CMake] overriding -03 -DNDEBUG Release flags

2018-09-10 Thread Eric Noulard
Le lun. 10 sept. 2018 à 14:34, Stéphane Ancelot a écrit : > Hi, > > In one project I need to compile with -O2 option , how to set it and > remove -O3 -DNDEBUG flags for this project ? > May be you can create a new Build Type with appropriate flags: https://gitlab.kitware.com/cmake/community/wiki

Re: [CMake] unknown cmake command

2018-09-09 Thread Eric Noulard
Le dim. 9 sept. 2018 à 06:52, Robert Finch a écrit : > Hi, cmake is new to me. I’m attempting to use cmake to build a backend for > LLVM. CMake fails with an ‘unknown cmake command’ error. It doesn’t seem to > be able to find or execute modules or macros. I tried setting the > CMAKE_MODULE_PATH,

Re: [CMake] Specify extra files for display in IDE

2018-09-05 Thread Eric Noulard
Le mer. 5 sept. 2018 à 11:00, Daniel Eiband a écrit : > Hi, > > > > I managed to solve the presentation of object libraries by renaming the > targets and hiding certain targets in folders. I think this solution is > acceptable. > > > > The issue with the display of header only libraries in IDEs,

Re: [CMake] creating a library from other one

2018-08-31 Thread Eric Noulard
Le ven. 31 août 2018 à 15:59, Stéphane Ancelot a écrit : > I ended with : > > add_custom_target(combined ALL >COMMAND ${CMAKE_AR} rc libcombined.a $ $ FILE:lib2>) > Quick & dirty :-) There is the "thin" option of ar as well: https://stackoverflow.com/questions/3821916/how-to-merge-two-ar-sta

Re: [CMake] creating a library from other one

2018-08-31 Thread Eric Noulard
First create OBJECT libraries instead of static Then create as many STATIC libraries as you want that includes as many OBJECT libraries content as you want. Le ven. 31 août 2018 à 15:17, Stéphane Ancelot a écrit : > Hi, > > I have got some static libraries generated, that I would like to put i

Re: [CMake] find_package with COMPONENTS never honors REQUIRED

2018-08-30 Thread Eric Noulard
Le jeu. 30 août 2018 à 20:03, George PF a écrit : > > The documentation is intriguing about REQUIRED COMPONENTS interaction > > That's... one way to put it. > Yeah you know. Kind of ironic here :-) > > So it is possible that the failure behavior when specifying COMPONENTS > is up to the mo

Re: [CMake] find_package with COMPONENTS never honors REQUIRED

2018-08-30 Thread Eric Noulard
Le jeu. 30 août 2018 à 18:01, George PF a écrit : > Hi, > > once COMPONENTS is added to a find_package statement, any REQUIRED > statement ceases to have an effect: > > cmake_minimum_required(VERSION 3.12) > > # find_package(FailsCorrectly REQUIRED) > > find_package(Qt REQUIRED COMPON

Re: [CMake] Specify extra files for display in IDE

2018-08-30 Thread Eric Noulard
Le jeu. 30 août 2018 à 12:32, Daniel Eiband a écrit : > Hi, > > > > I’m currently migrating a code base from a proprietary MSBuild based > generator to CMake 3.11 which is shipped with Visual Studio. There are two > aspects to this task: > > > > 1) Integration of custom build steps > > 2) Present

Re: [CMake] Iterating over a generator expression list, specifically $ of an OBJECT library

2018-08-29 Thread Eric Noulard
Le mer. 29 août 2018 à 14:44, George PF a écrit : > > > > > My opinion (but I may be proven wrong by others) is that genex contains > > generator specific bits that cannot be **evaluated** > > until the build system is generated. Properties (on target, or > directory, > > or files) contains info

Re: [CMake] how do you allow CMAKE_CUDA_COMPILER to be optional via project LANGUAGE?

2018-08-28 Thread Eric Noulard
Le mar. 28 août 2018 à 19:07, Quang Ha a écrit : > Hi all, > > So this question is again about project(foo LANGUAGES CXX CUDA). Is it > possible to switch off CUDA if Cmake couldn't find CUDA compiler? I.e. > something along the line: > May be you can only: project(foo LANGUAGES CXX) then i

Re: [CMake] Iterating over a generator expression list, specifically $ of an OBJECT library

2018-08-28 Thread Eric Noulard
I cc the list because I think you drop it inadvertently. Le mar. 28 août 2018 à 16:18, George PF a écrit : > > Because generator expressions are not handled in every cmake construct: > > > https://cmake.org/cmake/help/v3.12/manual/cmake-generator-expressions.7.html > > > > genex is probably not

Re: [CMake] Iterating over a generator expression list, specifically $ of an OBJECT library

2018-08-28 Thread Eric Noulard
Le mar. 28 août 2018 à 15:39, George PF a écrit : > Hello, > > how can e.g. $ be iterated over in cmake? > > This builds the lib, but the loop is never run: > > add_library(objlib12 OBJECT lib1.c lib2.c) > foreach(o IN LISTS $) > message("obj ${o}") > endforeach() > > But the

Re: [CMake] Adding an individual define to each source file of a library

2018-08-23 Thread Eric Noulard
Le jeu. 23 août 2018 à 19:18, George PF a écrit : > > > However, whatever I write into 'set_property()' - no APPEND, single > entry, > > > not quoted - does not end up > > > on the compiler command line. Is there a type mismatch which is > silently > > > ignored? > > > > > > > Or you are doing th

Re: [CMake] Adding an individual define to each source file of a library

2018-08-23 Thread Eric Noulard
Le jeu. 23 août 2018 à 18:31, George PF a écrit : > Thank you for the precise pointers, I added to the same CMakeLists.txt: > > get_property(mysrcs TARGET mylib PROPERTY SOURCES) > > foreach(x IN LISTS mysrcs) > message("at ${x}") > set_property(SOURCE x APPEND PROPERTY CO

Re: [CMake] Adding an individual define to each source file of a library

2018-08-23 Thread Eric Noulard
Le jeu. 23 août 2018 à 13:02, George PF a écrit : > Hello, > > following "modern cmake" conventions I want to create a library where > every single file is compiled with an individual define (-D_fileX_, > required for a macro which integrates code into every translation unit). > > So following th

Re: [CMake] Problem with creating shared library

2018-08-21 Thread Eric Noulard
Le lun. 20 août 2018 à 19:05, Damir Porobic a écrit : > Hi Eric, > > > yes, this is the project. I have pushed my current state to this branch > https://github.com/DamirPorobic/kImageAnnotator/tree/sharedLibTestBranch > > I've tried also without the generate_export_headers (cleaned everything up

Re: [CMake] Problem with creating shared library

2018-08-19 Thread Eric Noulard
Hi Damir, May be the issue has nothing to do with the way you build the exported <>Config.cmake files. Since may be some nasty detail slipped in, could you tell us if the project is public. It looks like this one: https://github.com/DamirPorobic/kImageAnnotator may be you can push a branch that c

[CMake] Fwd: Problem with creating shared library

2018-08-15 Thread Eric Noulard
-- Forwarded message - From: Eric Noulard Date: mer. 15 août 2018 à 17:13 Subject: Re: [CMake] Problem with creating shared library To: May be check the list of symbol in the lib. KImageAnnotator::KImageAnnotator(QPixmap const&) may really not be there (only declared in

Re: [CMake] Problem with creating shared library

2018-08-15 Thread Eric Noulard
Le mer. 15 août 2018 à 10:32, Damir Porobic a écrit : > Hi Folks, > > > I'm trying to write a shared library and run into an issue where I can't > find any clues to where the problem is. > > I have a project with following structure: > > > src/ > > dir1/ > > file1.h > > file1.

Re: [CMake] Issues trying to use the Anaconda compiler tools with CMake

2018-08-15 Thread Eric Noulard
Le mer. 15 août 2018 à 10:57, Ray Donnelly a écrit : > Docker is unnecessary overhead here and irrelevant to the question of > which compilers to use when building conda packages (use ours or risk > binary incompatibility with the rest of the ecosystems, please do not > attempt to use e.g. CentOS

Re: [CMake] Issues trying to use the Anaconda compiler tools with CMake

2018-08-15 Thread Eric Noulard
Le mar. 14 août 2018 à 20:38, Sebastián Mancilla a écrit : > I wanted to try Conda for normal day-to-day C++ development, while having > all the dependencies isolated from other projects and the base system. > > - Change the sources > - Build > - Run the tests > - Repeat > Hi Sebastian, Just cu

Re: [CMake] CMake and Visual Studio Code under linux

2018-08-09 Thread Eric Noulard
Le jeu. 9 août 2018 à 09:09, Roman Wüger a écrit : > Hello, > > how can I configure my Project to run it with the Visual Studio Code under > Linux? I did not find a useful generator. > AFAIK there is no VSCode generator, however you can install VSCode CMake Tools extension which begins to intere

Re: [CMake] issue with CPack: RPM package was not generated!

2018-07-31 Thread Eric Noulard
Hi Miroslav, Do you need something very specific that you need a custom spec file? If this is not the case you should try to let CPackRPM generate the spec file for you. This "USER spec file" feature was designed (quite a long time ago) when CPackRPM was lacking some features that came in after t

Re: [CMake] Beginners Guide to Cmake and Modern Cmake

2018-07-28 Thread Eric Noulard
Le sam. 28 juil. 2018 à 01:01, spacey...@outlook.com a écrit : > Hey Andreas, > > thanks for your comments. Yes I too have exhausted the resources you have > mentioned here. The concepts make sense and I see the intended point but > for a beginner its hard to grasp on how to implement and given

Re: [CMake] ENOEXEC exit code from ctest on FreeBSD

2018-07-08 Thread Eric Noulard
Le lun. 9 juil. 2018 à 07:14, Anoop C S a écrit : > Hi all, > > While running tests from a wip branch[1] for socket_wrapper project I > noticed the following output > on FreeBSD: > > Your issue seems more related with the "socker wrapper" project than with CMake/CTest but... > Following that I

  1   2   3   4   5   6   7   8   9   10   >