From boxerab at gmail.com Tue Mar 1 09:06:10 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Tue, 1 Mar 2016 09:06:10 -0500 Subject: [CMake] CMAKE_DL_LIBS Message-ID: Hello! I have a CMAKE project that creates an executable that links with a static lib from a second CMAKE project. The static lib requires the dlopen and dlclose symbols. So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake file. However, I still get an error about "undefined reference to symbol "dlclose...." I am using CMake 3.2.2. Any ideas ? Thanks, Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Tue Mar 1 09:15:42 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Tue, 1 Mar 2016 09:15:42 -0500 Subject: [CMake] CMAKE_DL_LIBS In-Reply-To: References: Message-ID: On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer wrote: > Hello! > I have a CMAKE project that creates an executable that links with a static > lib > from a second CMAKE project. The static lib requires the dlopen and dlclose > symbols. > > So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake > file. > > However, I still get an error about "undefined reference to symbol > "dlclose...." > The error states: "missing DSO from command line" Also, the second CMAKE project also contains executables that link with the static library, and they link with no problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From calebwherry at gmail.com Tue Mar 1 09:39:05 2016 From: calebwherry at gmail.com (J. Caleb Wherry) Date: Tue, 1 Mar 2016 09:39:05 -0500 Subject: [CMake] CMAKE_DL_LIBS In-Reply-To: References: Message-ID: Most likely solution: missing the "-ldl" link lib which should solve your missing symbol issues. The DSO error is most likely caused by the above. However, there could be a problem with your linking order. I'd have to see the CMake file to be sure. Caleb On Tuesday, March 1, 2016, Aaron Boxer wrote: > > > On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer > wrote: > >> Hello! >> I have a CMAKE project that creates an executable that links with a >> static lib >> from a second CMAKE project. The static lib requires the dlopen and >> dlclose >> symbols. >> >> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake >> file. >> >> However, I still get an error about "undefined reference to symbol >> "dlclose...." >> > > The error states: "missing DSO from command line" > > Also, the second CMAKE project also contains executables that link with > the static > library, and they link with no problem. > > > > > -- Sent from my iPhone 4s -------------- next part -------------- An HTML attachment was scrubbed... URL: From calebwherry at gmail.com Tue Mar 1 09:55:43 2016 From: calebwherry at gmail.com (J. Caleb Wherry) Date: Tue, 1 Mar 2016 09:55:43 -0500 Subject: [CMake] CMAKE_DL_LIBS In-Reply-To: References: Message-ID: That link looks fine to me. You might want to verify that the CMAKE_DL_LIBS variable actually contains what it should on your system (or a least contains what it should right before using it). You could explicitly add the "-dl" to that link statement and see if that works. That's what that variable should contain anyways on Linux boxes. -Caleb (Pasting off list response below) Thanks, Caleb. Are you saying that I need to add "-ldl" link lib in addition to ${CMAKE_DL_LIBS} ? My CMake file is here: https://github.com/GrokImageCompression/opendcp/blob/master/cli/CMakeLists.txt and the lines for the exe that is not linking are found here: TARGET_LINK_LIBRARIES(opendcp_j2k ${CMAKE_DL_LIBS} ${OPENDCP_LIB} ) This is an open source proj, by the way. I can send you a few short lines about how to build on Ubuntu, if you are interested. Thanks very much for your help. Aaron On Tuesday, March 1, 2016, Aaron Boxer wrote: > > > On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer > wrote: > >> Hello! >> I have a CMAKE project that creates an executable that links with a >> static lib >> from a second CMAKE project. The static lib requires the dlopen and >> dlclose >> symbols. >> >> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake >> file. >> >> However, I still get an error about "undefined reference to symbol >> "dlclose...." >> > > The error states: "missing DSO from command line" > > Also, the second CMAKE project also contains executables that link with > the static > library, and they link with no problem. > > > > > -- Sent from my iPhone 4s -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Tue Mar 1 10:37:19 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Tue, 1 Mar 2016 10:37:19 -0500 Subject: [CMake] CMAKE_DL_LIBS In-Reply-To: References: Message-ID: Thanks! I found the problem: I needed to add CMAKE_DL_LIBS to another static library that the main exe was linking to. Now this link error is gone. On Tue, Mar 1, 2016 at 9:55 AM, J. Caleb Wherry wrote: > That link looks fine to me. You might want to verify that the > CMAKE_DL_LIBS variable actually contains what it should on your system (or > a least contains what it should right before using it). > > You could explicitly add the "-dl" to that link statement and see if that > works. That's what that variable should contain anyways on Linux boxes. > > -Caleb > > (Pasting off list response below) > > Thanks, Caleb. Are you saying that I need to add "-ldl" link lib in > addition to ${CMAKE_DL_LIBS} ? > > > My CMake file is here: > > > https://github.com/GrokImageCompression/opendcp/blob/master/cli/CMakeLists.txt > > and the lines for the exe that is not linking are found here: > > TARGET_LINK_LIBRARIES(opendcp_j2k ${CMAKE_DL_LIBS} ${OPENDCP_LIB} ) > > > This is an open source proj, by the way. I can send you a few short lines > about how to build on Ubuntu, if you are interested. > > Thanks very much for your help. > > > Aaron > > On Tuesday, March 1, 2016, Aaron Boxer wrote: > >> >> >> On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer wrote: >> >>> Hello! >>> I have a CMAKE project that creates an executable that links with a >>> static lib >>> from a second CMAKE project. The static lib requires the dlopen and >>> dlclose >>> symbols. >>> >>> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake >>> file. >>> >>> However, I still get an error about "undefined reference to symbol >>> "dlclose...." >>> >> >> The error states: "missing DSO from command line" >> >> Also, the second CMAKE project also contains executables that link with >> the static >> library, and they link with no problem. >> >> >> >> >> > > -- > Sent from my iPhone 4s > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Tue Mar 1 10:48:42 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Tue, 1 Mar 2016 10:48:42 -0500 Subject: [CMake] CMAKE_THREAD_LIBS_INIT Message-ID: Hello, I am getting link error "undefined reference to pthread_create" I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line, and I have added FIND_PACKAGE(Threads REQUIRED). Here is a link to my cmake file: https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeLists.txt Any help would be very greatly appreciated. Thanks! Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Tue Mar 1 11:17:49 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Tue, 1 Mar 2016 11:17:49 -0500 Subject: [CMake] CMAKE_THREAD_LIBS_INIT In-Reply-To: References: Message-ID: OK, figured this one out too. Thank again, Caleb! On Tue, Mar 1, 2016 at 10:48 AM, Aaron Boxer wrote: > Hello, > I am getting link error "undefined reference to pthread_create" > > I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line, > and I have added > > FIND_PACKAGE(Threads REQUIRED). > > Here is a link to my cmake file: > > > https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeLists.txt > > Any help would be very greatly appreciated. > > Thanks! > Aaron > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Tue Mar 1 19:15:50 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Tue, 1 Mar 2016 19:15:50 -0500 Subject: [CMake] best way of parsing test results from ctest + valgrind Message-ID: Hello, I am just getting started on using valgrind memory analysis for my tests. When I run ctest with nightly memory check, I get an XML document, but it is very hard to read the results. What is the best way of reading this doc? Thanks! Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.brightwell2 at gmail.com Wed Mar 2 00:45:27 2016 From: kevin.brightwell2 at gmail.com (Kevin Brightwell) Date: Wed, 2 Mar 2016 00:45:27 -0500 Subject: [CMake] Visual Studio and ExternalProject_Add Message-ID: I've been having great success with using ExternalProject over the terrible git submodules. However, when using Visual Studio, the following error happens: Performing download step (git clone) for 'catch-lib' 2> Cloning into 'catch-lib'... 2> Note: checking out 'tags/v1.3.4'. 2> 2> You are in 'detached HEAD' state. You can look around, make experimental 2> changes and commit them, and you can discard any commits you make in this 2> state without impacting any branches by performing another checkout. 2> 2> If you want to create a new branch to retain commits you create, you may 2> do so (now or later) by using -b with the checkout command again. Example: 2> 2> git checkout -b 2> 2> HEAD is now at 3b4edd7... Build for v1.3.4 2> fatal: 'submodule' appears to be a git command, but we were not 2> able to execute it. Maybe git-submodule is broken? 2> CMake Error at C:/Users/kevin/dev/sol2/vendor/tmp/catch-lib-gitclone.cmake:58 (message): 2> Failed to init submodules in: 2> 'C:/Users/kevin/dev/sol2/vendor/src/catch-lib' ?The CMake file is located here: https://github.com/Nava2/sol2/blob/cmake-build/CMakeLists.txt Steps I've verified: - git.exe is on my system PATH - The submodule URL is valid - Builds on OSX/Linux - Reinstalled git (twice)? ?I'm new to Visual Studio (I work primarily with Linux/OSX), so I'm sure I'm missing something along the way. Thanks,? -- Kevin Brightwell*. BESc., BSc.* ?MESc. Candidate 2017 Western University? -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.boettcher at posteo.de Wed Mar 2 01:52:33 2016 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Wed, 2 Mar 2016 07:52:33 +0100 Subject: [CMake] Good practice: using INTERFACE-libraries in FindABC.cmake? In-Reply-To: References: <20160229153453.35850c1b@lappi3.vsora> Message-ID: <20160302075233.65f73088@lappi3.vsora> On Mon, 29 Feb 2016 21:20:59 +0100 Stephen Kelly wrote: > Patrick Boettcher wrote: > > > I came across the INTERFACE-type of libraries when writing a > > FindModule.cmake-file for custom libraries installed by my > > project. > > You don't provide FindModules for your CMake-built libraries. Thank you for the pointer. I wasn't aware of it and haven't entirely understood it yet. However, when I said 'for custom libraries installed by my project' I was not referring to cmake-based projects. These libraries are used as is and for the moment I don't want to integrate them via ExternalProject. -- Patrick. From matthew.gidden at gmail.com Wed Mar 2 03:44:46 2016 From: matthew.gidden at gmail.com (Matthew Gidden) Date: Wed, 2 Mar 2016 09:44:46 +0100 Subject: [CMake] Build from Source on Solaris Message-ID: Hi all, I just tried to install from source on Solars 10 (sparc), on which make failed. I have a gist here: https://gist.github.com/gidden/7b9dc2d793ef3411debf My system info is: ``` t501:gidden> uname -a SunOS t501 5.11 11.3 sun4v sparc sun4v ``` Any suggestions? I wasn't able to find sparc binaries... did I not look hard enough? Thanks! Matt Gidden -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.chevrier at sap.com Wed Mar 2 03:54:36 2016 From: marc.chevrier at sap.com (CHEVRIER, Marc) Date: Wed, 2 Mar 2016 08:54:36 +0000 Subject: [CMake] Build from Source on Solaris In-Reply-To: References: Message-ID: Hi, Some help can be found in this thread: http://public.kitware.com/pipermail/cmake-developers/2015-September/026550.html Marc From: CMake > on behalf of Matthew Gidden > Date: Wednesday 2 March 2016 at 09:44 To: "cmake at cmake.org" > Subject: [CMake] Build from Source on Solaris Hi all, I just tried to install from source on Solars 10 (sparc), on which make failed. I have a gist here: https://gist.github.com/gidden/7b9dc2d793ef3411debf My system info is: ``` t501:gidden> uname -a SunOS t501 5.11 11.3 sun4v sparc sun4v ``` Any suggestions? I wasn't able to find sparc binaries... did I not look hard enough? Thanks! Matt Gidden -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.gidden at gmail.com Wed Mar 2 04:17:05 2016 From: matthew.gidden at gmail.com (Matthew Gidden) Date: Wed, 2 Mar 2016 10:17:05 +0100 Subject: [CMake] Build from Source on Solaris In-Reply-To: References: Message-ID: Hi Marc, Thanks for the swift reply. To the best that I can tell, that thread is dealing with trying to build a project using cmake. I'm trying to build cmake (i.e., ./bootstrap && make && make install). To note, I get something like the following errors (which are available in the gist). ``` "/usr/include/iso/math_c99.h", line 697: Error: The function "__builtin_signbitl" must have a prototype. "/opt/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/cmath", line 562: Error: std::fpclassify(float) already had a body defined. ``` Cheers, Matt On Wed, Mar 2, 2016 at 9:54 AM, CHEVRIER, Marc wrote: > Hi, > > Some help can be found in this thread: > http://public.kitware.com/pipermail/cmake-developers/2015-September/026550.html > > Marc > > From: CMake on behalf of Matthew Gidden < > matthew.gidden at gmail.com> > Date: Wednesday 2 March 2016 at 09:44 > To: "cmake at cmake.org" > Subject: [CMake] Build from Source on Solaris > > Hi all, > > I just tried to install from source on Solars 10 (sparc), on which make > failed. I have a gist here: > https://gist.github.com/gidden/7b9dc2d793ef3411debf > > My system info is: > > ``` > t501:gidden> uname -a > SunOS t501 5.11 11.3 sun4v sparc sun4v > ``` > > Any suggestions? I wasn't able to find sparc binaries... did I not look > hard enough? > > Thanks! > > Matt Gidden > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.chevrier at sap.com Wed Mar 2 04:19:20 2016 From: marc.chevrier at sap.com (CHEVRIER, Marc) Date: Wed, 2 Mar 2016 09:19:20 +0000 Subject: [CMake] Build from Source on Solaris In-Reply-To: References: Message-ID: <99F1581C-6541-4F32-BFCF-21C2A6AFE238@sap.com> Not only: see http://public.kitware.com/pipermail/cmake-developers/2015-September/026565.html for bootstrap. From: Matthew Gidden > Date: Wednesday 2 March 2016 at 10:17 To: Marc CHEVRIER > Cc: "cmake at cmake.org" > Subject: Re: [CMake] Build from Source on Solaris Hi Marc, Thanks for the swift reply. To the best that I can tell, that thread is dealing with trying to build a project using cmake. I'm trying to build cmake (i.e., ./bootstrap && make && make install). To note, I get something like the following errors (which are available in the gist). ``` "/usr/include/iso/math_c99.h", line 697: Error: The function "__builtin_signbitl" must have a prototype. "/opt/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/cmath", line 562: Error: std::fpclassify(float) already had a body defined. ``` Cheers, Matt On Wed, Mar 2, 2016 at 9:54 AM, CHEVRIER, Marc > wrote: Hi, Some help can be found in this thread: http://public.kitware.com/pipermail/cmake-developers/2015-September/026550.html Marc From: CMake > on behalf of Matthew Gidden > Date: Wednesday 2 March 2016 at 09:44 To: "cmake at cmake.org" > Subject: [CMake] Build from Source on Solaris Hi all, I just tried to install from source on Solars 10 (sparc), on which make failed. I have a gist here: https://gist.github.com/gidden/7b9dc2d793ef3411debf My system info is: ``` t501:gidden> uname -a SunOS t501 5.11 11.3 sun4v sparc sun4v ``` Any suggestions? I wasn't able to find sparc binaries... did I not look hard enough? Thanks! Matt Gidden -------------- next part -------------- An HTML attachment was scrubbed... URL: From dflogeras2 at gmail.com Wed Mar 2 05:19:46 2016 From: dflogeras2 at gmail.com (Dave Flogeras) Date: Wed, 2 Mar 2016 06:19:46 -0400 Subject: [CMake] best way of parsing test results from ctest + valgrind In-Reply-To: References: Message-ID: On Tue, Mar 1, 2016 at 8:15 PM, Aaron Boxer wrote: > Hello, > I am just getting started on using valgrind memory analysis for my tests. > When I run ctest with nightly memory check, I get an XML document, but it > is very hard to read the results. What is the best way of reading this doc? > For me, the best way to go was to go through the short-term pain of setting up CDash (it is not very hard, but you do have to set up a database, a webserver and PHP). Also, you only set it up once and you can host as many projects on your server as you like. Once that is done, create a project in CDash and it will generate you a CTestConfig.cmake which you drop into your CMake project. Then it is as easy as "make NightlySubmit" (after NightlyStart/Configure/Build/Test etc.). It handles uploading the xml to CDash and CDash will parse it and build you nice tables to summarize. Clicking into individual tests will show you their results. If you like, you can then go further and use a tool like python to script and automate your clone/configure/build/test/upload process across multiple projects/multiple variations. I do this on multiple hosts so that CDash aggregates the results of building multiple projects, with multiple compilers, on multiple operating systems. It all depends what you need. That may not be the easiest solution, but I think it is a good one and worth looking into. HTH Dave From matthew.gidden at gmail.com Wed Mar 2 05:23:00 2016 From: matthew.gidden at gmail.com (Matthew Gidden) Date: Wed, 2 Mar 2016 11:23:00 +0100 Subject: [CMake] Build from Source on Solaris In-Reply-To: <99F1581C-6541-4F32-BFCF-21C2A6AFE238@sap.com> References: <99F1581C-6541-4F32-BFCF-21C2A6AFE238@sap.com> Message-ID: Hi Marc, the last suggestion did it! I ended up using ../bootstrap --prefix=$HOME/.local -- -DCMake_NO_C_STANDARD=1 -DCMake_NO_CXX_STANDARD=1 Cheers, Matt On Wed, Mar 2, 2016 at 10:19 AM, CHEVRIER, Marc wrote: > Not only: see > http://public.kitware.com/pipermail/cmake-developers/2015-September/026565.html for > bootstrap. > > From: Matthew Gidden > Date: Wednesday 2 March 2016 at 10:17 > To: Marc CHEVRIER > Cc: "cmake at cmake.org" > Subject: Re: [CMake] Build from Source on Solaris > > Hi Marc, > > Thanks for the swift reply. To the best that I can tell, that thread is > dealing with trying to build a project using cmake. I'm trying to build > cmake (i.e., ./bootstrap && make && make install). To note, I get something > like the following errors (which are available in the gist). > > ``` > "/usr/include/iso/math_c99.h", line 697: Error: The function > "__builtin_signbitl" must have a prototype. > "/opt/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/cmath", > line 562: Error: std::fpclassify(float) already had a body defined. > ``` > > Cheers, > Matt > > > On Wed, Mar 2, 2016 at 9:54 AM, CHEVRIER, Marc > wrote: > >> Hi, >> >> Some help can be found in this thread: >> http://public.kitware.com/pipermail/cmake-developers/2015-September/026550.html >> >> Marc >> >> From: CMake on behalf of Matthew Gidden < >> matthew.gidden at gmail.com> >> Date: Wednesday 2 March 2016 at 09:44 >> To: "cmake at cmake.org" >> Subject: [CMake] Build from Source on Solaris >> >> Hi all, >> >> I just tried to install from source on Solars 10 (sparc), on which make >> failed. I have a gist here: >> https://gist.github.com/gidden/7b9dc2d793ef3411debf >> >> My system info is: >> >> ``` >> t501:gidden> uname -a >> SunOS t501 5.11 11.3 sun4v sparc sun4v >> ``` >> >> Any suggestions? I wasn't able to find sparc binaries... did I not look >> hard enough? >> >> Thanks! >> >> Matt Gidden >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Wed Mar 2 07:30:08 2016 From: DLRdave at aol.com (David Cole) Date: Wed, 2 Mar 2016 07:30:08 -0500 Subject: [CMake] Visual Studio and ExternalProject_Add In-Reply-To: References: Message-ID: Newer versions of Visual Studio install a git, too, for their source control integration features. Which git is CMake using, the one you've installed or the one Visual Studio installed? On Wed, Mar 2, 2016 at 12:45 AM, Kevin Brightwell wrote: > I've been having great success with using ExternalProject over the terrible > git submodules. However, when using Visual Studio, the following error > happens: > > Performing download step (git clone) for 'catch-lib' > 2> Cloning into 'catch-lib'... > 2> Note: checking out 'tags/v1.3.4'. > 2> > 2> You are in 'detached HEAD' state. You can look around, make experimental > 2> changes and commit them, and you can discard any commits you make in > this > 2> state without impacting any branches by performing another checkout. > 2> > 2> If you want to create a new branch to retain commits you create, you may > 2> do so (now or later) by using -b with the checkout command again. > Example: > 2> > 2> git checkout -b > 2> > 2> HEAD is now at 3b4edd7... Build for v1.3.4 > 2> fatal: 'submodule' appears to be a git command, but we were not > 2> able to execute it. Maybe git-submodule is broken? > 2> CMake Error at > C:/Users/kevin/dev/sol2/vendor/tmp/catch-lib-gitclone.cmake:58 (message): > 2> Failed to init submodules in: > 2> 'C:/Users/kevin/dev/sol2/vendor/src/catch-lib' > > The CMake file is located here: > https://github.com/Nava2/sol2/blob/cmake-build/CMakeLists.txt > > Steps I've verified: > > git.exe is on my system PATH > The submodule URL is valid > Builds on OSX/Linux > Reinstalled git (twice) > > I'm new to Visual Studio (I work primarily with Linux/OSX), so I'm sure I'm > missing something along the way. > > Thanks, > > -- > Kevin Brightwell. BESc., BSc. > MESc. Candidate 2017 > Western University > > > -- > > 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 From kevin.brightwell2 at gmail.com Wed Mar 2 08:40:20 2016 From: kevin.brightwell2 at gmail.com (Kevin Brightwell) Date: Wed, 2 Mar 2016 08:40:20 -0500 Subject: [CMake] Visual Studio and ExternalProject_Add In-Reply-To: References: Message-ID: If I had to guess, Visual Studio's. I don't know how to tell for sure. I have run the same build as an NMake build from cmd and it worked without fail. Thus my belief it's not using the system git. Kevin On Mar 2, 2016 7:30 AM, "David Cole" wrote: > Newer versions of Visual Studio install a git, too, for their source > control integration features. Which git is CMake using, the one you've > installed or the one Visual Studio installed? > > > > On Wed, Mar 2, 2016 at 12:45 AM, Kevin Brightwell > wrote: > > I've been having great success with using ExternalProject over the > terrible > > git submodules. However, when using Visual Studio, the following error > > happens: > > > > Performing download step (git clone) for 'catch-lib' > > 2> Cloning into 'catch-lib'... > > 2> Note: checking out 'tags/v1.3.4'. > > 2> > > 2> You are in 'detached HEAD' state. You can look around, make > experimental > > 2> changes and commit them, and you can discard any commits you make in > > this > > 2> state without impacting any branches by performing another checkout. > > 2> > > 2> If you want to create a new branch to retain commits you create, you > may > > 2> do so (now or later) by using -b with the checkout command again. > > Example: > > 2> > > 2> git checkout -b > > 2> > > 2> HEAD is now at 3b4edd7... Build for v1.3.4 > > 2> fatal: 'submodule' appears to be a git command, but we were not > > 2> able to execute it. Maybe git-submodule is broken? > > 2> CMake Error at > > C:/Users/kevin/dev/sol2/vendor/tmp/catch-lib-gitclone.cmake:58 (message): > > 2> Failed to init submodules in: > > 2> 'C:/Users/kevin/dev/sol2/vendor/src/catch-lib' > > > > The CMake file is located here: > > https://github.com/Nava2/sol2/blob/cmake-build/CMakeLists.txt > > > > Steps I've verified: > > > > git.exe is on my system PATH > > The submodule URL is valid > > Builds on OSX/Linux > > Reinstalled git (twice) > > > > I'm new to Visual Studio (I work primarily with Linux/OSX), so I'm sure > I'm > > missing something along the way. > > > > Thanks, > > > > -- > > Kevin Brightwell. BESc., BSc. > > MESc. Candidate 2017 > > Western University > > > > > > -- > > > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.brightwell2 at gmail.com Wed Mar 2 09:41:58 2016 From: kevin.brightwell2 at gmail.com (Kevin Brightwell) Date: Wed, 2 Mar 2016 09:41:58 -0500 Subject: [CMake] Visual Studio and ExternalProject_Add In-Reply-To: References: Message-ID: Okay, I fixed the problem. The issue was exactly as David pointed out, Visual Studio's default git does not work. I moved my git installation's PATH entry to the beginning of the PATH variable and it now works! While I find it concerning VS2015's git doesn't work, I'm happy this works now. Thanks, @David. On Wed, Mar 2, 2016 at 8:40 AM, Kevin Brightwell < kevin.brightwell2 at gmail.com> wrote: > If I had to guess, Visual Studio's. I don't know how to tell for sure. > > I have run the same build as an NMake build from cmd and it worked without > fail. Thus my belief it's not using the system git. > > Kevin > On Mar 2, 2016 7:30 AM, "David Cole" wrote: > >> Newer versions of Visual Studio install a git, too, for their source >> control integration features. Which git is CMake using, the one you've >> installed or the one Visual Studio installed? >> >> >> >> On Wed, Mar 2, 2016 at 12:45 AM, Kevin Brightwell >> wrote: >> > I've been having great success with using ExternalProject over the >> terrible >> > git submodules. However, when using Visual Studio, the following error >> > happens: >> > >> > Performing download step (git clone) for 'catch-lib' >> > 2> Cloning into 'catch-lib'... >> > 2> Note: checking out 'tags/v1.3.4'. >> > 2> >> > 2> You are in 'detached HEAD' state. You can look around, make >> experimental >> > 2> changes and commit them, and you can discard any commits you make in >> > this >> > 2> state without impacting any branches by performing another checkout. >> > 2> >> > 2> If you want to create a new branch to retain commits you create, >> you may >> > 2> do so (now or later) by using -b with the checkout command again. >> > Example: >> > 2> >> > 2> git checkout -b >> > 2> >> > 2> HEAD is now at 3b4edd7... Build for v1.3.4 >> > 2> fatal: 'submodule' appears to be a git command, but we were not >> > 2> able to execute it. Maybe git-submodule is broken? >> > 2> CMake Error at >> > C:/Users/kevin/dev/sol2/vendor/tmp/catch-lib-gitclone.cmake:58 >> (message): >> > 2> Failed to init submodules in: >> > 2> 'C:/Users/kevin/dev/sol2/vendor/src/catch-lib' >> > >> > The CMake file is located here: >> > https://github.com/Nava2/sol2/blob/cmake-build/CMakeLists.txt >> > >> > Steps I've verified: >> > >> > git.exe is on my system PATH >> > The submodule URL is valid >> > Builds on OSX/Linux >> > Reinstalled git (twice) >> > >> > I'm new to Visual Studio (I work primarily with Linux/OSX), so I'm sure >> I'm >> > missing something along the way. >> > >> > Thanks, >> > >> > -- >> > Kevin Brightwell. BESc., BSc. >> > MESc. Candidate 2017 >> > Western University >> > >> > >> > -- >> > >> > 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 >> > -- Kevin Brightwell*. BESc., BSc.* ?MESc. Candidate 2017 Western University? -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Wed Mar 2 13:49:57 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Wed, 2 Mar 2016 13:49:57 -0500 Subject: [CMake] best way of parsing test results from ctest + valgrind In-Reply-To: References: Message-ID: Thanks, Dave! Since this is an open source project, I just set up a CDash instance on my.cdash.org. Cheers, Aaron On Wed, Mar 2, 2016 at 5:19 AM, Dave Flogeras wrote: > On Tue, Mar 1, 2016 at 8:15 PM, Aaron Boxer wrote: > > Hello, > > I am just getting started on using valgrind memory analysis for my tests. > > When I run ctest with nightly memory check, I get an XML document, but it > > is very hard to read the results. What is the best way of reading this > doc? > > > > For me, the best way to go was to go through the short-term pain of > setting up CDash (it is not very hard, but you do have to set up a > database, a webserver and PHP). Also, you only set it up once and you > can host as many projects on your server as you like. > > Once that is done, create a project in CDash and it will generate you > a CTestConfig.cmake which you drop into your CMake project. Then it is > as easy as "make NightlySubmit" (after > NightlyStart/Configure/Build/Test etc.). It handles uploading the xml > to CDash and CDash will parse it and build you nice tables to > summarize. Clicking into individual tests will show you their > results. > > If you like, you can then go further and use a tool like python to > script and automate your clone/configure/build/test/upload process > across multiple projects/multiple variations. I do this on multiple > hosts so that CDash aggregates the results of building multiple > projects, with multiple compilers, on multiple operating systems. It > all depends what you need. > > That may not be the easiest solution, but I think it is a good one and > worth looking into. > > HTH > Dave > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rcdailey.lists at gmail.com Wed Mar 2 15:44:50 2016 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Wed, 2 Mar 2016 14:44:50 -0600 Subject: [CMake] Visual Studio + Ninja? Message-ID: Right now I am using a toolchain file to setup cmake to build my C++ code against Android NDK. I also have several custom targets for running 'ant' commands for the java portions. I can use the Ninja generator to generate the build scripts to make my builds work fine. However, I'd love to be able to use Visual Studio on Windows as my IDE. However, there is no "Visual Studio - Ninja" generator that I can see. Is there a way to make Visual Studio wrap the Ninja scripts and simply execute them? that way I can use it to edit code and invoke builds. Thanks in advance. From quanzhao198757 at sina.com Thu Mar 3 04:10:21 2016 From: quanzhao198757 at sina.com (quanzhao198757 at sina.com) Date: Thu, 03 Mar 2016 17:10:21 +0800 Subject: [CMake] confused on default actions in find_path and find_library on Mac Message-ID: <20160303091021.604986C018E@webmail.sinamail.sina.com.cn> I want to use libpng.dylib in my project, and there is a libpng(version1.6) installed by brew: $ ll /Users/quanzhao/git-space/homebrew/lib/libpng.dylib $ ll /Users/quanzhao/git-space/homebrew/include/png.hthere is another libpng(version 1.4) in Mono.framework on Mac: $ ll /Library/Frameworks/Mono.framework/Libraries/libpng.dylib $ ll /Library/Frameworks/Mono.framework/Headers/png.h I use the same configuration for find_path and find_library, but cmake found v1.6-libpng and v1.4-png.h, so my project ran to error.Here is my testing cmake code:find_path(MYPNG_INCLUDE_DIR NAMES "png.h" HINTS ${USER_FIND_DIRS} PATH_SUFFIXES "include" "include/png" NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)message("!!!!!!!! MYPNG_INCLUDE_DIR: ${MYPNG_INCLUDE_DIR}")find_library(MYPNG_LIBRARY NAMES png HINTS ${USER_FIND_DIRS} PATH_SUFFIXES "lib" "local/lib" NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH)message("!!!!!!!! MYPNG_LIBRARY: ${MYPNG_LIBRARY}") The result and values of some variables are shown as following:----------------------------------------------------------------USER_CMAKE_ARGS: -G 'Unix Makefiles' -DUSER_FIND_DIRS='/Users/quanzhao/git-space/homebrew' -DCMAKE_TARGET_BUILD_TOOL:STRING='make' -DUSER_TARGET='x86_64-macosx-clang' -DCMAKE_BUILD_TYPE:STRING='Debug' -DCMAKE_C_COMPILER='/usr/bin/gcc' -DCMAKE_CXX_COMPILER='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' -DUSER_MODULE_SOURCE_DIR='/Users/quanzhao/git-space/tigerknows-mapcore/externals' -DUSER_MODULE_BINARY_DIR='/Users/quanzhao/git-space/tigerknows-mapcore/x86_64-macosx-clang-debug.make.build/modules' -DCMAKE_INSTALL_PREFIX='/Users/quanzhao/git-space/tigerknows-mapcore/x86_64-macosx-clang-debug.make.build/installs'----------------------------------------------------------------skip(NO_DEFAULT_PATH): 1. skip(NO_CMAKE_PATH): 1. test(CMAKE_LIBRARY_ARCHITECTURE): 1. each /include/ in CMAKE_PREFIX_PATH: 1. each /include in CMAKE_PREFIX_PATH: 1. CMAKE_INCLUDE_PATH: 1. CMAKE_FRAMEWORK_PATH: 2. skip(NO_CMAKE_ENVIRONMENT_PATH): 2. test(CMAKE_LIBRARY_ARCHITECTURE): 2. each /include/ in CMAKE_PREFIX_PATH: 2. each /include in CMAKE_PREFIX_PATH: 2. CMAKE_INCLUDE_PATH: 2. CMAKE_FRAMEWORK_PATH: 3. HINTS4. skip(NO_SYSTEM_ENVIRONMENT_PATH): 4. PATH: /Users/quanzhao/git-space/depot_tools:/Applications/CMake.app/Contents/bin:/Users/quanzhao/packages/apache-maven-3.3.9/bin:/Applications/Cocos/tools/ant/bin:/Users/quanzhao/git-space/homebrew/bin:/Users/quanzhao/packages/android-ndk-r10e:/Users/quanzhao/packages/adt-bundle-mac-x86_64-20140702/sdk:/Applications/Cocos/frameworks:/Users/quanzhao/packages/cocos2d-x-3/templates:/Applications/Cocos/frameworks/cocos2d-x-3.9/tools/cocos2d-console/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home:/usr/local/bin:/usr/bin:/bin:/user/sbin:/sbin4. INCLUDE: 5. skip(NO_CMAKE_SYSTEM_PATH): 5. test(CMAKE_LIBRARY_ARCHITECTURE): 5. each /include/ in CMAKE_SYSTEM_PREFIX_PATH: /usr/local;/usr;/;/Applications/CMake.app/Contents;/Users/quanzhao/git-space/tigerknows-mapcore/x86_64-macosx-clang-debug.make.build/installs;/sw;/opt/local5. each /include in CMAKE_SYSTEM_PREFIX_PATH: /usr/local;/usr;/;/Applications/CMake.app/Contents;/Users/quanzhao/git-space/tigerknows-mapcore/x86_64-macosx-clang-debug.make.build/installs;/sw;/opt/local5. CMAKE_SYSTEM_INCLUDE_PATH: /usr/include/w32api;/usr/X11R6/include;/usr/include/X11;/usr/pkg/include;/opt/csw/include;/opt/include;/usr/openwin/include5. CMAKE_SYSTEM_FRAMEWORK_PATH: ~/Library/Frameworks;/Library/Frameworks;/Network/Library/Frameworks;/System/Library/Frameworks6. PATHSCMAKE_FIND_FRAMEWORK: FIRSTCMAKE_FIND_APPBUNDLE: FIRSTCMAKE_FIND_ROOT_PATH: CMAKE_STAGING_PREFIX: CMAKE_SYSROOT: CMAKE_FIND_PATH_MODE_INCLUDE: ----------------------------------------------------------------skip(NO_DEFAULT_PATH): 1. skip(NO_CMAKE_PATH): 1. test(CMAKE_LIBRARY_ARCHITECTURE): 1. each /lib/ in CMAKE_PREFIX_PATH: 1. each /lib in CMAKE_PREFIX_PATH: 1. CMAKE_LIBRARY_PATH: 1. CMAKE_FRAMEWORK_PATH: 2. skip(NO_CMAKE_ENVIRONMENT_PATH): 2. test(CMAKE_LIBRARY_ARCHITECTURE): 2. each /lib/ in CMAKE_PREFIX_PATH: 2. each /lib in CMAKE_PREFIX_PATH: 2. CMAKE_LIBRARY_PATH: 2. CMAKE_FRAMEWORK_PATH: 3. HINTS4. skip(NO_SYSTEM_ENVIRONMENT_PATH): 4. PATH: /Users/quanzhao/git-space/depot_tools:/Applications/CMake.app/Contents/bin:/Users/quanzhao/packages/apache-maven-3.3.9/bin:/Applications/Cocos/tools/ant/bin:/Users/quanzhao/git-space/homebrew/bin:/Users/quanzhao/packages/android-ndk-r10e:/Users/quanzhao/packages/adt-bundle-mac-x86_64-20140702/sdk:/Applications/Cocos/frameworks:/Users/quanzhao/packages/cocos2d-x-3/templates:/Applications/Cocos/frameworks/cocos2d-x-3.9/tools/cocos2d-console/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home:/usr/local/bin:/usr/bin:/bin:/user/sbin:/sbin4. LIB: 5. skip(NO_CMAKE_SYSTEM_PATH): 5. test(CMAKE_LIBRARY_ARCHITECTURE): 5. each /lib/ in CMAKE_SYSTEM_PREFIX_PATH: /usr/local;/usr;/;/Applications/CMake.app/Contents;/Users/quanzhao/git-space/tigerknows-mapcore/x86_64-macosx-clang-debug.make.build/installs;/sw;/opt/local5. each /lib in CMAKE_SYSTEM_PREFIX_PATH: /usr/local;/usr;/;/Applications/CMake.app/Contents;/Users/quanzhao/git-space/tigerknows-mapcore/x86_64-macosx-clang-debug.make.build/installs;/sw;/opt/local5. CMAKE_SYSTEM_LIBRARY_PATH: /usr/lib/w32api;/usr/X11R6/lib;/usr/lib/X11;/usr/pkg/lib;/opt/csw/lib;/opt/lib;/usr/openwin/lib5. CMAKE_SYSTEM_FRAMEWORK_PATH: ~/Library/Frameworks;/Library/Frameworks;/Network/Library/Frameworks;/System/Library/Frameworks6. PATHSCMAKE_FIND_FRAMEWORK: FIRSTCMAKE_FIND_APPBUNDLE: FIRSTCMAKE_FIND_ROOT_PATH: CMAKE_STAGING_PREFIX: CMAKE_SYSROOT: CMAKE_FIND_PATH_MODE_LIBRARY: ----------------------------------------------------------------!!!!!!!! MYPNG_INCLUDE_DIR: /Library/Frameworks/Mono.framework/Headers!!!!!!!! MYPNG_LIBRARY: /Users/quanzhao/git-space/homebrew/lib/libpng.dylib I am confused on this... Only I set -DCMAKE_FIND_FRAMEWORK='LAST' can get the right result: libpng.dylib and png.h in v1.6. Does CMake get any other default actions for searching headers and libraries? -------------- next part -------------- An HTML attachment was scrubbed... URL: From nikita.barawade at einfochips.com Thu Mar 3 10:53:49 2016 From: nikita.barawade at einfochips.com (Nikita Barawade) Date: Thu, 3 Mar 2016 15:53:49 +0000 Subject: [CMake] Deploy Qt based App to WindowsStore using CMake Message-ID: Hi, I have application based on Qt UI . My aim is to convert this app to run on WindowsStore. Project has been converted to Universal Windows and building without errors. Project is using Qt version 5.6 for WInRT. Here is a command used , cmake .. -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 Target Architecture is x86. The problem comes when I try to deploy it on Local or remote machine. [cid:d7e21269-8e7b-46bb-aede-fdb6e70a10ba] i.e Unable to activate Windows Store app ... The sampleApp.exe process started but the activation request failed with error "The app didn't start" I have already gone throgh these links : http://stackoverflow.com/questions/13404315/unable-to-activate-windows-store-app http://stackoverflow.com/questions/19847563/unable-to-activate-windows-store-app-the-app-didnt-start http://blogs.technet.com/b/askperf/archive/2013/10/11/what-to-do-if-your-windows-8-modern-app-fails-to-start.aspx [http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon at 2.png?v=73d79a89bded&a] c# - Unable to activate windows store app the app didn't ... stackoverflow.com First of all I would like to say that I already tried all the solutions I could find on the internet, including Unable to Activate Windows Store App I recently ... http://irisclasson.com/2012/11/04/problem-unable-to-activate-windows-store-app-the-app1-exe-process-started-but-the-activation-request-failed-with-error-the-app-didnt-start/ [http://www.irisclasson.com/wp-content/uploads/2012/11/uable-to-activate-windows-store-app.jpg] Problem: Unable to activate Windows Store app: The App1 ... irisclasson.com Thanks, this really helped! The other solutions I found weren't applicable for me, but this was just what I needed. [http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon at 2.png?v=73d79a89bded&a] visual studio - Unable to Activate Windows Store App ... stackoverflow.com I installed a retail version of Windows 8 Pro. I downloaded and installed Visual Studio Express 2012. I asked for and received a developers certificate. Then I tried ... If anyone has tried it before ? Please guide. Regards, Nikita ************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. ************************************************************************************************************************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 115794 bytes Desc: pastedImage.png URL: From bballet at ivsweb.com Thu Mar 3 13:43:12 2016 From: bballet at ivsweb.com (Benjamin Ballet) Date: Thu, 3 Mar 2016 19:43:12 +0100 Subject: [CMake] fixup_bundle on Windows : issue with multiple exe applications Message-ID: Hello I'd like to discuss a problem I encountered today with the very useful module BundleUtilities We have an application on Windows with one main exe file in the top folder and a few other exe in subdirectories, like that : applicationfolder \ | main.exe | toolsfolder \ | supertoolfolder \ | supertool.exe | toptoolfolder \ | toptool.exe But if I simply call fixup_bundle("applicationfolder/main.exe" plugins libs) the verify_app will fails. Just a reminder that there is no rpath on Windows : dll must be either in PATH or in the same folder or in the working directory. We expected fixup_bundle to copy the required dll for main.exe in applicationfolder, the required dll for supertool.exe in supertoolfolder and the required dll for toptool.exe in toptoolfolder, but it acually didn't copied anything in supertoolfolder and toptoolfolder. I worked around this issue by calling fixup_bundle multiple time with the following order : (the deepest exes first) fixup_bundle("applicationfolder/toolsfolder/supertoolfolder/supertool.exe" plugins libs) fixup_bundle("applicationfolder/toolsfolder/toptoolfolder/toptool.exe" plugins libs) fixup_bundle("applicationfolder/main.exe" plugins libs) -- *Benjamin BALLET* Ing?nieur R&D *ACTIVISU* 19, rue Klock - 92110 Clichy *> Standard T?l* : 01 44 69 37 37 *>* www.activisu.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Thu Mar 3 15:02:59 2016 From: DLRdave at aol.com (David Cole) Date: Thu, 3 Mar 2016 15:02:59 -0500 Subject: [CMake] fixup_bundle on Windows : issue with multiple exe applications In-Reply-To: References: Message-ID: It was designed originally with the assumption that all the executables in a bundle are in the same directory. If you violate that assumption, I don't think you can count on it to do the right thing 100% of the time. If it works for you calling it multiple times with deepest first, then maybe you can get lucky... I would definitely dig into it and understand exactly what it's doing, though, if you want to make sure it's going to continue working for your scenario. HTH, David C. On Thu, Mar 3, 2016 at 1:43 PM, Benjamin Ballet wrote: > Hello > > I'd like to discuss a problem I encountered today with the very useful > module BundleUtilities > > We have an application on Windows with one main exe file in the top folder > and a few other exe in subdirectories, like that : > > applicationfolder \ > | main.exe > | toolsfolder \ > | supertoolfolder \ > | > supertool.exe > | toptoolfolder \ > | > toptool.exe > > But if I simply call > fixup_bundle("applicationfolder/main.exe" plugins libs) > > the verify_app will fails. > > Just a reminder that there is no rpath on Windows : dll must be either in > PATH or in the same folder or in the working directory. > > We expected fixup_bundle to copy the required dll for main.exe in > applicationfolder, the required dll for supertool.exe in supertoolfolder and > the required dll for toptool.exe in toptoolfolder, but it acually didn't > copied anything in supertoolfolder and toptoolfolder. > > I worked around this issue by calling fixup_bundle multiple time with the > following order : (the deepest exes first) > > fixup_bundle("applicationfolder/toolsfolder/supertoolfolder/supertool.exe" > plugins libs) > fixup_bundle("applicationfolder/toolsfolder/toptoolfolder/toptool.exe" > plugins libs) > fixup_bundle("applicationfolder/main.exe" plugins libs) > > > -- > Benjamin BALLET > Ing?nieur R&D > > ACTIVISU > 19, rue Klock - 92110 Clichy >> Standard T?l : 01 44 69 37 37 >> www.activisu.com > > -- > > 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 From roman.wueger at gmx.at Thu Mar 3 15:09:53 2016 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Thu, 3 Mar 2016 21:09:53 +0100 Subject: [CMake] Deploy Qt based App to WindowsStore using CMake In-Reply-To: References: Message-ID: <6BD10631-5648-496C-AC0A-BDAE193860CB@gmx.at> Do you have the developer mode under Windows 10 activated? Do you have registered your app (Add-AppxPackage -Register AppxManifest.xml)? See https://doc-snapshots.qt.io/qt5-5.6/winrt-support.html#building-from-source Best regards Roman > Am 03.03.2016 um 16:53 schrieb Nikita Barawade : > > > > Hi, > > I have application based on Qt UI . My aim is to convert this app to run on WindowsStore. > > Project has been converted to Universal Windows and building without errors. > Project is using Qt version 5.6 for WInRT. > Here is a command used , > > cmake .. -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 > > Target Architecture is x86. > > The problem comes when I try to deploy it on Local or remote machine. > > > i.e Unable to activate Windows Store app ... > The sampleApp.exe process started but the activation request failed with error "The app didn't start" > > I have already gone throgh these links : > http://stackoverflow.com/questions/13404315/unable-to-activate-windows-store-app > http://stackoverflow.com/questions/19847563/unable-to-activate-windows-store-app-the-app-didnt-start > http://blogs.technet.com/b/askperf/archive/2013/10/11/what-to-do-if-your-windows-8-modern-app-fails-to-start.aspx > > c# - Unable to activate windows store app the app didn't ... > stackoverflow.com > First of all I would like to say that I already tried all the solutions I could find on the internet, including Unable to Activate Windows Store App I recently ... > > > http://irisclasson.com/2012/11/04/problem-unable-to-activate-windows-store-app-the-app1-exe-process-started-but-the-activation-request-failed-with-error-the-app-didnt-start/ > > Problem: Unable to activate Windows Store app: The App1 ... > irisclasson.com > Thanks, this really helped! The other solutions I found weren?t applicable for me, but this was just what I needed. > > > > visual studio - Unable to Activate Windows Store App ... > stackoverflow.com > I installed a retail version of Windows 8 Pro. I downloaded and installed Visual Studio Express 2012. I asked for and received a developers certificate. Then I tried ... > > > If anyone has tried it before ? Please guide. > > > Regards, > Nikita > ************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. ************************************************************************************************************************************************************* > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at su-root.co.uk Thu Mar 3 16:57:10 2016 From: dan at su-root.co.uk (Dan Liew) Date: Thu, 3 Mar 2016 21:57:10 +0000 Subject: [CMake] Appending to LINK_FLAGS property of a target doesn't seem to work correctly Message-ID: Hi, I noticed recently is you do something like this add_executable(foo a.cpp b.cpp) set_property(TARGET shell APPEND PROPERTY LINK_FLAGS "-fopenmp") set_property(TARGET shell APPEND PROPERTY LINK_FLAGS "-static") then the flags that end up being passed to the compiler during linking are like this. gcc -g -O0 -fopenmp;-static It looks like when using the property with APPEND it becomes a list but when emitted the list isn't expanded properly. I noticed this using CMake 3.4.3 using the "Unix Makefile" generator. Is this intentional or is this a bug? Thanks, Dan. From nilsgladitz at gmail.com Thu Mar 3 17:02:02 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 3 Mar 2016 23:02:02 +0100 Subject: [CMake] [cmake-developers] Appending to LINK_FLAGS property of a target doesn't seem to work correctly In-Reply-To: References: Message-ID: <56D8B45A.9040309@gmail.com> On 03.03.2016 22:57, Dan Liew wrote: > Hi, > > I noticed recently is you do something like this > > add_executable(foo a.cpp b.cpp) > set_property(TARGET shell APPEND PROPERTY LINK_FLAGS "-fopenmp") > set_property(TARGET shell APPEND PROPERTY LINK_FLAGS "-static") > > then the flags that end up being passed to the compiler during linking > are like this. > > gcc -g -O0 -fopenmp;-static > > It looks like when using the property with APPEND it becomes a list > but when emitted the list isn't expanded properly. I noticed this > using CMake 3.4.3 using the "Unix Makefile" generator. > > Is this intentional or is this a bug? LINK_FLAGS is not a list property; flags have to be whitespace separated. You can use APPEND_STRING instead of APPEND for this. Nils From anton.yartsev at gmail.com Thu Mar 3 19:30:08 2016 From: anton.yartsev at gmail.com (Anton Yartsev) Date: Fri, 4 Mar 2016 03:30:08 +0300 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. Message-ID: <56D8D710.1050107@Gmail.com> Hi all, I'm trying to use Clang, compiled with VS 2013 (configuration:Release, platform:x64) as a C/C++ compiler for a simple HelloWorld CMake project. Generation ends up with errors like "clang.exe: error: no such file or directory: '/DWIN32'" at compiler check stage. If I understand correctly the problem is that MSVC compiler options are fed to Clang for some reason (maybe the "-- The C compiler identification is unknown" log entry is related to the problem?). Could anyone help to resolve this, please? I also tried to change compiler ID with "-DCMAKE_C_COMPILER_ID=Clang -DCMAKE_CXX_COMPILER_ID=Clang", then compilation succeeded, but linkage failed (just as described in the thread "Question on usage of cmake on Windows with clang" http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/54650). Here the problem seems to be reversed: GNU linker options are fed to MS linker. ************** Setup and details: 1) INCLUDE and PATH set to clang/clang-cl 2) command line environment is configured with vsvars32.bat 3) CC and CXX set to clang $ cat CMakeLists.txt project(test_project) add_executable(main file.cpp) $ cmake -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang .. Log: -- The C compiler identification is unknown -- The CXX compiler identification is Clang 3.7.1 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "D:/-Work-/llvm-3.7.1.src/-VS_build VS 2013-/Release/bin/clang.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/CMakeFiles/CMakeTmp Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_2cb9d" [1/2] Building C object CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj FAILED: D:\-Work-\LLVM-3~2.SRC\-VS_BU~2\Release\bin\clang.exe /DWIN32 /D_WINDOWS /W3 -o CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj -c testCCompiler.c clang.exe: error: no such file or directory: '/DWIN32' clang.exe: error: no such file or directory: '/D_WINDOWS' ... OS: Windows 7 (x64) clang version 3.7.1 (tags/RELEASE_371/final) Target: x86_64-pc-windows-msvc Thread model: posix cmake version 3.5.0-rc3 Thank you! -- Anton From cristian.adam at gmail.com Fri Mar 4 02:32:29 2016 From: cristian.adam at gmail.com (Cristian Adam) Date: Fri, 4 Mar 2016 08:32:29 +0100 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: <56D8D710.1050107@Gmail.com> References: <56D8D710.1050107@Gmail.com> Message-ID: Hi Anton, clang.exe doesn't know of any windows specific things. Clang-cl instead does. Just make sure to have clang-cl before msvc-cl in path and ninja will just work. Cheers, Cristian On Mar 4, 2016 01:31, "Anton Yartsev" wrote: > Hi all, > > I'm trying to use Clang, compiled with VS 2013 (configuration:Release, > platform:x64) as a C/C++ compiler for a simple HelloWorld CMake project. > Generation ends up with errors like "clang.exe: error: no such file or > directory: '/DWIN32'" at compiler check stage. If I understand correctly > the problem is that MSVC compiler options are fed to Clang for some reason > (maybe the "-- The C compiler identification is unknown" log entry is > related to the problem?). > Could anyone help to resolve this, please? > > I also tried to change compiler ID with "-DCMAKE_C_COMPILER_ID=Clang > -DCMAKE_CXX_COMPILER_ID=Clang", then compilation succeeded, but linkage > failed (just as described in the thread "Question on usage of cmake on > Windows with clang" > http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/54650). > Here the problem seems to be reversed: GNU linker options are fed to MS > linker. > > ************** Setup and details: > 1) INCLUDE and PATH set to clang/clang-cl > 2) command line environment is configured with vsvars32.bat > 3) CC and CXX set to clang > > $ cat CMakeLists.txt > project(test_project) > add_executable(main file.cpp) > > $ cmake -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang .. > > Log: > -- The C compiler identification is unknown > -- The CXX compiler identification is Clang 3.7.1 > -- Check for working C compiler using: Ninja > -- Check for working C compiler using: Ninja -- broken > CMake Error at C:/Program > Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): > The C compiler "D:/-Work-/llvm-3.7.1.src/-VS_build VS > 2013-/Release/bin/clang.exe" is not able to compile a simple test > program. > It fails with the following output: > Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/CMakeFiles/CMakeTmp > > Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_2cb9d" > > [1/2] Building C object CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj > > FAILED: D:\-Work-\LLVM-3~2.SRC\-VS_BU~2\Release\bin\clang.exe /DWIN32 > /D_WINDOWS /W3 -o CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj -c > testCCompiler.c > > clang.exe: error: no such file or directory: '/DWIN32' > clang.exe: error: no such file or directory: '/D_WINDOWS' > ... > > OS: Windows 7 (x64) > > clang version 3.7.1 (tags/RELEASE_371/final) > Target: x86_64-pc-windows-msvc > Thread model: posix > > cmake version 3.5.0-rc3 > > Thank you! > > -- > Anton > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nikita.barawade at einfochips.com Fri Mar 4 02:28:29 2016 From: nikita.barawade at einfochips.com (Nikita Barawade) Date: Fri, 4 Mar 2016 07:28:29 +0000 Subject: [CMake] Deploy Qt based App to WindowsStore using CMake In-Reply-To: <6BD10631-5648-496C-AC0A-BDAE193860CB@gmx.at> References: , <6BD10631-5648-496C-AC0A-BDAE193860CB@gmx.at> Message-ID: Hi, Thank you for reply ! Yes , I have the developer mode under Windows 10 activated. I can see AppxManifest.xml present inside ,Sample_App\Build\Debug\AppX\ With below link i.e using qmake to covert Qt project to WinRT compatible, I can get App running on both "Remote machine" and "Local Machine" . But I want it to be done using cmake only. https://doc-snapshots.qt.io/qt5-5.6/winrt-support.html#building-from-source Qt for WinRT | Qt 5.6 doc-snapshots.qt.io If you are targeting a remote device, please follow all instructions by Visual Studio to set it up correctly. If you are targeting an emulator for Windows Phone ... Regards, ?Nikita? ________________________________ From: Roman W?ger Sent: 04 March 2016 01:39 AM To: Nikita Barawade Cc: cmake at cmake.org Subject: Re: [CMake] Deploy Qt based App to WindowsStore using CMake Do you have the developer mode under Windows 10 activated? Do you have registered your app (Add-AppxPackage -Register AppxManifest.xml)? See https://doc-snapshots.qt.io/qt5-5.6/winrt-support.html#building-from-source Qt for WinRT | Qt 5.6 doc-snapshots.qt.io If you are targeting a remote device, please follow all instructions by Visual Studio to set it up correctly. If you are targeting an emulator for Windows Phone ... Best regards Roman Am 03.03.2016 um 16:53 schrieb Nikita Barawade >: Hi, I have application based on Qt UI . My aim is to convert this app to run on WindowsStore. Project has been converted to Universal Windows and building without errors. Project is using Qt version 5.6 for WInRT. Here is a command used , cmake .. -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 Target Architecture is x86. The problem comes when I try to deploy it on Local or remote machine. i.e Unable to activate Windows Store app ... The sampleApp.exe process started but the activation request failed with error "The app didn't start" I have already gone throgh these links : http://stackoverflow.com/questions/13404315/unable-to-activate-windows-store-app http://stackoverflow.com/questions/19847563/unable-to-activate-windows-store-app-the-app-didnt-start http://blogs.technet.com/b/askperf/archive/2013/10/11/what-to-do-if-your-windows-8-modern-app-fails-to-start.aspx c# - Unable to activate windows store app the app didn't ... stackoverflow.com First of all I would like to say that I already tried all the solutions I could find on the internet, including Unable to Activate Windows Store App I recently ... http://irisclasson.com/2012/11/04/problem-unable-to-activate-windows-store-app-the-app1-exe-process-started-but-the-activation-request-failed-with-error-the-app-didnt-start/ Problem: Unable to activate Windows Store app: The App1 ... irisclasson.com Thanks, this really helped! The other solutions I found weren?t applicable for me, but this was just what I needed. visual studio - Unable to Activate Windows Store App ... stackoverflow.com I installed a retail version of Windows 8 Pro. I downloaded and installed Visual Studio Express 2012. I asked for and received a developers certificate. Then I tried ... If anyone has tried it before ? Please guide. Regards, Nikita ************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. ************************************************************************************************************************************************************* -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.stein+cmake at mailbox.org Fri Mar 4 03:18:01 2016 From: alexander.stein+cmake at mailbox.org (Alexander Stein) Date: Fri, 04 Mar 2016 09:18:01 +0100 Subject: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS Message-ID: <6841933.oyp1NgLfeI@kongar> Hi, I want to use some required Qt component while others are optional. Apparently if you specify REQUIRED in find_package OPTIONAL_COMPONENTS is ignored. Here is a minimal CMakeLists.txt: project(test) cmake_minimum_required(VERSION 3.5) find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui OPTIONAL_COMPONENTS Invalid) /home/alex/repo/cmake/build/bin/cmake --version cmake version 3.5.20160303-gf37f cmake fails with: CMake Error at /home/alex/repo/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find Qt4 (missing: QT_INVALID_INCLUDE_DIR QT_INVALID_LIBRARY) (found version "4.8.7") Call Stack (most recent call first): /home/alex/repo/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) /home/alex/repo/cmake/Modules/FindQt4.cmake:1333 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:4 (find_package) I expected that if required components are missing cmake bails out while continuing when OPTIONAL_COMPONENTS are missing. My current workaround is: find_package(Qt4 OPTIONAL_COMPONENTS Invalid) find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui) But I would rather use a single line. Am I missing something here? Best regards, Alexander From jackie at sdiwc.info Fri Mar 4 04:34:25 2016 From: jackie at sdiwc.info (Jackie Blanco) Date: Fri, 04 Mar 2016 02:34:25 -0700 Subject: [CMake] Third CSCESM2016 - Computer Science, Computer Engineering, and Social Media - Greece Message-ID: <1eda3334968ffbc541b9e66ad78aabb7@sdiwc.info> The Third International Conference on Computer Science, Computer Engineering, and Social Media (CSCESM2016) Metropolitan College, Thessaloniki, Greece May 13-15, 2016 http://www.sdiwc.net/conferences/cscesm2016/ cscesm16 at sdiwc.net The published proceedings will be submitted for indexing in ResearchBib, ProQuest, ResearchGate, Academia and Google Scholar Databases. In addition, they will be reviewed for possible inclusion within the INSPEC, EI, DBLP, and Microsoft Academic Research Databases. BEST registered papers will be published in one of the following special issues provided that the author do major improvements and extension within the time frame that will be set by the conference and his/her paper is approved by the chief editor: - International Journal of New Computer Architectures and their Applications (IJNCAA); EISSN 2220-9085, ISSN 2412-3587 - International Journal of Cyber-Security and Digital Forensics (IJCSDF); EISSN 2225-658X, ISSN 2412-6551 - International Journal of Digital Information and Wireless Communications (IJDIWC); EISSN 2305-0012 - International Journal of New Computer Architectures and their Applications (IJNCAA); EISSN 2410-0439 The conference welcomes papers on the following (but not limited to) research topics: *Computer Science Access Controls Biometrics Technologies Computer Forensics Computer Security Data Mining Cryptography and Data Protection E-Learning Network Security Wireless Communications *Computer Engineering Computer Architecture Computer-aided Design Computer Networks Multimedia Applications Network Security and Cryptography Computer Animation Expert Systems *Social Media Image / multimedia processing Human-computer interaction Social networking sites Social innovation and effecting change Collaborative filtering Social networks and online education Researchers are encouraged to submit their work electronically. All papers will be fully refereed by a minimum of two specialized referees. Before final acceptance, all referees comments must be considered. Important Dates =============== Submission Deadline April 13, 2016 Acceptance Notification 2-4 weeks from the date of submission Final Notification April 23, 2016 Camera Ready Deadline May 3, 2016 Registration Deadline May 3, 2016 Conference Dates May 13-15, 2016 From anton.yartsev at gmail.com Fri Mar 4 06:16:09 2016 From: anton.yartsev at gmail.com (Anton Yartsev) Date: Fri, 4 Mar 2016 14:16:09 +0300 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: References: <56D8D710.1050107@Gmail.com> Message-ID: <56D96E79.7020004@Gmail.com> Hi Cristian, thanks for the replay. I have clang-cl first in PATH, the problem persists. $ SET PATH Path=D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin;... $cd D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin $dir Directory of D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin 04.03.2016 14:03 . 04.03.2016 14:03 .. 04.03.2016 01:00 11 662 848 arcmt-test.exe 04.03.2016 01:02 6 446 080 bugpoint.exe 04.03.2016 01:01 9 728 c-arcmt-test.exe 04.03.2016 01:01 82 944 c-index-test.exe 04.03.2016 17:20 40 207 872 clang++.exe 04.03.2016 01:01 32 803 840 clang-check.exe 04.03.2016 17:20 40 207 872 clang-cl.exe 04.03.2016 01:00 1 401 856 clang-format.exe 04.03.2016 17:05 814 592 clang-tblgen.exe 04.03.2016 17:20 40 207 872 clang.exe ... > Hi Anton, > > clang.exe doesn't know of any windows specific things. Clang-cl > instead does. > > Just make sure to have clang-cl before msvc-cl in path and ninja will > just work. > > Cheers, > Cristian > > On Mar 4, 2016 01:31, "Anton Yartsev" > wrote: > > Hi all, > > I'm trying to use Clang, compiled with VS 2013 > (configuration:Release, platform:x64) as a C/C++ compiler for a > simple HelloWorld CMake project. Generation ends up with errors > like "clang.exe: error: no such file or directory: '/DWIN32'" at > compiler check stage. If I understand correctly the problem is > that MSVC compiler options are fed to Clang for some reason (maybe > the "-- The C compiler identification is unknown" log entry is > related to the problem?). > Could anyone help to resolve this, please? > > I also tried to change compiler ID with > "-DCMAKE_C_COMPILER_ID=Clang -DCMAKE_CXX_COMPILER_ID=Clang", then > compilation succeeded, but linkage failed (just as described in > the thread "Question on usage of cmake on Windows with clang" > http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/54650). > Here the problem seems to be reversed: GNU linker options are fed > to MS linker. > > ************** Setup and details: > 1) INCLUDE and PATH set to clang/clang-cl > 2) command line environment is configured with vsvars32.bat > 3) CC and CXX set to clang > > $ cat CMakeLists.txt > project(test_project) > add_executable(main file.cpp) > > $ cmake -G "Ninja" -DCMAKE_C_COMPILER=clang > -DCMAKE_CXX_COMPILER=clang .. > > Log: > -- The C compiler identification is unknown > -- The CXX compiler identification is Clang 3.7.1 > -- Check for working C compiler using: Ninja > -- Check for working C compiler using: Ninja -- broken > CMake Error at C:/Program > Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 > (message): > The C compiler "D:/-Work-/llvm-3.7.1.src/-VS_build VS > 2013-/Release/bin/clang.exe" is not able to compile a simple > test program. > It fails with the following output: > Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/CMakeFiles/CMakeTmp > > Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_2cb9d" > > [1/2] Building C object > CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj > > FAILED: D:\-Work-\LLVM-3~2.SRC\-VS_BU~2\Release\bin\clang.exe > /DWIN32 > /D_WINDOWS /W3 -o CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj -c > testCCompiler.c > > clang.exe: error: no such file or directory: '/DWIN32' > clang.exe: error: no such file or directory: '/D_WINDOWS' > ... > > OS: Windows 7 (x64) > > clang version 3.7.1 (tags/RELEASE_371/final) > Target: x86_64-pc-windows-msvc > Thread model: posix > > cmake version 3.5.0-rc3 > > Thank you! > > -- > Anton > > -- > > 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 > -- Anton -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at su-root.co.uk Fri Mar 4 06:39:28 2016 From: dan at su-root.co.uk (Dan Liew) Date: Fri, 4 Mar 2016 11:39:28 +0000 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: <56D96E79.7020004@Gmail.com> References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> Message-ID: Hi, On 4 March 2016 at 11:16, Anton Yartsev wrote: > Hi Cristian, > > thanks for the replay. I have clang-cl first in PATH, the problem persists. Just to check. Did you run cmake in a new (i.e. empty) build directory when you fixed that? IIRC once a compiler has been picked during configure you can't change it so if you need to change it you have to build in a new build directory or delete everything in the current build directory. Shouldn't the following work (assuming clang-cl.exe is in your path) CXX=clang-cl.exe CC=clang-cl.exe cmake -G "Ninja" .. ? From dan at su-root.co.uk Fri Mar 4 06:42:23 2016 From: dan at su-root.co.uk (Dan Liew) Date: Fri, 4 Mar 2016 11:42:23 +0000 Subject: [CMake] [cmake-developers] Appending to LINK_FLAGS property of a target doesn't seem to work correctly In-Reply-To: <56D8B45A.9040309@gmail.com> References: <56D8B45A.9040309@gmail.com> Message-ID: On 3 March 2016 at 22:02, Nils Gladitz wrote: > On 03.03.2016 22:57, Dan Liew wrote: >> >> Hi, >> >> I noticed recently is you do something like this >> >> add_executable(foo a.cpp b.cpp) >> set_property(TARGET shell APPEND PROPERTY LINK_FLAGS "-fopenmp") >> set_property(TARGET shell APPEND PROPERTY LINK_FLAGS "-static") >> >> then the flags that end up being passed to the compiler during linking >> are like this. >> >> gcc -g -O0 -fopenmp;-static >> >> It looks like when using the property with APPEND it becomes a list >> but when emitted the list isn't expanded properly. I noticed this >> using CMake 3.4.3 using the "Unix Makefile" generator. >> >> Is this intentional or is this a bug? > > > LINK_FLAGS is not a list property; flags have to be whitespace separated. > You can use APPEND_STRING instead of APPEND for this. Thanks for this. Shouldn't the fact that ``LINK_FLAGS`` is a string property and not a list property be in the ``cmake-properties`` documentation? The version of the documentation for my version of CMake (3.4.3) doesn't say what the property type is. Thanks, Dan. From nilsgladitz at gmail.com Fri Mar 4 06:52:21 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 4 Mar 2016 12:52:21 +0100 Subject: [CMake] [cmake-developers] Appending to LINK_FLAGS property of a target doesn't seem to work correctly In-Reply-To: References: <56D8B45A.9040309@gmail.com> Message-ID: <56D976F5.6020602@gmail.com> On 03/04/2016 12:42 PM, Dan Liew wrote: > Thanks for this. Shouldn't the fact that ``LINK_FLAGS`` is a string > property and not a list property be in the ``cmake-properties`` > documentation? The version of the documentation for my version of > CMake (3.4.3) doesn't say what the property type is. Perhaps though the plain string properties predate the list properties which is probably why the documentation does it the other way around e.g. https://cmake.org/cmake/help/v3.4/prop_dir/COMPILE_OPTIONS.html is documented explicitly as a list property. COMPILE_OPTIONS deprecated the old COMPILE_FLAGS property (which was plain string based). For LINK_FLAGS the same thing was supposed to happen at some point but the topic working on this seems to have stalled. Nils From anton.yartsev at gmail.com Fri Mar 4 07:24:15 2016 From: anton.yartsev at gmail.com (Anton Yartsev) Date: Fri, 4 Mar 2016 15:24:15 +0300 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> Message-ID: <56D97E6F.5000902@Gmail.com> > Hi, > > On 4 March 2016 at 11:16, Anton Yartsev wrote: >> Hi Cristian, >> >> thanks for the replay. I have clang-cl first in PATH, the problem persists. > Just to check. Did you run cmake in a new (i.e. empty) build directory > when you fixed that? IIRC once a compiler has been picked > during configure you can't change it so if you need to change it you > have to build in a new build directory or delete everything in > the current build directory. > > Shouldn't the following work (assuming clang-cl.exe is in your path) > > CXX=clang-cl.exe CC=clang-cl.exe cmake -G "Ninja" .. > > ? Hi Dan, I haven't fixed that, clang/clang-cl was initially first in PATH. I deleted CMakeFiles dir and CMakeCache.txt before each try. Just tried to build from the scratch in the new empty directory - the problem persists. Here are the results from 'CXX=clang-cl.exe CC=clang-cl.exe cmake -G "Ninja" ..' : $ set CXX=clang-cl $ set CC=clang-cl $ cmake -G "Ninja" .. -- No build type selected, default to Debug -- The C compiler identification is Clang 3.7.1 -- The CXX compiler identification is Clang 3.7.1 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "D:/-Work-/llvm-3.7.1.src/-VS_build VS 2013-/Release/bin/clang-cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/CMakeFiles/CMakeTmp Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_75d21" [1/2] Building C object CMakeFiles\cmTC_75d21.dir\testCCompiler.c.obj [2/2] Linking C executable cmTC_75d21.exe FAILED: cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_75d21.dir --manifests -- CMAKE_LINKER-NOTFOUND /nologo CMakeFiles\cmTC_75d21.dir\testCCompiler.c.obj /out:cmTC_75d21.exe /implib:cmTC_75d21.lib /pdb:cmTC_75d21.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." RC Pass 1 failed to run. ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:29 (project) -- Configuring incomplete, errors occurred! See also "D:/-Work-/llvm-3.7.1.src/-CLANG-/CMakeFiles/CMakeOutput.log". See also "D:/-Work-/llvm-3.7.1.src/-CLANG-/CMakeFiles/CMakeError.log". -- Anton From cmake at eikel.org Fri Mar 4 07:36:37 2016 From: cmake at eikel.org (Benjamin Eikel) Date: Fri, 04 Mar 2016 12:36:37 +0000 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: <56D97E6F.5000902@Gmail.com> References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> <56D97E6F.5000902@Gmail.com> Message-ID: <20160304123637.Horde.RG8oLdmm6tO1NSq6vmRxrkc@webmail.eikel.org> Hi Anton, Zitat von Anton Yartsev : > > Here are the results from 'CXX=clang-cl.exe CC=clang-cl.exe cmake -G > "Ninja" ..' : > > $ set CXX=clang-cl > $ set CC=clang-cl > $ cmake -G "Ninja" .. > > -- No build type selected, default to Debug > -- The C compiler identification is Clang 3.7.1 > -- The CXX compiler identification is Clang 3.7.1 > -- Check for working C compiler using: Ninja > -- Check for working C compiler using: Ninja -- broken > CMake Error at C:/Program > Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 > (message): > The C compiler "D:/-Work-/llvm-3.7.1.src/-VS_build VS > 2013-/Release/bin/clang-cl.exe" is not able to compile a simple test > program. the path to your compiler seems to have spaces in it. I had problems on Windows with spaces or other special characters in the compiler path, too. Please try to locate the compiler in another path and see if it fixes your issue. If it does, maybe the CMake developers could check the path escaping on Windows. Kind regards Benjamin From bballet at ivsweb.com Fri Mar 4 08:15:30 2016 From: bballet at ivsweb.com (Benjamin Ballet) Date: Fri, 4 Mar 2016 14:15:30 +0100 Subject: [CMake] fixup_bundle on Windows : issue with multiple exe applications In-Reply-To: References: Message-ID: Indeed I was lucky : It worked with 3.3.1 but not anymore with 3.4.3.. I've got a strang bug with one .NET dll generated near a tool : CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/GetPrerequisites.cmake:798 (message): 106> C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/dumpbin.exe 106> failed: 1181 I'm digging 2016-03-03 21:02 GMT+01:00 David Cole : > It was designed originally with the assumption that all the > executables in a bundle are in the same directory. If you violate that > assumption, I don't think you can count on it to do the right thing > 100% of the time. > > If it works for you calling it multiple times with deepest first, then > maybe you can get lucky... > > I would definitely dig into it and understand exactly what it's doing, > though, if you want to make sure it's going to continue working for > your scenario. > > > HTH, > David C. > > > On Thu, Mar 3, 2016 at 1:43 PM, Benjamin Ballet > wrote: > > Hello > > > > I'd like to discuss a problem I encountered today with the very useful > > module BundleUtilities > > > > We have an application on Windows with one main exe file in the top > folder > > and a few other exe in subdirectories, like that : > > > > applicationfolder \ > > | main.exe > > | toolsfolder \ > > | supertoolfolder \ > > | > > supertool.exe > > | toptoolfolder \ > > | > > toptool.exe > > > > But if I simply call > > fixup_bundle("applicationfolder/main.exe" plugins libs) > > > > the verify_app will fails. > > > > Just a reminder that there is no rpath on Windows : dll must be either in > > PATH or in the same folder or in the working directory. > > > > We expected fixup_bundle to copy the required dll for main.exe in > > applicationfolder, the required dll for supertool.exe in supertoolfolder > and > > the required dll for toptool.exe in toptoolfolder, but it acually didn't > > copied anything in supertoolfolder and toptoolfolder. > > > > I worked around this issue by calling fixup_bundle multiple time with the > > following order : (the deepest exes first) > > > > > fixup_bundle("applicationfolder/toolsfolder/supertoolfolder/supertool.exe" > > plugins libs) > > fixup_bundle("applicationfolder/toolsfolder/toptoolfolder/toptool.exe" > > plugins libs) > > fixup_bundle("applicationfolder/main.exe" plugins libs) > > > > > > -- > > Benjamin BALLET > > Ing?nieur R&D > > > > ACTIVISU > > 19, rue Klock - 92110 Clichy > >> Standard T?l : 01 44 69 37 37 > >> www.activisu.com > > > > -- > > > > 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 > -- *Benjamin BALLET* Ing?nieur R&D *ACTIVISU* 19, rue Klock - 92110 Clichy *> Standard T?l* : 01 44 69 37 37 *>* www.activisu.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From cristian.adam at gmail.com Fri Mar 4 08:35:51 2016 From: cristian.adam at gmail.com (Cristian Adam) Date: Fri, 4 Mar 2016 14:35:51 +0100 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: <56D96E79.7020004@Gmail.com> References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> Message-ID: Hi Anton, When I say clang-cl I mean how the official llvm package does it - a 50mb executable named cl.exe and not clang-cl.exe. Ninja believes it compiles with visual c++, but instead it compiles with clang. That's why you need to put the path to clang INCLUDE and PATH first. Simply rename clang-cl.exe as cl.exe, copy it in a directory and put that path as first in the PATH environment variable. Cheers, Cristian. On Mar 4, 2016 12:16, "Anton Yartsev" wrote: > Hi Cristian, > > thanks for the replay. I have clang-cl first in PATH, the problem persists. > > $ SET PATH > Path=D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin;... > > $cd D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin > $dir > Directory of D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin > > 04.03.2016 14:03 . > 04.03.2016 14:03 .. > 04.03.2016 01:00 11 662 848 arcmt-test.exe > 04.03.2016 01:02 6 446 080 bugpoint.exe > 04.03.2016 01:01 9 728 c-arcmt-test.exe > 04.03.2016 01:01 82 944 c-index-test.exe > 04.03.2016 17:20 40 207 872 clang++.exe > 04.03.2016 01:01 32 803 840 clang-check.exe > 04.03.2016 17:20 40 207 872 clang-cl.exe > 04.03.2016 01:00 1 401 856 clang-format.exe > 04.03.2016 17:05 814 592 clang-tblgen.exe > 04.03.2016 17:20 40 207 872 clang.exe > ... > > > Hi Anton, > > clang.exe doesn't know of any windows specific things. Clang-cl instead > does. > > Just make sure to have clang-cl before msvc-cl in path and ninja will just > work. > > Cheers, > Cristian > On Mar 4, 2016 01:31, "Anton Yartsev" wrote: > >> Hi all, >> >> I'm trying to use Clang, compiled with VS 2013 (configuration:Release, >> platform:x64) as a C/C++ compiler for a simple HelloWorld CMake project. >> Generation ends up with errors like "clang.exe: error: no such file or >> directory: '/DWIN32'" at compiler check stage. If I understand correctly >> the problem is that MSVC compiler options are fed to Clang for some reason >> (maybe the "-- The C compiler identification is unknown" log entry is >> related to the problem?). >> Could anyone help to resolve this, please? >> >> I also tried to change compiler ID with "-DCMAKE_C_COMPILER_ID=Clang >> -DCMAKE_CXX_COMPILER_ID=Clang", then compilation succeeded, but linkage >> failed (just as described in the thread "Question on usage of cmake on >> Windows with clang" >> http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/54650). >> Here the problem seems to be reversed: GNU linker options are fed to MS >> linker. >> >> ************** Setup and details: >> 1) INCLUDE and PATH set to clang/clang-cl >> 2) command line environment is configured with vsvars32.bat >> 3) CC and CXX set to clang >> >> $ cat CMakeLists.txt >> project(test_project) >> add_executable(main file.cpp) >> >> $ cmake -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang .. >> >> Log: >> -- The C compiler identification is unknown >> -- The CXX compiler identification is Clang 3.7.1 >> -- Check for working C compiler using: Ninja >> -- Check for working C compiler using: Ninja -- broken >> CMake Error at C:/Program >> Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): >> The C compiler "D:/-Work-/llvm-3.7.1.src/-VS_build VS >> 2013-/Release/bin/clang.exe" is not able to compile a simple test >> program. >> It fails with the following output: >> Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/CMakeFiles/CMakeTmp >> >> Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_2cb9d" >> >> [1/2] Building C object CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj >> >> FAILED: D:\-Work-\LLVM-3~2.SRC\-VS_BU~2\Release\bin\clang.exe /DWIN32 >> /D_WINDOWS /W3 -o CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj -c >> testCCompiler.c >> >> clang.exe: error: no such file or directory: '/DWIN32' >> clang.exe: error: no such file or directory: '/D_WINDOWS' >> ... >> >> OS: Windows 7 (x64) >> >> clang version 3.7.1 (tags/RELEASE_371/final) >> Target: x86_64-pc-windows-msvc >> Thread model: posix >> >> cmake version 3.5.0-rc3 >> >> Thank you! >> >> -- >> Anton >> >> -- >> >> 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 >> > > > -- > Anton > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bballet at ivsweb.com Fri Mar 4 09:30:26 2016 From: bballet at ivsweb.com (Benjamin Ballet) Date: Fri, 4 Mar 2016 15:30:26 +0100 Subject: [CMake] fixup_bundle on Windows : issue with multiple exe applications In-Reply-To: References: Message-ID: FYI verifying_app failed with main.exe failed (3.4.3) because toptool depends on topdool.dll located only in toptoolfolder. The workaround is to include toptoolfolder in libs folder for fixup_bundle(main.exe...) David your answer was helpful to me. I know it's an expected behavior. Would a patch handling such multiple folder application been accepted ? I may try to work on it, since I either have to work on the workarounds or a nice improvment. 2016-03-04 14:15 GMT+01:00 Benjamin Ballet : > Indeed I was lucky : It worked with 3.3.1 but not anymore with 3.4.3.. > I've got a strang bug with one .NET dll generated near a tool : > > CMake Error at C:/Program Files > (x86)/CMake/share/cmake-3.4/Modules/GetPrerequisites.cmake:798 (message): > 106> C:/Program Files (x86)/Microsoft Visual Studio > 12.0/VC/bin/dumpbin.exe > 106> failed: 1181 > > I'm digging > > > > 2016-03-03 21:02 GMT+01:00 David Cole : > >> It was designed originally with the assumption that all the >> executables in a bundle are in the same directory. If you violate that >> assumption, I don't think you can count on it to do the right thing >> 100% of the time. >> >> If it works for you calling it multiple times with deepest first, then >> maybe you can get lucky... >> >> I would definitely dig into it and understand exactly what it's doing, >> though, if you want to make sure it's going to continue working for >> your scenario. >> >> >> HTH, >> David C. >> >> >> On Thu, Mar 3, 2016 at 1:43 PM, Benjamin Ballet >> wrote: >> > Hello >> > >> > I'd like to discuss a problem I encountered today with the very useful >> > module BundleUtilities >> > >> > We have an application on Windows with one main exe file in the top >> folder >> > and a few other exe in subdirectories, like that : >> > >> > applicationfolder \ >> > | main.exe >> > | toolsfolder \ >> > | supertoolfolder \ >> > | >> > supertool.exe >> > | toptoolfolder \ >> > | >> > toptool.exe >> > >> > But if I simply call >> > fixup_bundle("applicationfolder/main.exe" plugins libs) >> > >> > the verify_app will fails. >> > >> > Just a reminder that there is no rpath on Windows : dll must be either >> in >> > PATH or in the same folder or in the working directory. >> > >> > We expected fixup_bundle to copy the required dll for main.exe in >> > applicationfolder, the required dll for supertool.exe in >> supertoolfolder and >> > the required dll for toptool.exe in toptoolfolder, but it acually didn't >> > copied anything in supertoolfolder and toptoolfolder. >> > >> > I worked around this issue by calling fixup_bundle multiple time with >> the >> > following order : (the deepest exes first) >> > >> > >> fixup_bundle("applicationfolder/toolsfolder/supertoolfolder/supertool.exe" >> > plugins libs) >> > fixup_bundle("applicationfolder/toolsfolder/toptoolfolder/toptool.exe" >> > plugins libs) >> > fixup_bundle("applicationfolder/main.exe" plugins libs) >> > >> > >> > -- >> > Benjamin BALLET >> > Ing?nieur R&D >> > >> > ACTIVISU >> > 19, rue Klock - 92110 Clichy >> >> Standard T?l : 01 44 69 37 37 >> >> www.activisu.com >> > >> > -- >> > >> > 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 >> > > > > -- > *Benjamin BALLET* > Ing?nieur R&D > > *ACTIVISU* > 19, rue Klock - 92110 Clichy > *> Standard T?l* : 01 44 69 37 37 > *>* www.activisu.com > -- *Benjamin BALLET* Ing?nieur R&D *ACTIVISU* 19, rue Klock - 92110 Clichy *> Standard T?l* : 01 44 69 37 37 *>* www.activisu.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From konstantin at podsvirov.pro Fri Mar 4 09:52:14 2016 From: konstantin at podsvirov.pro (Konstantin Podsvirov) Date: Fri, 04 Mar 2016 17:52:14 +0300 Subject: [CMake] [cmake-developers] C++11 only for a specified subdirectory In-Reply-To: References: Message-ID: <5403481457103134@web26j.yandex.ru> Hi, Roman! You can use properties for each target: C_STANDART C_STANDARD_REQUIRED CXX_STANDARD CXX_STANDARD_REQUIRED Read online: https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#properties-on-targets And this question is for cmake at cmake.org list :-) 04.03.2016, 16:20, "Roman W?ger" : > Hi, > > is it possible to activate C++11 only for a subdirectory? > > Regards > Roman > -- > > 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-developers Regards, Konstantin Podsvirov From juhani.karlsson at talvi.com Sun Mar 6 13:00:42 2016 From: juhani.karlsson at talvi.com (Juhani Karlsson) Date: Sun, 6 Mar 2016 20:00:42 +0200 Subject: [CMake] Subprojects and Cmake? Message-ID: Hi everyone, I`m having beginner problems how to include another Cmake project into another properly! (NanoGui) At the moment I`m using simply the add_subdirectory() command and then target_link_libraries to link it to the project. Seems to build fine, but when I try to include NanoGui in the project cannot find it correctly. What is the preferred workflow for this? I`m using Clion, GCC and built in CMake 3.3. Be gentle - total CMake newbie here : ) Image of the project and CMakeLists.txt in the attachments! I hope you can help! Thanks, - Juhani -- -- Juhani Karlsson 3D Artist/TD Talvi Digital Oy Tehtaankatu 27a 00150 Helsinki +358 443443088 juhani.karlsson at talvi.fi www.vimeo.com/talvi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NanoGui.png Type: image/png Size: 179227 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NanoGui2.png Type: image/png Size: 96160 bytes Desc: not available URL: From nicholas11braden at gmail.com Sun Mar 6 13:04:31 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Sun, 6 Mar 2016 12:04:31 -0600 Subject: [CMake] Subprojects and Cmake? In-Reply-To: References: Message-ID: If you are using the add_subdirectory approach, I believe you should not be using find_package and instead you just need to use target_link_libraries to have everything handled for you. Another approach would be making a superproject that builds your dependencies and your own project via ExternalProject_Add - this generally works well especially since it allows the user to easily customize the build of each dependency or use an existing install, and you don't have to worry about name collisions. On Sun, Mar 6, 2016 at 12:00 PM, Juhani Karlsson wrote: > Hi everyone, > > I`m having beginner problems how to include another Cmake project into > another properly! (NanoGui) > > At the moment I`m using simply the add_subdirectory() command and then > target_link_libraries to link it to the project. > Seems to build fine, but when I try to include NanoGui in the project cannot > find it correctly. What is the preferred workflow for this? > > I`m using Clion, GCC and built in CMake 3.3. > > Be gentle - total CMake newbie here : ) Image of the project and > CMakeLists.txt in the attachments! > > I hope you can help! > Thanks, > - Juhani > > -- > -- > Juhani Karlsson > 3D Artist/TD > > Talvi Digital Oy > Tehtaankatu 27a > 00150 Helsinki > +358 443443088 > juhani.karlsson at talvi.fi > www.vimeo.com/talvi > > -- > > 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 From juhani.karlsson at talvi.com Sun Mar 6 13:18:17 2016 From: juhani.karlsson at talvi.com (Juhani Karlsson) Date: Sun, 6 Mar 2016 20:18:17 +0200 Subject: [CMake] Subprojects and Cmake? In-Reply-To: References: Message-ID: Thanks for the fast answer Nicholas! Superproject sounds good to my ears! I`m going to try the ExternalProject_Add again. I think I missed something essential when I tried to use it! NanoGui builds fine as is - so Its just me f****ng things up ; ) Thanks, - J On 6 March 2016 at 20:04, Nicholas Braden wrote: > If you are using the add_subdirectory approach, I believe you should > not be using find_package and instead you just need to use > target_link_libraries to have everything handled for you. Another > approach would be making a superproject that builds your dependencies > and your own project via ExternalProject_Add - this generally works > well especially since it allows the user to easily customize the build > of each dependency or use an existing install, and you don't have to > worry about name collisions. > > On Sun, Mar 6, 2016 at 12:00 PM, Juhani Karlsson > wrote: > > Hi everyone, > > > > I`m having beginner problems how to include another Cmake project into > > another properly! (NanoGui) > > > > At the moment I`m using simply the add_subdirectory() command and then > > target_link_libraries to link it to the project. > > Seems to build fine, but when I try to include NanoGui in the project > cannot > > find it correctly. What is the preferred workflow for this? > > > > I`m using Clion, GCC and built in CMake 3.3. > > > > Be gentle - total CMake newbie here : ) Image of the project and > > CMakeLists.txt in the attachments! > > > > I hope you can help! > > Thanks, > > - Juhani > > > > -- > > -- > > Juhani Karlsson > > 3D Artist/TD > > > > Talvi Digital Oy > > Tehtaankatu 27a > > 00150 Helsinki > > +358 443443088 > > juhani.karlsson at talvi.fi > > www.vimeo.com/talvi > > > > -- > > > > 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 > -- -- Juhani Karlsson 3D Artist/TD Talvi Digital Oy Tehtaankatu 27a 00150 Helsinki +358 443443088 juhani.karlsson at talvi.fi www.vimeo.com/talvi -------------- next part -------------- An HTML attachment was scrubbed... URL: From csiga.biga at aol.com Mon Mar 7 04:18:44 2016 From: csiga.biga at aol.com (=?utf-8?Q?Nagy-Egri_M=C3=A1t=C3=A9_Ferenc?=) Date: Mon, 7 Mar 2016 10:18:44 +0100 Subject: [CMake] Visual Studio + Ninja? In-Reply-To: References: Message-ID: Short version: no. Long version: Visual Studio is heavily built around MSBuild as the back-end of execution of various tasks. While theoretically it could be done that MSBuild only acts as a relay and calls into Ninja scripts, you would lose the entire feature set of Solution Explorer, which is quite a large portion of the IDE. (Using CMake does preclude using most of it though.) MS is looking into deeper CMake integration into their IDE, but the exec back-end will most likely be MSBuild. Should you really want to achieve this, you would need support from both CMake side and VS side. You would need to develop an Add-In with a custom project type (CMake+Ninja) and hook up most Solution Explorer entries to generate not MSBuild but Ninja script portions. And from CMake you would need a generator for this mixed generator type. It could be done, but it?s a lot of effort. Given the performance of MSBuild (which is not that bad compared to Ninja), the benefits would only be substantial in enourmous projects. MS generally looks into increasing build throughput by integrating IncrediBuild into their IDE. Felad?: Robert Dailey Elk?ldve: 2016. m?rcius 2., szerda 21:45 C?mzett: CMake T?rgy: [CMake] Visual Studio + Ninja? Right now I am using a toolchain file to setup cmake to build my C++ code against Android NDK. I also have several custom targets for running 'ant' commands for the java portions. I can use the Ninja generator to generate the build scripts to make my builds work fine. However, I'd love to be able to use Visual Studio on Windows as my IDE. However, there is no "Visual Studio - Ninja" generator that I can see. Is there a way to make Visual Studio wrap the Ninja scripts and simply execute them? that way I can use it to edit code and invoke builds. Thanks in advance. -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hegewald at awi.de Mon Mar 7 08:52:17 2016 From: jan.hegewald at awi.de (=?utf-8?Q?=F0=9F=90=8B_Jan_Hegewald?=) Date: Mon, 7 Mar 2016 14:52:17 +0100 Subject: [CMake] install to CMAKE_BINARY_DIR fails if CC=icc Message-ID: <10B2BDAD-1D93-4114-9317-711CDD3BD927@awi.de> Dear CMakers, I encountered a strange problem with my cmake setup: In my CMakeLists.txt files there is a line install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_BINARY_DIR}) Some of my projects use add_subdirectory, and with make install I "pull" them right to the build directory. This used to work fine on several machines, even if the target is already built into the CMAKE_BINARY_DIR because I choose just to build this single CMakeLists.txt Now this setup fails on a Red Hat Server, cmake 3.4.3 but ONLY if I switch the compiler form gcc to icc. In this case the target is removed during make install and make complains with CMake Error at cmake_install.cmake:50 (file): file INSTALL cannot find "/foo/bar/installtest". Is this an error, or is it not a good idea to specify the CMAKE_BINARY_DIR as install destination? Please share your thoughts about this. Cheers, Jan From srinath.vadlamani at gmail.com Mon Mar 7 10:35:21 2016 From: srinath.vadlamani at gmail.com (Srinath Vadlamani) Date: Mon, 7 Mar 2016 08:35:21 -0700 Subject: [CMake] how to keep rpath from build to install Message-ID: Hello All, How do I keep the rpath used during the build of an executable the same when I install that executable using INSTALL(TARGETS ....)? I do set : SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) ================================= Srinath Vadlamani ================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at sleepyiora.pw Mon Mar 7 15:29:06 2016 From: ivan at sleepyiora.pw (Ivan) Date: Mon, 7 Mar 2016 23:29:06 +0300 Subject: [CMake] Compile shared library and call it's functions Message-ID: Hello! I hope someone could finally help me. I spent about two days to find solution for my problem, but with no luck. Here is my problem: I want to create a shared library (dll on Windows, .so on Linux, .dylib on OS X) that contains some functions. This library should export only these functions and nothing else. I guarantee that these function are pure C functions, so no C++ STL is needed to call them. Then I want to create an application that call functions from the shared library mentioned above. I mean that the application should not have these functions inside. I want OS linker to link the application with the library at runtime, when it initializes the application. I know, how to do this on Windows with Visual Studio: create DLL project, write functions and compile, then there will be two files: .dll and .lib, link the .lib file with the application and at runtime Windows will find the .dll. But how can I do so with CMake? Here is my CMakeLists.txt: cmake_minimum_required(VERSION 3.3) project(untitled19) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(LIBRARY_SRC library.cpp) add_library(libra SHARED ${LIBRARY_SRC}) set(SOURCE_FILES main.cpp) add_executable(untitled19 ${SOURCE_FILES}) target_link_libraries(untitled19 libra) This works and both library and executable are compiled. Unfortunately library seems to be linked into the executable: ?nm? command shows that the executable itself exports needed functions! I think there should be a solution for this, but I cannot find it. Can anyone help me? For more clarification: I?m using OS X El Capitan. ?? Best regards, Ivan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xavier.besseron at uni.lu Mon Mar 7 16:14:16 2016 From: xavier.besseron at uni.lu (Xavier Besseron) Date: Mon, 7 Mar 2016 22:14:16 +0100 Subject: [CMake] how to keep rpath from build to install In-Reply-To: <5446108e36fd4e7b8efdaf1c5ffb3f53@ARCHER.uni.lux> References: <5446108e36fd4e7b8efdaf1c5ffb3f53@ARCHER.uni.lux> Message-ID: Hi Srinath, I guess you will find what you need here: https://cmake.org/Wiki/CMake_RPATH_handling Best regards, Xavier On Mon, Mar 7, 2016 at 4:35 PM, Srinath Vadlamani < srinath.vadlamani at gmail.com> wrote: > Hello All, > How do I keep the rpath used during the build of an executable the same > when I install that executable using INSTALL(TARGETS ....)? > > I do set : > > SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) > > ================================= > Srinath Vadlamani > ================================= > -- Dr Xavier BESSERON Research associate FSTC, University of Luxembourg Campus Kirchberg, Office E-007 Phone: +352 46 66 44 5418 http://luxdem.uni.lu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From xavier.besseron at uni.lu Mon Mar 7 16:28:03 2016 From: xavier.besseron at uni.lu (Xavier Besseron) Date: Mon, 7 Mar 2016 22:28:03 +0100 Subject: [CMake] Support OpenBLAS in FindBLAS module In-Reply-To: <44aba72dfd67442a9f9dd5f283ce76ab@REED.uni.lux> References: <44aba72dfd67442a9f9dd5f283ce76ab@REED.uni.lux> Message-ID: Hi all, Is there any update on this issue? I believe this addition would be really useful. Best regards, Xavier On Sat, Nov 29, 2014 at 4:12 AM, Rob Zumwalt wrote: > Apologies for the new thread, I just subscribed in order to comment on > this, and didnt know how to reply in the existing thread. > > I am grateful to Xianyi for his addition of OpenBlasConfig.cmake, and I > do recognize that this is the direction that projects should go when > wanting to build CMake support for their users. The issue, as cgorac points > out, is that other projects (LAPACK in this case) use FindBLAS.cmake inside > their FindLAPACK.cmake files. So, in order to get FindLAPACK.cmake to work > with OpenBLAS, it would require that the developers that maintain > FindLAPACK.cmake change that file. The same would have to happen for any > other projects that use FindBLAS.cmake. > > In short, CMake already has a ?blessed? set of BLAS implementations (MKL, > Intel, Goto, etc.), and it would be easier for users of LAPACK (and users > of projects that use BLAS), if OpenBLAS were included in this set of CMake > ?blessed? BLAS implementations. Of course, OpenBLAS would still be happy to > provide OpenBlasConfig.cmake (I am guessing) for users of OpenBLAS directly. > > Best Regards, > Rob > -- Dr Xavier BESSERON Research associate FSTC, University of Luxembourg Campus Kirchberg, Office E-007 Phone: +352 46 66 44 5418 http://luxdem.uni.lu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ewmailing at gmail.com Mon Mar 7 18:34:57 2016 From: ewmailing at gmail.com (Eric Wing) Date: Mon, 7 Mar 2016 15:34:57 -0800 Subject: [CMake] Best way to show/include CMake files in IDE Message-ID: I have a bunch of .cmake support files in my project that I have split off from CMakeLists.txt (using INCLUDE to combine them) to separate concerns. (Source files, application assets, script files, platform settings, codesigning, etc.) This works, but they don't show up in IDEs (Visual Studio, Xcode, etc). I realized it would be nice to see these files in the IDE and be able to edit them there. (I assume the CMake bootstrap will still just work.) What is the best way to include/show these files in the IDE (and won't break the Makefile or other non-IDE generators)? Thanks, Eric From DLRdave at aol.com Mon Mar 7 18:55:33 2016 From: DLRdave at aol.com (David Cole) Date: Mon, 7 Mar 2016 18:55:33 -0500 Subject: [CMake] Best way to show/include CMake files in IDE In-Reply-To: References: Message-ID: <3B1E1DA8-E73D-4B5C-AB1E-9FE1961A680F@aol.com> If you include those files in the source list for a library, executable, or custom target, they should show up in IDE projects, and they should be ignored by Makefile type projects. Have you tried that? David > On Mar 7, 2016, at 6:34 PM, Eric Wing wrote: > > I have a bunch of .cmake support files in my project that I have split > off from CMakeLists.txt (using INCLUDE to combine them) to separate > concerns. (Source files, application assets, script files, platform > settings, codesigning, etc.) > > This works, but they don't show up in IDEs (Visual Studio, Xcode, > etc). I realized it would be nice to see these files in the IDE and be > able to edit them there. (I assume the CMake bootstrap will still just > work.) > > What is the best way to include/show these files in the IDE (and won't > break the Makefile or other non-IDE generators)? > > Thanks, > Eric > -- > > 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 From ewmailing at gmail.com Mon Mar 7 19:47:29 2016 From: ewmailing at gmail.com (Eric Wing) Date: Mon, 7 Mar 2016 16:47:29 -0800 Subject: [CMake] Best way to show/include CMake files in IDE In-Reply-To: <3B1E1DA8-E73D-4B5C-AB1E-9FE1961A680F@aol.com> References: <3B1E1DA8-E73D-4B5C-AB1E-9FE1961A680F@aol.com> Message-ID: On 3/7/16, David Cole wrote: > If you include those files in the source list for a library, executable, or > custom target, they should show up in IDE projects, and they should be > ignored by Makefile type projects. Have you tried that? > > > David > I haven't tried it yet since I was wondering what the best approach was :) Since some of my files are somewhat project oriented instead of target oriented, I wasn't sure if putting them the library/executable targets was best. But if it is, I'll try that. Thanks, Eric From ewmailing at gmail.com Mon Mar 7 22:19:19 2016 From: ewmailing at gmail.com (Eric Wing) Date: Mon, 7 Mar 2016 19:19:19 -0800 Subject: [CMake] Best way to show/include CMake files in IDE In-Reply-To: References: <3B1E1DA8-E73D-4B5C-AB1E-9FE1961A680F@aol.com> Message-ID: On 3/7/16, Eric Wing wrote: > On 3/7/16, David Cole wrote: >> If you include those files in the source list for a library, executable, >> or >> custom target, they should show up in IDE projects, and they should be >> ignored by Makefile type projects. Have you tried that? >> >> >> David >> > > I haven't tried it yet since I was wondering what the best approach was :) > Since some of my files are somewhat project oriented instead of target > oriented, I wasn't sure if putting them the library/executable targets > was best. But if it is, I'll try that. > > Thanks, > Eric > Well, I gave it a try. So far, it looks good. Thanks, Eric From osama94 at gmail.com Tue Mar 8 00:17:39 2016 From: osama94 at gmail.com (Muhammad Osama) Date: Mon, 7 Mar 2016 21:17:39 -0800 Subject: [CMake] Fwd: Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: Message-ID: Hi, I am new to cmake and really hope am doing this correctly. I asked stackoverflow but didn't get a good enough answer for my specific problem here; If I want root/sub-directories/ as separate sub-projects that can be compiled using the individualCMakeLists.txts in their folders I find myself literally copy pasting almost the entire root file CMakeLists.txt per sub-directory. I was wondering if there is a better way to have a main project and then sub-projects that get the shared dependencies from main project and can be compiled without cmake-ing the root CMakeLists.txt. My directory structure is; CMakeLists.txt (root project) | __ sub_dir-1 | __ | __ CMakeLists.txt (sub-project) | __ sub_dir-2 | __ | __ CMakeLists.txt (sub-project) | __ sub_dir-3 | __ | __ CMakeLists.txt (sub-project) ... Essentially, I want to be able to: 1. ? ? cmake root/CMakeLists.txt, which creates an entire project that includes the sub-projects (I already have this implemented using individual CMakeLists.txts inside sub-directories. 2. ? ? cmake root/sub-dir/CMakeLists.txt and only compile the sub-project, which essentially also finds the necessary dependencies and includes them from maybe .cmake includes or root/CMakeLists.txt. What is the best way to approach this structure; while retaining the first bullet point of having the ability to compile it as an entire project. And also not crowding the sub-dir/CMakeLists.txt too much with redundant code? Appreciate any suggestions! Thank you. -- Muhammad Osama -------------- next part -------------- An HTML attachment was scrubbed... URL: From apaku at gmx.de Tue Mar 8 01:47:07 2016 From: apaku at gmx.de (Andreas Pakulat) Date: Tue, 8 Mar 2016 07:47:07 +0100 Subject: [CMake] Compile shared library and call it's functions In-Reply-To: References: Message-ID: Hi, On Mon, Mar 7, 2016 at 9:29 PM, Ivan wrote: > Hello! > > Here is my CMakeLists.txt: > > cmake_minimum_required(VERSION 3.3) > project(untitled19) > > set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") > > set(LIBRARY_SRC library.cpp) > > add_library(libra SHARED ${LIBRARY_SRC}) > > set(SOURCE_FILES main.cpp) > add_executable(untitled19 ${SOURCE_FILES}) > target_link_libraries(untitled19 libra) > > > This works and both library and executable are compiled. Unfortunately library seems to be linked into the executable: ?nm? command shows that the executable itself exports needed functions! > > I do not think your interpreting the nm output correctly, but its hard to say without seeing it ;) Note that nm will show the functions exported by the library in the output for the executable, because the executable uses those functions. It will also indicate however that these functions are not defined inside the executable in the corresponding column with an upper-case U. When you run nm on the library itself you will notice that the same symbols have a different type in the corresponding column. In addition you can verify that the executable actually links against the library using the otool commandline tool: otool -L executable. Andreas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hegewald at awi.de Tue Mar 8 05:02:36 2016 From: jan.hegewald at awi.de (=?utf-8?Q?=F0=9F=90=8B_Jan_Hegewald?=) Date: Tue, 8 Mar 2016 11:02:36 +0100 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: Message-ID: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Hi Muhammad, > On 08.03.2016, at 06:17, Muhammad Osama wrote: > > Hi, I am new to cmake and really hope am doing this correctly. I asked stackoverflow but didn't get a good enough answer for my specific problem here; > > If I want root/sub-directories/ as separate sub-projects that can be compiled using the individualCMakeLists.txts in their folders I find myself literally copy pasting almost the entire root file CMakeLists.txt per sub-directory. > > I was wondering if there is a better way to have a main project and then sub-projects that get the shared dependencies from main project and can be compiled without cmake-ing the root CMakeLists.txt. My directory structure is; > > CMakeLists.txt (root project) > | __ sub_dir-1 > | __ | __ CMakeLists.txt (sub-project) > | __ sub_dir-2 > | __ | __ CMakeLists.txt (sub-project) > | __ sub_dir-3 > | __ | __ CMakeLists.txt (sub-project) I basically have the same project structure as you describe. I am also not sure what the best practice is here, but this is what I currently do: I set all dependencies where they are required: right in the local CMakeLists.txt, i.e. sub_dir-1/CMakeLists.txt. Then "export" all required include/define/compiler flags dependencies via INTERFACE or PUBLIC flags of the various target_*** cmake functions, as appropriate. The sub-projects are added via add_subdirectory in cmake. This way I can build each CMakeLists.txt individually if needed but still have everything DRYish. HTH, Jan From marc.chevrier at sap.com Tue Mar 8 06:20:51 2016 From: marc.chevrier at sap.com (CHEVRIER, Marc) Date: Tue, 8 Mar 2016 11:20:51 +0000 Subject: [CMake] CTest usage Message-ID: Hi, Is there someone able to help me regarding ctest usage with labels? Here is the problem: I have various tests which have labels attached to them: set_property (TEST test1 PROPERTY LABELS LABEL1) set_property (TEST test2 PROPERTY LABELS LABEL1 LABEL2) set_property (TEST test3 PROPERTY LABELS LABEL2) Now, I want to be able to select tests which have labels LABEL1 AND LABEL2 attached to them. Unfortunately, the command ctest ?L LABEL1 ?L LABEL2 will select all the tests rather than on the test test2 (a OR is applied on the various ?L options). Is there a way to get a AND on the labels specified? Marc -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.boettcher at posteo.de Tue Mar 8 07:03:18 2016 From: patrick.boettcher at posteo.de (Patrick Boettcher) Date: Tue, 8 Mar 2016 13:03:18 +0100 Subject: [CMake] cross-compilation: add dependency to all linked targets Message-ID: <20160308130318.534bb26e@posteo.de> Hi list, I'm building applications for an bare-metal sytem. There are no standard libraries. In my toolchain-file I specify set(CMAKE_SYSTEM_NAME "Generic") and I'm telling gcc to not include std-libraries with -nostdlib . In my toolchain-file I changed CMAKE_EXE_LINKER_FLAGS in order to link with my LdScript and to add basic stuff during link. A crt0 for my platform myself and other stuff in the future. Is there a way to add a dependency to (existing) files in a generic manner so that all executable- and library-targets are getting a link-dependency? Like a system-library-template-variable to fill in. Thanks in advance for any help. best regards, -- Patrick. From jsvanbethlehem at gmail.com Tue Mar 8 10:23:20 2016 From: jsvanbethlehem at gmail.com (Jakob van Bethlehem) Date: Tue, 8 Mar 2016 16:23:20 +0100 Subject: [CMake] Compile shared library and call it's functions In-Reply-To: References: Message-ID: Hej, A short side-question - you mentioned you are compiling a DLL, yet you mention also you are on OSX. I'd expect a .dylib on OSX? Anywaysz, I think Andreas already answered your question quite clearly: you probably misinterpret the output of nm, since your CMakeLists.txt file looks exactly as it should. Sincerely, Jakob On Mon, Mar 7, 2016 at 9:29 PM, Ivan wrote: > Hello! > I hope someone could finally help me. I spent about two days to find > solution for my problem, but with no luck. > > Here is my problem: > > I want to create a shared library (dll on Windows, .so on Linux, .dylib on > OS X) that contains some functions. This library should export only these > functions and nothing else. I guarantee that these function are pure C > functions, so no C++ STL is needed to call them. > > Then I want to create an application that call functions from the shared > library mentioned above. I mean that the application should not have these > functions inside. I want OS linker to link the application with the library > at runtime, when it initializes the application. I know, how to do this on > Windows with Visual Studio: create DLL project, write functions and > compile, then there will be two files: .dll and .lib, link the .lib file > with the application and at runtime Windows will find the .dll. But how can > I do so with CMake? > > Here is my CMakeLists.txt: > > cmake_minimum_required(VERSION 3.3) > project(untitled19) > > set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") > > set(LIBRARY_SRC library.cpp) > > add_library(libra SHARED ${LIBRARY_SRC}) > > set(SOURCE_FILES main.cpp) > add_executable(untitled19 ${SOURCE_FILES}) > target_link_libraries(untitled19 libra) > > > This works and both library and executable are compiled. Unfortunately library seems to be linked into the executable: ?nm? command shows that the executable itself exports needed functions! > > I think there should be a solution for this, but I cannot find it. Can anyone help me? > > For more clarification: I?m using OS X El Capitan. > > ?? > > Best regards, Ivan. > > > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsvanbethlehem at gmail.com Tue Mar 8 10:34:11 2016 From: jsvanbethlehem at gmail.com (Jakob van Bethlehem) Date: Tue, 8 Mar 2016 16:34:11 +0100 Subject: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS In-Reply-To: <6841933.oyp1NgLfeI@kongar> References: <6841933.oyp1NgLfeI@kongar> Message-ID: Hej Alexander, Yes, you're missing a subtle detail. You assume that the 'REQUIRED' keyword reflects the fact that COMPONENTS are required. This is not the case. The REQUIRED keyword reflects that the entire package Qt4 is required, see https://cmake.org/cmake/help/v3.0/command/find_package.html where it says: 'The REQUIRED option stops processing with an error message if the package cannot be found' Confusing, I agree. Sincerely, Jakob On Fri, Mar 4, 2016 at 9:18 AM, Alexander Stein < alexander.stein+cmake at mailbox.org> wrote: > Hi, > > I want to use some required Qt component while others are optional. > Apparently if you specify REQUIRED in find_package OPTIONAL_COMPONENTS is > ignored. > Here is a minimal CMakeLists.txt: > project(test) > cmake_minimum_required(VERSION 3.5) > > find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui OPTIONAL_COMPONENTS > Invalid) > > /home/alex/repo/cmake/build/bin/cmake --version > cmake version 3.5.20160303-gf37f > > cmake fails with: > CMake Error at > /home/alex/repo/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 > (message): > Could NOT find Qt4 (missing: QT_INVALID_INCLUDE_DIR QT_INVALID_LIBRARY) > (found version "4.8.7") > Call Stack (most recent call first): > /home/alex/repo/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 > (_FPHSA_FAILURE_MESSAGE) > /home/alex/repo/cmake/Modules/FindQt4.cmake:1333 > (FIND_PACKAGE_HANDLE_STANDARD_ARGS) > CMakeLists.txt:4 (find_package) > > I expected that if required components are missing cmake bails out while > continuing when OPTIONAL_COMPONENTS are missing. My current workaround is: > find_package(Qt4 OPTIONAL_COMPONENTS Invalid) > find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui) > > But I would rather use a single line. Am I missing something here? > > Best regards, > Alexander > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas11braden at gmail.com Tue Mar 8 11:00:00 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Tue, 8 Mar 2016 10:00:00 -0600 Subject: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS In-Reply-To: References: <6841933.oyp1NgLfeI@kongar> Message-ID: Jakob, I don't think there is any confusion about what REQUIRED means. Whether or not REQUIRED is provided, the list of OPTIONAL_COMPONENTS should not be required under any circumstances. The example error message seems pretty clear to me that the expected behavior and actual behavior are different. I went and looked at the source code of the find module: https://github.com/Kitware/CMake/blob/master/Modules/FindQt4.cmake It seems that there is no check whatsoever for Qt4_FIND_REQUIRED_, so the find module just blindly assumes that all components are required. More info: https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#find-modules To me this seems like a bug in the find module. On Tue, Mar 8, 2016 at 9:34 AM, Jakob van Bethlehem wrote: > Hej Alexander, > > Yes, you're missing a subtle detail. You assume that the 'REQUIRED' keyword > reflects the fact that COMPONENTS are required. This is not the case. The > REQUIRED keyword reflects that the entire package Qt4 is required, see > https://cmake.org/cmake/help/v3.0/command/find_package.html where it says: > 'The REQUIRED option stops processing with an error message if the package > cannot be found' > > Confusing, I agree. > > Sincerely, > Jakob > > On Fri, Mar 4, 2016 at 9:18 AM, Alexander Stein > wrote: >> >> Hi, >> >> I want to use some required Qt component while others are optional. >> Apparently if you specify REQUIRED in find_package OPTIONAL_COMPONENTS is >> ignored. >> Here is a minimal CMakeLists.txt: >> project(test) >> cmake_minimum_required(VERSION 3.5) >> >> find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui OPTIONAL_COMPONENTS >> Invalid) >> >> /home/alex/repo/cmake/build/bin/cmake --version >> cmake version 3.5.20160303-gf37f >> >> cmake fails with: >> CMake Error at >> /home/alex/repo/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 >> (message): >> Could NOT find Qt4 (missing: QT_INVALID_INCLUDE_DIR QT_INVALID_LIBRARY) >> (found version "4.8.7") >> Call Stack (most recent call first): >> /home/alex/repo/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 >> (_FPHSA_FAILURE_MESSAGE) >> /home/alex/repo/cmake/Modules/FindQt4.cmake:1333 >> (FIND_PACKAGE_HANDLE_STANDARD_ARGS) >> CMakeLists.txt:4 (find_package) >> >> I expected that if required components are missing cmake bails out while >> continuing when OPTIONAL_COMPONENTS are missing. My current workaround is: >> find_package(Qt4 OPTIONAL_COMPONENTS Invalid) >> find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui) >> >> But I would rather use a single line. Am I missing something here? >> >> Best regards, >> Alexander >> >> -- >> >> 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 From jsvanbethlehem at gmail.com Tue Mar 8 11:03:52 2016 From: jsvanbethlehem at gmail.com (Jakob van Bethlehem) Date: Tue, 8 Mar 2016 17:03:52 +0100 Subject: [CMake] Some Visual Studio/CMake questions Message-ID: Dear users, Since about a year I work on a project that uses CMake in combination with Visual Studio. This works kind of oke, but over time some questions have emerged. Hopefully I can get an answer on this list: * Our build infrastructure creates a Release and a Debug configuration by setting the CMAKE_CONFIGURATION_TYPES variable. However, when switching between these configurations, Visual Studio almost kills itself, and becomes unresponding for quite some time. Is this a known issue with Visual Studio and CMake-generated solutions? Or is there something we can do to improve this? * The generated solution file makes sure that CMake is ran again if any change in one of the CMakeLists.txt file is detected. What we typically see however, is that afterwards Visual Studio recompiles loads of files that were not changed, and that were already compiled before. It seems that the CMake run someone makes Visual Studio believe that all, or at least way too many, files are out of date and need to be recompiled. We make use of a Visual Studio plugin that provides a bunch of smart functions, which scans the files in the solution in order to do its job. This plugin has the same behaviour, so it seems like CMake is the common denominator causing behaviour one wouldn't expect or want. Same question: known issue, or something we can improve somehow? * Over time I have seen a view times that it was mentioned that it is possible to call the 'project()' function multiple times, and that this will produce separate Visual Studio solution files. Interestingly, this is documented absolutely nowhere. As a matter of fact, the documentation of the 'project()' function clearly states that you should call that function only once, and exactly once. What about it? Is this some undocumented feature we can rely on? Or is this a serious bug, that many people incidentally have come to rely upon. If this is considered a feature, will this feature remain working for the foreseeable future? If yes is the answer to these questions, what *exactly* does this feature contain, so where *can* I get documentation? My main question is whether it is possible to create dependencies between projects, i.e. solution files, and will CMake generate calls to msbuild that will automatically take care that dependencies between solution files are handled properly? Hopefully someone can help me out a bit here! Sincerely, Jakob van Bethlehem -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas11braden at gmail.com Tue Mar 8 11:13:57 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Tue, 8 Mar 2016 10:13:57 -0600 Subject: [CMake] Some Visual Studio/CMake questions In-Reply-To: References: Message-ID: IIRC, the project() command can be called once per directory. So you can have each directory be a separate project via add_subdirectory(). I just tried it out and it seems to create a solution (*.sln) for each project(). I can't answer the other questions, sorry. On Tue, Mar 8, 2016 at 10:03 AM, Jakob van Bethlehem wrote: > Dear users, > > Since about a year I work on a project that uses CMake in combination with > Visual Studio. This works kind of oke, but over time some questions have > emerged. Hopefully I can get an answer on this list: > > * Our build infrastructure creates a Release and a Debug configuration by > setting the CMAKE_CONFIGURATION_TYPES variable. However, when switching > between these configurations, Visual Studio almost kills itself, and becomes > unresponding for quite some time. Is this a known issue with Visual Studio > and CMake-generated solutions? Or is there something we can do to improve > this? > > * The generated solution file makes sure that CMake is ran again if any > change in one of the CMakeLists.txt file is detected. What we typically see > however, is that afterwards Visual Studio recompiles loads of files that > were not changed, and that were already compiled before. It seems that the > CMake run someone makes Visual Studio believe that all, or at least way too > many, files are out of date and need to be recompiled. We make use of a > Visual Studio plugin that provides a bunch of smart functions, which scans > the files in the solution in order to do its job. This plugin has the same > behaviour, so it seems like CMake is the common denominator causing > behaviour one wouldn't expect or want. > Same question: known issue, or something we can improve somehow? > > * Over time I have seen a view times that it was mentioned that it is > possible to call the 'project()' function multiple times, and that this will > produce separate Visual Studio solution files. Interestingly, this is > documented absolutely nowhere. As a matter of fact, the documentation of the > 'project()' function clearly states that you should call that function only > once, and exactly once. > > What about it? Is this some undocumented feature we can rely on? Or is this > a serious bug, that many people incidentally have come to rely upon. If this > is considered a feature, will this feature remain working for the > foreseeable future? If yes is the answer to these questions, what *exactly* > does this feature contain, so where *can* I get documentation? My main > question is whether it is possible to create dependencies between projects, > i.e. solution files, and will CMake generate calls to msbuild that will > automatically take care that dependencies between solution files are handled > properly? > > Hopefully someone can help me out a bit here! > > Sincerely, > Jakob van Bethlehem > > -- > > 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 From MillerHenry at JohnDeere.com Tue Mar 8 11:10:17 2016 From: MillerHenry at JohnDeere.com (Miller Henry) Date: Tue, 8 Mar 2016 16:10:17 +0000 Subject: [CMake] CTest usage In-Reply-To: References: Message-ID: <35F6921410093E4CA40D524BD5C18D4C30DD4DC3@EDXMB89.jdnet.deere.com> I hate to state the obvious, but set_property (TEST test2 PROPERTY LABELS LABEL1 LABEL2 LABEL1andLABEL2) I know it isn?t what you asked for, but I don?t want cmake to change, but I don?t think it is worthwhile to add more complex set algebra to the -L command so that we can support complex things. On a more philosophical level, I generally find that if I want to run the intersection of tests like this, there is a LABEL3 to more accurately describes why I want to run that set, and having a label to remind me of it is helpful in the future. From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of CHEVRIER, Marc Sent: Tuesday, March 08, 2016 5:21 AM To: cmake at cmake.org Subject: [CMake] CTest usage Hi, Is there someone able to help me regarding ctest usage with labels? Here is the problem: I have various tests which have labels attached to them: set_property (TEST test1 PROPERTY LABELS LABEL1) set_property (TEST test2 PROPERTY LABELS LABEL1 LABEL2) set_property (TEST test3 PROPERTY LABELS LABEL2) Now, I want to be able to select tests which have labels LABEL1 AND LABEL2 attached to them. Unfortunately, the command ctest ?L LABEL1 ?L LABEL2 will select all the tests rather than on the test test2 (a OR is applied on the various ?L options). Is there a way to get a AND on the labels specified? Marc -------------- next part -------------- An HTML attachment was scrubbed... URL: From osama94 at gmail.com Tue Mar 8 13:12:12 2016 From: osama94 at gmail.com (Muhammad Osama) Date: Tue, 8 Mar 2016 10:12:12 -0800 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> References: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Message-ID: Hi Jan, Thank you for your reply, I am in the similar situation, have a very similar implementation using *target_*** *but since I don't do that for ALL the dependencies, I am unable to cmake or compile individual projects in the sub directories. So, few questions; 1. This still requires me to run cmake on the root CMakeLists.txt to set the flags and what not before I run the sub project to make it correct? 1a. If so, how can I make the CMakeLists.txts in the sub directories independent of the root one if I want to just compile the sub-project and not cmake the whole thing? 2. Another question is that your implementation, does it not include a config file? In theory you're copy pasting most of the dependencies in the CMakeLists.txt of root into the sub-dir ones? Is there a better way to do this? Thank you! On Tue, Mar 8, 2016 at 2:02 AM, ? Jan Hegewald wrote: > Hi Muhammad, > > > On 08.03.2016, at 06:17, Muhammad Osama wrote: > > > > Hi, I am new to cmake and really hope am doing this correctly. I asked > stackoverflow but didn't get a good enough answer for my specific problem > here; > > > > If I want root/sub-directories/ as separate sub-projects that can be > compiled using the individualCMakeLists.txts in their folders I find myself > literally copy pasting almost the entire root file CMakeLists.txt per > sub-directory. > > > > I was wondering if there is a better way to have a main project and then > sub-projects that get the shared dependencies from main project and can be > compiled without cmake-ing the root CMakeLists.txt. My directory structure > is; > > > > CMakeLists.txt (root project) > > | __ sub_dir-1 > > | __ | __ CMakeLists.txt (sub-project) > > | __ sub_dir-2 > > | __ | __ CMakeLists.txt (sub-project) > > | __ sub_dir-3 > > | __ | __ CMakeLists.txt (sub-project) > > I basically have the same project structure as you describe. I am also not > sure what the best practice is here, but this is what I currently do: > I set all dependencies where they are required: right in the local > CMakeLists.txt, i.e. sub_dir-1/CMakeLists.txt. Then "export" all required > include/define/compiler flags dependencies via INTERFACE or PUBLIC flags of > the various target_*** cmake functions, as appropriate. The sub-projects > are added via add_subdirectory in cmake. > This way I can build each CMakeLists.txt individually if needed but still > have everything DRYish. > > HTH, > Jan > > -- > > 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 > -- *Muhammad Osama* Graduate Student Department of Electrical and Computer Engineering University of California, Davis -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas11braden at gmail.com Tue Mar 8 13:38:12 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Tue, 8 Mar 2016 12:38:12 -0600 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Message-ID: Have you looked into ExternalProject_Add? It allows just using a local path instead of downloading a remote repository: https://cmake.org/cmake/help/latest/module/ExternalProject.html On Tue, Mar 8, 2016 at 12:12 PM, Muhammad Osama wrote: > Hi Jan, > > Thank you for your reply, I am in the similar situation, have a very > similar implementation using *target_*** *but since I don't do that for > ALL the dependencies, I am unable to cmake or compile individual projects > in the sub directories. So, few questions; > > 1. This still requires me to run cmake on the root CMakeLists.txt to set > the flags and what not before I run the sub project to make it correct? > 1a. If so, how can I make the CMakeLists.txts in the sub directories > independent of the root one if I want to just compile the sub-project and > not cmake the whole thing? > 2. Another question is that your implementation, does it not include a > config file? In theory you're copy pasting most of the dependencies in the > CMakeLists.txt of root into the sub-dir ones? Is there a better way to do > this? > > Thank you! > > On Tue, Mar 8, 2016 at 2:02 AM, ? Jan Hegewald > wrote: > >> Hi Muhammad, >> >> > On 08.03.2016, at 06:17, Muhammad Osama wrote: >> > >> > Hi, I am new to cmake and really hope am doing this correctly. I asked >> stackoverflow but didn't get a good enough answer for my specific problem >> here; >> > >> > If I want root/sub-directories/ as separate sub-projects that can be >> compiled using the individualCMakeLists.txts in their folders I find myself >> literally copy pasting almost the entire root file CMakeLists.txt per >> sub-directory. >> > >> > I was wondering if there is a better way to have a main project and >> then sub-projects that get the shared dependencies from main project and >> can be compiled without cmake-ing the root CMakeLists.txt. My directory >> structure is; >> > >> > CMakeLists.txt (root project) >> > | __ sub_dir-1 >> > | __ | __ CMakeLists.txt (sub-project) >> > | __ sub_dir-2 >> > | __ | __ CMakeLists.txt (sub-project) >> > | __ sub_dir-3 >> > | __ | __ CMakeLists.txt (sub-project) >> >> I basically have the same project structure as you describe. I am also >> not sure what the best practice is here, but this is what I currently do: >> I set all dependencies where they are required: right in the local >> CMakeLists.txt, i.e. sub_dir-1/CMakeLists.txt. Then "export" all required >> include/define/compiler flags dependencies via INTERFACE or PUBLIC flags of >> the various target_*** cmake functions, as appropriate. The sub-projects >> are added via add_subdirectory in cmake. >> This way I can build each CMakeLists.txt individually if needed but still >> have everything DRYish. >> >> HTH, >> Jan >> >> -- >> >> 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 >> > > > > -- > *Muhammad Osama* > Graduate Student > Department of Electrical and Computer Engineering > University of California, Davis > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.maynard at kitware.com Tue Mar 8 13:54:29 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 8 Mar 2016 13:54:29 -0500 Subject: [CMake] [ANNOUNCE] CMake 3.5.0 available for download Message-ID: I am proud to announce that CMake 3.5.0 is now available for download at: https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.5 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.5/release/3.5.html Some of the more significant features of CMake 3.5 are: * The precompiled Windows binary provided on "cmake.org" is now a ".msi" package instead of an installer executable. One may need to manually uninstall CMake versions lower than 3.5 before installing the new package. * The "cmake-gui(1)" learned an option to set the toolset to be used with VS IDE and Xcode generators, much like the existing "-T" option to "cmake(1)". * Find modules for Boost, FLEX, GTest, GTK2, PNG, TIFF, and XercesC now provide imported targets. * The "FindOpenMP" module learned to support Clang. * A new platform file for cross-compiling in the Cray Linux Environment to target compute nodes was added. See Cross Compiling for the Cray Linux Environment for usage details. * The "Compile Features" functionality is now aware of features supported by Clang compilers on Windows (MinGW). * Support was added for the ARM Compiler (arm.com) with compiler id "ARMCC". * When building for embedded Apple platforms like iOS CMake learned to build and install combined targets which contain both a device and a simulator build. This behavior can be enabled by setting the "IOS_INSTALL_COMBINED" target property. * The "CPackDMG" module learned new variable to specify AppleScript file run to customize appearance of "DragNDrop" installer folder, including background image setting using supplied PNG or multi- resolution TIFF file. See the "CPACK_DMG_DS_STORE_SETUP_SCRIPT" and "CPACK_DMG_BACKGROUND_IMAGE" variables. Deprecated and Removed Features: * The "cmake(1)" "-E time" command now properly passes arguments with spaces or special characters through to the child process. This may break scripts that worked around the bug with their own extra quoting or escaping. * The "Xcode" generator was fixed to escape backslashes in strings consistently with other generators. Projects that previously worked around the inconsistecy with an extra level of backslashes conditioned on the Xcode generator must be updated to remove the workaround for CMake 3.5 and greater. CMake 3.5 Release Notes *********************** Changes made since CMake 3.4 include the following. New Features ============ GUI --- * The "cmake-gui(1)" gained options to control warnings about deprecated functionality. * The "cmake-gui(1)" learned an option to set the toolset to be used with VS IDE and Xcode generators, much like the existing "-T" option to "cmake(1)". * The "cmake-gui(1)" gained a Regular Expression Explorer which may be used to create and evaluate regular expressions in real-time. The explorer window is available via the "Tools" menu. Command-Line ------------ * The "-Wdev" and "-Wno-dev" "cmake(1)" options now also enable and suppress the deprecated warnings output by default. * The suppression of developer warnings as errors can now be controlled with the new "-Werror=dev" and "-Wno-error=dev" "cmake(1)" options. * The "cmake(1)" "-E" command-line tools "copy", "copy_if_different", "copy_directory", and "make_directory" learned to support multiple input files or directories. Commands -------- * The "cmake_parse_arguments()" command is now implemented natively. The "CMakeParseArguments" module remains as an empty placeholder for compatibility. * The "install(DIRECTORY)" command learned to support "generator expressions" in the list of directories. Variables --------- * The "CMAKE_ERROR_DEPRECATED" variable can now be set using the "-Werror=deprecated" and "-Wno-error=deprecated" "cmake(1)" options. * The "CMAKE_WARN_DEPRECATED" variable can now be set using the "-Wdeprecated" and "-Wno-deprecated" "cmake(1)" options. Properties ---------- * The "VS_GLOBAL_" target property is now implemented for VS 2010 and above. Previously it worked only in VS 2008 and below. Modules ------- * The "ExternalProject" module learned a new "GIT_REMOTE_NAME" option to control the "git clone --origin" value. * The "FindBoost" module now provides imported targets such as "Boost::boost" and "Boost::filesystem". * The "FindFLEX" module "FLEX_TARGET" macro learned a new "DEFINES_FILE" option to specify a custom output header to be generated. * The "FindGTest" module now provides imported targets. * The "FindGTK2" module, when "GTK2_USE_IMPORTED_TARGETS" is enabled, now sets "GTK2_LIBRARIES" to contain the list of imported targets instead of the paths to the libraries. Moreover it now sets a new "GTK2_TARGETS" variable containing all the targets imported. * The "FindOpenMP" module learned to support Clang. * The "FindOpenSSL" module gained a new "OPENSSL_MSVC_STATIC_RT" option to search for libraries using the MSVC static runtime. * The "FindPNG" module now provides imported targets. * The "FindTIFF" module now provides imported targets. * A "FindXalanC" module was introduced to find the Apache Xalan-C++ XSL transform processing library. * The "FindXercesC" module now provides imported targets. Platforms --------- * Support was added for the ARM Compiler (arm.com) with compiler id "ARMCC". * A new platform file for cross-compiling in the Cray Linux Environment to target compute nodes was added. See Cross Compiling for the Cray Linux Environment for usage details. * The "Compile Features" functionality is now aware of features supported by Clang compilers on Windows (MinGW). * When building for embedded Apple platforms like iOS CMake learned to build and install combined targets which contain both a device and a simulator build. This behavior can be enabled by setting the "IOS_INSTALL_COMBINED" target property. CPack ----- * The "CPackDMG" module learned new variable to specify AppleScript file run to customize appearance of "DragNDrop" installer folder, including background image setting using supplied PNG or multi- resolution TIFF file. See the "CPACK_DMG_DS_STORE_SETUP_SCRIPT" and "CPACK_DMG_BACKGROUND_IMAGE" variables. * The "CPackDeb" module learned to set the optional config file "Source" field using a monolithic or per-component variable. See "CPACK_DEBIAN_PACKAGE_SOURCE". * The "CPackDeb" module learned to set Package, Section and Priority control fields per-component. See variables "CPACK_DEBIAN__PACKAGE_SECTION" and "CPACK_DEBIAN__PACKAGE_PRIORITY". * The "CPack DragNDrop generator" learned to add multi-lingual SLAs to a DMG which is presented to the user when they try to mount the DMG. See the "CPACK_DMG_SLA_LANGUAGES" and "CPACK_DMG_SLA_DIR" variables for details. * The "CPackNSIS" module learned new variables to add bitmaps to the installer. See the "CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP" and "CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP" variables. * The "CPackRPM" module learned to set Name and Group control fields per-component. See "CPACK_RPM__PACKAGE_NAME" and "CPACK_RPM__PACKAGE_GROUP". Other ----- * Warnings about deprecated functionality are now enabled by default. They may be suppressed with "-Wno-deprecated" or by setting the "CMAKE_WARN_DEPRECATED" variable to false. Deprecated and Removed Features =============================== * The "cmake(1)" "-E time" command now properly passes arguments with spaces or special characters through to the child process. This may break scripts that worked around the bug with their own extra quoting or escaping. * The "Xcode" generator was fixed to escape backslashes in strings consistently with other generators. Projects that previously worked around the inconsistecy with an extra level of backslashes conditioned on the Xcode generator must be updated to remove the workaround for CMake 3.5 and greater. Other Changes ============= * The "Visual Studio 14 2015" generator learned to map the "/debug:fastlink" linker flag to the ".vcxproj" file property. * The "FindGTK2" module now configures the "GTK2::sigc++" imported target to enable c++11 on its dependents when using sigc++ 2.5.1 or higher. * The precompiled Windows binary provided on "cmake.org" is now a ".msi" package instead of an installer executable. One may need to manually uninstall CMake versions lower than 3.5 before installing the new package. -------------------------------------------------------------------- Changes made since CMake 3.5.0-rc3: Ashley Whetter (1): Help: Fix typos in cmake-packages.7 manual Bartosz Kosiorek (1): Help: Clarify `cmake -E` command behavior with respect to file existence Brad King (3): VS: Fix VS 2015 .vcxproj debug setting for older toolsets (#15986) FindPython{Interp,Libs}: Clarify recommended call order CMake 3.5.0 From daviddoria at gmail.com Tue Mar 8 14:25:21 2016 From: daviddoria at gmail.com (David Doria) Date: Tue, 8 Mar 2016 13:25:21 -0600 Subject: [CMake] Best way to show/include CMake files in IDE In-Reply-To: References: <3B1E1DA8-E73D-4B5C-AB1E-9FE1961A680F@aol.com> Message-ID: On Mon, Mar 7, 2016 at 9:19 PM, Eric Wing wrote: > On 3/7/16, Eric Wing wrote: > > On 3/7/16, David Cole wrote: > >> If you include those files in the source list for a library, executable, > >> or > >> custom target, they should show up in IDE projects, and they should be > >> ignored by Makefile type projects. Have you tried that? > >> > >> > >> David > >> > > > > I haven't tried it yet since I was wondering what the best approach was > :) > > Since some of my files are somewhat project oriented instead of target > > oriented, I wasn't sure if putting them the library/executable targets > > was best. But if it is, I'll try that. > > > > Thanks, > > Eric > > > > Well, I gave it a try. So far, it looks good. > > Thanks, > Eric > I usually do this to make my IDE aware of files: add_custom_target(MyProject_HDRS SOURCES MyHeader.h MyImplementation.hpp) It sounds like David says you can do the same for your .cmake files. This is pretty awkward though - it seems like there should be more of an explicit function for this, something like: add_files_to_IDE(MyHeader.h MyImplementation.hpp) This would make it much more clear what this line is for and would prevent forcing this "abuse" of the concept of a target for a very common use case. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.hoffman at kitware.com Tue Mar 8 14:28:44 2016 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Tue, 8 Mar 2016 14:28:44 -0500 Subject: [CMake] Best way to show/include CMake files in IDE In-Reply-To: References: <3B1E1DA8-E73D-4B5C-AB1E-9FE1961A680F@aol.com> Message-ID: <56DF27EC.2060704@kitware.com> On 3/8/2016 2:25 PM, David Doria wrote: > add_custom_target(MyProject_HDRS SOURCES MyHeader.h MyImplementation.hpp) > > It sounds like David says you can do the same for your .cmake files. > This is pretty awkward though - it seems like there should be more of an > explicit function for this, something like: > > add_files_to_IDE(MyHeader.h MyImplementation.hpp) > > This would make it much more clear what this line is for and would > prevent forcing this "abuse" of the concept of a target for a very > common use case. You just add them to the target and it should work. Platforms that don't need those files will ignore them and IDEs that want them will use them. -- Bill Hoffman Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 bill.hoffman at kitware.com http://www.kitware.com 518 881-4905 (Direct) 518 371-3971 x105 Fax (518) 371-4573 From xavier.besseron at uni.lu Tue Mar 8 14:29:33 2016 From: xavier.besseron at uni.lu (Xavier Besseron) Date: Tue, 8 Mar 2016 20:29:33 +0100 Subject: [CMake] how to keep rpath from build to install In-Reply-To: References: <5446108e36fd4e7b8efdaf1c5ffb3f53@ARCHER.uni.lux> Message-ID: Srinath, You should better ask the list than me. It would help if you describe precisely what you tried, and what result you get. Best regards, Xavier On Tue, Mar 8, 2016 at 4:31 PM, Srinath Vadlamani < srinath.vadlamani at gmail.com> wrote: > Hello Xavier, > I have implemented all of what is in the website and if I objdump -x * | > grep -i rpath on the executables in the install directory I get a null > result. > > Thanks, > <>Srinath > > ================================= > Srinath Vadlamani > ================================= > > On Mon, Mar 7, 2016 at 2:14 PM, Xavier Besseron > wrote: > >> Hi Srinath, >> >> I guess you will find what you need here: >> https://cmake.org/Wiki/CMake_RPATH_handling >> >> Best regards, >> >> Xavier >> >> >> On Mon, Mar 7, 2016 at 4:35 PM, Srinath Vadlamani < >> srinath.vadlamani at gmail.com> wrote: >> >>> Hello All, >>> How do I keep the rpath used during the build of an executable the >>> same when I install that executable using INSTALL(TARGETS ....)? >>> >>> I do set : >>> >>> SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) >>> >>> ================================= >>> Srinath Vadlamani >>> ================================= >>> >> >> >> >> -- >> Dr Xavier BESSERON >> Research associate >> FSTC, University of Luxembourg >> Campus Kirchberg, Office E-007 >> Phone: +352 46 66 44 5418 >> http://luxdem.uni.lu/ >> >> > -- Dr Xavier BESSERON Research associate FSTC, University of Luxembourg Campus Kirchberg, Office E-007 Phone: +352 46 66 44 5418 http://luxdem.uni.lu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From osama94 at gmail.com Tue Mar 8 20:02:11 2016 From: osama94 at gmail.com (Muhammad Osama) Date: Tue, 8 Mar 2016 17:02:11 -0800 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Message-ID: Thank you for your suggestion Nicholas, I have never used ExternalProject_Add before and can't find a related example to my project. Would you know an example that uses it? On Tue, Mar 8, 2016 at 10:38 AM, Nicholas Braden wrote: > Have you looked into ExternalProject_Add? It allows just using a local > path instead of downloading a remote repository: > > https://cmake.org/cmake/help/latest/module/ExternalProject.html > > On Tue, Mar 8, 2016 at 12:12 PM, Muhammad Osama wrote: > >> Hi Jan, >> >> Thank you for your reply, I am in the similar situation, have a very >> similar implementation using *target_*** *but since I don't do that for >> ALL the dependencies, I am unable to cmake or compile individual projects >> in the sub directories. So, few questions; >> >> 1. This still requires me to run cmake on the root CMakeLists.txt to set >> the flags and what not before I run the sub project to make it correct? >> 1a. If so, how can I make the CMakeLists.txts in the sub directories >> independent of the root one if I want to just compile the sub-project and >> not cmake the whole thing? >> 2. Another question is that your implementation, does it not include a >> config file? In theory you're copy pasting most of the dependencies in the >> CMakeLists.txt of root into the sub-dir ones? Is there a better way to do >> this? >> >> Thank you! >> >> On Tue, Mar 8, 2016 at 2:02 AM, ? Jan Hegewald >> wrote: >> >>> Hi Muhammad, >>> >>> > On 08.03.2016, at 06:17, Muhammad Osama wrote: >>> > >>> > Hi, I am new to cmake and really hope am doing this correctly. I asked >>> stackoverflow but didn't get a good enough answer for my specific problem >>> here; >>> > >>> > If I want root/sub-directories/ as separate sub-projects that can be >>> compiled using the individualCMakeLists.txts in their folders I find myself >>> literally copy pasting almost the entire root file CMakeLists.txt per >>> sub-directory. >>> > >>> > I was wondering if there is a better way to have a main project and >>> then sub-projects that get the shared dependencies from main project and >>> can be compiled without cmake-ing the root CMakeLists.txt. My directory >>> structure is; >>> > >>> > CMakeLists.txt (root project) >>> > | __ sub_dir-1 >>> > | __ | __ CMakeLists.txt (sub-project) >>> > | __ sub_dir-2 >>> > | __ | __ CMakeLists.txt (sub-project) >>> > | __ sub_dir-3 >>> > | __ | __ CMakeLists.txt (sub-project) >>> >>> I basically have the same project structure as you describe. I am also >>> not sure what the best practice is here, but this is what I currently do: >>> I set all dependencies where they are required: right in the local >>> CMakeLists.txt, i.e. sub_dir-1/CMakeLists.txt. Then "export" all required >>> include/define/compiler flags dependencies via INTERFACE or PUBLIC flags of >>> the various target_*** cmake functions, as appropriate. The sub-projects >>> are added via add_subdirectory in cmake. >>> This way I can build each CMakeLists.txt individually if needed but >>> still have everything DRYish. >>> >>> HTH, >>> Jan >>> >>> -- >>> >>> 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 >>> >> >> >> >> -- >> *Muhammad Osama* >> Graduate Student >> Department of Electrical and Computer Engineering >> University of California, Davis >> >> -- >> >> 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 >> > > -- *Muhammad Osama* Graduate Student Department of Electrical and Computer Engineering University of California, Davis -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas11braden at gmail.com Tue Mar 8 20:13:13 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Tue, 8 Mar 2016 19:13:13 -0600 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Message-ID: Example simple usages from my personal projects: https://github.com/LB--/events/blob/499ba78b923b40f77cc832b6a5d414240209ac96/CMakeLists.txt https://github.com/LB--/simple-platformer/blob/1bba3dd2d8ed1cdae74ce1b77c4ab99878fa59a6/CMakeLists.txt More complex usage in hunter: https://github.com/ruslo/hunter With ExternalProject you can have it either download from version control / source archive, or you can use a local existing folder. I think in your case you just need to point it to your existing project folders and forward the appropriate arguments. There is a lot of customizability to it (customizing each step, for example). If you want I could make an example exactly like your provided example directory structure, but I think both of my personal usages closely match what you are wanting to do. On Tue, Mar 8, 2016 at 7:02 PM, Muhammad Osama wrote: > Thank you for your suggestion Nicholas, I have never used > ExternalProject_Add before and can't find a related example to my project. > Would you know an example that uses it? > > On Tue, Mar 8, 2016 at 10:38 AM, Nicholas Braden < > nicholas11braden at gmail.com> wrote: > >> Have you looked into ExternalProject_Add? It allows just using a local >> path instead of downloading a remote repository: >> >> https://cmake.org/cmake/help/latest/module/ExternalProject.html >> >> On Tue, Mar 8, 2016 at 12:12 PM, Muhammad Osama >> wrote: >> >>> Hi Jan, >>> >>> Thank you for your reply, I am in the similar situation, have a very >>> similar implementation using *target_*** *but since I don't do that for >>> ALL the dependencies, I am unable to cmake or compile individual projects >>> in the sub directories. So, few questions; >>> >>> 1. This still requires me to run cmake on the root CMakeLists.txt to set >>> the flags and what not before I run the sub project to make it correct? >>> 1a. If so, how can I make the CMakeLists.txts in the sub directories >>> independent of the root one if I want to just compile the sub-project and >>> not cmake the whole thing? >>> 2. Another question is that your implementation, does it not include a >>> config file? In theory you're copy pasting most of the dependencies in the >>> CMakeLists.txt of root into the sub-dir ones? Is there a better way to do >>> this? >>> >>> Thank you! >>> >>> On Tue, Mar 8, 2016 at 2:02 AM, ? Jan Hegewald >>> wrote: >>> >>>> Hi Muhammad, >>>> >>>> > On 08.03.2016, at 06:17, Muhammad Osama wrote: >>>> > >>>> > Hi, I am new to cmake and really hope am doing this correctly. I >>>> asked stackoverflow but didn't get a good enough answer for my specific >>>> problem here; >>>> > >>>> > If I want root/sub-directories/ as separate sub-projects that can be >>>> compiled using the individualCMakeLists.txts in their folders I find myself >>>> literally copy pasting almost the entire root file CMakeLists.txt per >>>> sub-directory. >>>> > >>>> > I was wondering if there is a better way to have a main project and >>>> then sub-projects that get the shared dependencies from main project and >>>> can be compiled without cmake-ing the root CMakeLists.txt. My directory >>>> structure is; >>>> > >>>> > CMakeLists.txt (root project) >>>> > | __ sub_dir-1 >>>> > | __ | __ CMakeLists.txt (sub-project) >>>> > | __ sub_dir-2 >>>> > | __ | __ CMakeLists.txt (sub-project) >>>> > | __ sub_dir-3 >>>> > | __ | __ CMakeLists.txt (sub-project) >>>> >>>> I basically have the same project structure as you describe. I am also >>>> not sure what the best practice is here, but this is what I currently do: >>>> I set all dependencies where they are required: right in the local >>>> CMakeLists.txt, i.e. sub_dir-1/CMakeLists.txt. Then "export" all required >>>> include/define/compiler flags dependencies via INTERFACE or PUBLIC flags of >>>> the various target_*** cmake functions, as appropriate. The sub-projects >>>> are added via add_subdirectory in cmake. >>>> This way I can build each CMakeLists.txt individually if needed but >>>> still have everything DRYish. >>>> >>>> HTH, >>>> Jan >>>> >>>> -- >>>> >>>> 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 >>>> >>> >>> >>> >>> -- >>> *Muhammad Osama* >>> Graduate Student >>> Department of Electrical and Computer Engineering >>> University of California, Davis >>> >>> -- >>> >>> 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 >>> >> >> > > > -- > *Muhammad Osama* > Graduate Student > Department of Electrical and Computer Engineering > University of California, Davis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From osama94 at gmail.com Tue Mar 8 20:17:23 2016 From: osama94 at gmail.com (Muhammad Osama) Date: Tue, 8 Mar 2016 17:17:23 -0800 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Message-ID: Wow, this is powerful! Question; Will I be able to compile the sub-project individually? Because as I see this is what we will use in the root/CMakeLists.txt, but what about the sub-dirs which I really want to be "independent" if the user wants. On Tue, Mar 8, 2016 at 5:13 PM, Nicholas Braden wrote: > Example simple usages from my personal projects: > > https://github.com/LB--/events/blob/499ba78b923b40f77cc832b6a5d414240209ac96/CMakeLists.txt > > https://github.com/LB--/simple-platformer/blob/1bba3dd2d8ed1cdae74ce1b77c4ab99878fa59a6/CMakeLists.txt > > More complex usage in hunter: > https://github.com/ruslo/hunter > > With ExternalProject you can have it either download from version control > / source archive, or you can use a local existing folder. I think in your > case you just need to point it to your existing project folders and forward > the appropriate arguments. There is a lot of customizability to it > (customizing each step, for example). If you want I could make an example > exactly like your provided example directory structure, but I think both of > my personal usages closely match what you are wanting to do. > > On Tue, Mar 8, 2016 at 7:02 PM, Muhammad Osama wrote: > >> Thank you for your suggestion Nicholas, I have never used >> ExternalProject_Add before and can't find a related example to my project. >> Would you know an example that uses it? >> >> On Tue, Mar 8, 2016 at 10:38 AM, Nicholas Braden < >> nicholas11braden at gmail.com> wrote: >> >>> Have you looked into ExternalProject_Add? It allows just using a local >>> path instead of downloading a remote repository: >>> >>> https://cmake.org/cmake/help/latest/module/ExternalProject.html >>> >>> On Tue, Mar 8, 2016 at 12:12 PM, Muhammad Osama >>> wrote: >>> >>>> Hi Jan, >>>> >>>> Thank you for your reply, I am in the similar situation, have a very >>>> similar implementation using *target_*** *but since I don't do that >>>> for ALL the dependencies, I am unable to cmake or compile individual >>>> projects in the sub directories. So, few questions; >>>> >>>> 1. This still requires me to run cmake on the root CMakeLists.txt to >>>> set the flags and what not before I run the sub project to make it correct? >>>> 1a. If so, how can I make the CMakeLists.txts in the sub directories >>>> independent of the root one if I want to just compile the sub-project and >>>> not cmake the whole thing? >>>> 2. Another question is that your implementation, does it not include a >>>> config file? In theory you're copy pasting most of the dependencies in the >>>> CMakeLists.txt of root into the sub-dir ones? Is there a better way to do >>>> this? >>>> >>>> Thank you! >>>> >>>> On Tue, Mar 8, 2016 at 2:02 AM, ? Jan Hegewald >>>> wrote: >>>> >>>>> Hi Muhammad, >>>>> >>>>> > On 08.03.2016, at 06:17, Muhammad Osama wrote: >>>>> > >>>>> > Hi, I am new to cmake and really hope am doing this correctly. I >>>>> asked stackoverflow but didn't get a good enough answer for my specific >>>>> problem here; >>>>> > >>>>> > If I want root/sub-directories/ as separate sub-projects that can be >>>>> compiled using the individualCMakeLists.txts in their folders I find myself >>>>> literally copy pasting almost the entire root file CMakeLists.txt per >>>>> sub-directory. >>>>> > >>>>> > I was wondering if there is a better way to have a main project and >>>>> then sub-projects that get the shared dependencies from main project and >>>>> can be compiled without cmake-ing the root CMakeLists.txt. My directory >>>>> structure is; >>>>> > >>>>> > CMakeLists.txt (root project) >>>>> > | __ sub_dir-1 >>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>> > | __ sub_dir-2 >>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>> > | __ sub_dir-3 >>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>> >>>>> I basically have the same project structure as you describe. I am also >>>>> not sure what the best practice is here, but this is what I currently do: >>>>> I set all dependencies where they are required: right in the local >>>>> CMakeLists.txt, i.e. sub_dir-1/CMakeLists.txt. Then "export" all required >>>>> include/define/compiler flags dependencies via INTERFACE or PUBLIC flags of >>>>> the various target_*** cmake functions, as appropriate. The sub-projects >>>>> are added via add_subdirectory in cmake. >>>>> This way I can build each CMakeLists.txt individually if needed but >>>>> still have everything DRYish. >>>>> >>>>> HTH, >>>>> Jan >>>>> >>>>> -- >>>>> >>>>> 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> *Muhammad Osama* >>>> Graduate Student >>>> Department of Electrical and Computer Engineering >>>> University of California, Davis >>>> >>>> -- >>>> >>>> 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 >>>> >>> >>> >> >> >> -- >> *Muhammad Osama* >> Graduate Student >> Department of Electrical and Computer Engineering >> University of California, Davis >> > > -- *Muhammad Osama* Graduate Student Department of Electrical and Computer Engineering University of California, Davis -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas11braden at gmail.com Tue Mar 8 20:19:25 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Tue, 8 Mar 2016 19:19:25 -0600 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Message-ID: Yep, just make each project act independently with no knowledge of the superproject, and have the superproject glue it all together as a convenience for the user if they don't want to manually build things separately or if they don't have existing installs. That's what I am doing with my projects. On Tue, Mar 8, 2016 at 7:17 PM, Muhammad Osama wrote: > Wow, this is powerful! Question; Will I be able to compile the sub-project > individually? > Because as I see this is what we will use in the root/CMakeLists.txt, but > what about the sub-dirs which I really want to be "independent" if the user > wants. > > On Tue, Mar 8, 2016 at 5:13 PM, Nicholas Braden < > nicholas11braden at gmail.com> wrote: > >> Example simple usages from my personal projects: >> >> https://github.com/LB--/events/blob/499ba78b923b40f77cc832b6a5d414240209ac96/CMakeLists.txt >> >> https://github.com/LB--/simple-platformer/blob/1bba3dd2d8ed1cdae74ce1b77c4ab99878fa59a6/CMakeLists.txt >> >> More complex usage in hunter: >> https://github.com/ruslo/hunter >> >> With ExternalProject you can have it either download from version control >> / source archive, or you can use a local existing folder. I think in your >> case you just need to point it to your existing project folders and forward >> the appropriate arguments. There is a lot of customizability to it >> (customizing each step, for example). If you want I could make an example >> exactly like your provided example directory structure, but I think both of >> my personal usages closely match what you are wanting to do. >> >> On Tue, Mar 8, 2016 at 7:02 PM, Muhammad Osama wrote: >> >>> Thank you for your suggestion Nicholas, I have never used >>> ExternalProject_Add before and can't find a related example to my project. >>> Would you know an example that uses it? >>> >>> On Tue, Mar 8, 2016 at 10:38 AM, Nicholas Braden < >>> nicholas11braden at gmail.com> wrote: >>> >>>> Have you looked into ExternalProject_Add? It allows just using a local >>>> path instead of downloading a remote repository: >>>> >>>> https://cmake.org/cmake/help/latest/module/ExternalProject.html >>>> >>>> On Tue, Mar 8, 2016 at 12:12 PM, Muhammad Osama >>>> wrote: >>>> >>>>> Hi Jan, >>>>> >>>>> Thank you for your reply, I am in the similar situation, have a very >>>>> similar implementation using *target_*** *but since I don't do that >>>>> for ALL the dependencies, I am unable to cmake or compile individual >>>>> projects in the sub directories. So, few questions; >>>>> >>>>> 1. This still requires me to run cmake on the root CMakeLists.txt to >>>>> set the flags and what not before I run the sub project to make it correct? >>>>> 1a. If so, how can I make the CMakeLists.txts in the sub directories >>>>> independent of the root one if I want to just compile the sub-project and >>>>> not cmake the whole thing? >>>>> 2. Another question is that your implementation, does it not include a >>>>> config file? In theory you're copy pasting most of the dependencies in the >>>>> CMakeLists.txt of root into the sub-dir ones? Is there a better way to do >>>>> this? >>>>> >>>>> Thank you! >>>>> >>>>> On Tue, Mar 8, 2016 at 2:02 AM, ? Jan Hegewald >>>>> wrote: >>>>> >>>>>> Hi Muhammad, >>>>>> >>>>>> > On 08.03.2016, at 06:17, Muhammad Osama wrote: >>>>>> > >>>>>> > Hi, I am new to cmake and really hope am doing this correctly. I >>>>>> asked stackoverflow but didn't get a good enough answer for my specific >>>>>> problem here; >>>>>> > >>>>>> > If I want root/sub-directories/ as separate sub-projects that can >>>>>> be compiled using the individualCMakeLists.txts in their folders I find >>>>>> myself literally copy pasting almost the entire root file CMakeLists.txt >>>>>> per sub-directory. >>>>>> > >>>>>> > I was wondering if there is a better way to have a main project and >>>>>> then sub-projects that get the shared dependencies from main project and >>>>>> can be compiled without cmake-ing the root CMakeLists.txt. My directory >>>>>> structure is; >>>>>> > >>>>>> > CMakeLists.txt (root project) >>>>>> > | __ sub_dir-1 >>>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>>> > | __ sub_dir-2 >>>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>>> > | __ sub_dir-3 >>>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>>> >>>>>> I basically have the same project structure as you describe. I am >>>>>> also not sure what the best practice is here, but this is what I currently >>>>>> do: >>>>>> I set all dependencies where they are required: right in the local >>>>>> CMakeLists.txt, i.e. sub_dir-1/CMakeLists.txt. Then "export" all required >>>>>> include/define/compiler flags dependencies via INTERFACE or PUBLIC flags of >>>>>> the various target_*** cmake functions, as appropriate. The sub-projects >>>>>> are added via add_subdirectory in cmake. >>>>>> This way I can build each CMakeLists.txt individually if needed but >>>>>> still have everything DRYish. >>>>>> >>>>>> HTH, >>>>>> Jan >>>>>> >>>>>> -- >>>>>> >>>>>> 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 >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *Muhammad Osama* >>>>> Graduate Student >>>>> Department of Electrical and Computer Engineering >>>>> University of California, Davis >>>>> >>>>> -- >>>>> >>>>> 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 >>>>> >>>> >>>> >>> >>> >>> -- >>> *Muhammad Osama* >>> Graduate Student >>> Department of Electrical and Computer Engineering >>> University of California, Davis >>> >> >> > > > -- > *Muhammad Osama* > Graduate Student > Department of Electrical and Computer Engineering > University of California, Davis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From osama94 at gmail.com Tue Mar 8 21:04:16 2016 From: osama94 at gmail.com (Muhammad Osama) Date: Tue, 8 Mar 2016 18:04:16 -0800 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Message-ID: Makes sense, thank you so much Nicholas! I will give this a try. On Tue, Mar 8, 2016 at 5:19 PM, Nicholas Braden wrote: > Yep, just make each project act independently with no knowledge of the > superproject, and have the superproject glue it all together as a > convenience for the user if they don't want to manually build things > separately or if they don't have existing installs. That's what I am doing > with my projects. > > On Tue, Mar 8, 2016 at 7:17 PM, Muhammad Osama wrote: > >> Wow, this is powerful! Question; Will I be able to compile the >> sub-project individually? >> Because as I see this is what we will use in the root/CMakeLists.txt, but >> what about the sub-dirs which I really want to be "independent" if the user >> wants. >> >> On Tue, Mar 8, 2016 at 5:13 PM, Nicholas Braden < >> nicholas11braden at gmail.com> wrote: >> >>> Example simple usages from my personal projects: >>> >>> https://github.com/LB--/events/blob/499ba78b923b40f77cc832b6a5d414240209ac96/CMakeLists.txt >>> >>> https://github.com/LB--/simple-platformer/blob/1bba3dd2d8ed1cdae74ce1b77c4ab99878fa59a6/CMakeLists.txt >>> >>> More complex usage in hunter: >>> https://github.com/ruslo/hunter >>> >>> With ExternalProject you can have it either download from version >>> control / source archive, or you can use a local existing folder. I think >>> in your case you just need to point it to your existing project folders and >>> forward the appropriate arguments. There is a lot of customizability to it >>> (customizing each step, for example). If you want I could make an example >>> exactly like your provided example directory structure, but I think both of >>> my personal usages closely match what you are wanting to do. >>> >>> On Tue, Mar 8, 2016 at 7:02 PM, Muhammad Osama >>> wrote: >>> >>>> Thank you for your suggestion Nicholas, I have never used >>>> ExternalProject_Add before and can't find a related example to my project. >>>> Would you know an example that uses it? >>>> >>>> On Tue, Mar 8, 2016 at 10:38 AM, Nicholas Braden < >>>> nicholas11braden at gmail.com> wrote: >>>> >>>>> Have you looked into ExternalProject_Add? It allows just using a local >>>>> path instead of downloading a remote repository: >>>>> >>>>> https://cmake.org/cmake/help/latest/module/ExternalProject.html >>>>> >>>>> On Tue, Mar 8, 2016 at 12:12 PM, Muhammad Osama >>>>> wrote: >>>>> >>>>>> Hi Jan, >>>>>> >>>>>> Thank you for your reply, I am in the similar situation, have a very >>>>>> similar implementation using *target_*** *but since I don't do that >>>>>> for ALL the dependencies, I am unable to cmake or compile individual >>>>>> projects in the sub directories. So, few questions; >>>>>> >>>>>> 1. This still requires me to run cmake on the root CMakeLists.txt to >>>>>> set the flags and what not before I run the sub project to make it correct? >>>>>> 1a. If so, how can I make the CMakeLists.txts in the sub directories >>>>>> independent of the root one if I want to just compile the sub-project and >>>>>> not cmake the whole thing? >>>>>> 2. Another question is that your implementation, does it not include >>>>>> a config file? In theory you're copy pasting most of the dependencies in >>>>>> the CMakeLists.txt of root into the sub-dir ones? Is there a better way to >>>>>> do this? >>>>>> >>>>>> Thank you! >>>>>> >>>>>> On Tue, Mar 8, 2016 at 2:02 AM, ? Jan Hegewald >>>>>> wrote: >>>>>> >>>>>>> Hi Muhammad, >>>>>>> >>>>>>> > On 08.03.2016, at 06:17, Muhammad Osama wrote: >>>>>>> > >>>>>>> > Hi, I am new to cmake and really hope am doing this correctly. I >>>>>>> asked stackoverflow but didn't get a good enough answer for my specific >>>>>>> problem here; >>>>>>> > >>>>>>> > If I want root/sub-directories/ as separate sub-projects that can >>>>>>> be compiled using the individualCMakeLists.txts in their folders I find >>>>>>> myself literally copy pasting almost the entire root file CMakeLists.txt >>>>>>> per sub-directory. >>>>>>> > >>>>>>> > I was wondering if there is a better way to have a main project >>>>>>> and then sub-projects that get the shared dependencies from main project >>>>>>> and can be compiled without cmake-ing the root CMakeLists.txt. My directory >>>>>>> structure is; >>>>>>> > >>>>>>> > CMakeLists.txt (root project) >>>>>>> > | __ sub_dir-1 >>>>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>>>> > | __ sub_dir-2 >>>>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>>>> > | __ sub_dir-3 >>>>>>> > | __ | __ CMakeLists.txt (sub-project) >>>>>>> >>>>>>> I basically have the same project structure as you describe. I am >>>>>>> also not sure what the best practice is here, but this is what I currently >>>>>>> do: >>>>>>> I set all dependencies where they are required: right in the local >>>>>>> CMakeLists.txt, i.e. sub_dir-1/CMakeLists.txt. Then "export" all required >>>>>>> include/define/compiler flags dependencies via INTERFACE or PUBLIC flags of >>>>>>> the various target_*** cmake functions, as appropriate. The sub-projects >>>>>>> are added via add_subdirectory in cmake. >>>>>>> This way I can build each CMakeLists.txt individually if needed but >>>>>>> still have everything DRYish. >>>>>>> >>>>>>> HTH, >>>>>>> Jan >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> 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 >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> *Muhammad Osama* >>>>>> Graduate Student >>>>>> Department of Electrical and Computer Engineering >>>>>> University of California, Davis >>>>>> >>>>>> -- >>>>>> >>>>>> 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 >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Muhammad Osama* >>>> Graduate Student >>>> Department of Electrical and Computer Engineering >>>> University of California, Davis >>>> >>> >>> >> >> >> -- >> *Muhammad Osama* >> Graduate Student >> Department of Electrical and Computer Engineering >> University of California, Davis >> > > -- *Muhammad Osama* Graduate Student Department of Electrical and Computer Engineering University of California, Davis -------------- next part -------------- An HTML attachment was scrubbed... URL: From winkus4u at arcor.de Wed Mar 9 05:27:44 2016 From: winkus4u at arcor.de (Winfried) Date: Wed, 9 Mar 2016 03:27:44 -0700 (MST) Subject: [CMake] Howto install executables that aren't targets Message-ID: <1457519264587-7592951.post@n2.nabble.com> Hi, the build system of a qt-based visual robot programming teaching platform shall be ported from autotools to cmake. For the build process of the platform the underlying compilers and some shell scripts aiming diffenent robot targets are not built but just have to be installed (copied) to /usr/bin. I tried different ways to do this: install(FILES DESTINATION /usr/bin) -----> file INSTALL cannot copy file "/opt/build/tuxminds_3.96_cmake/tools/tuxm_aar-04_make.sh" to "/usr/bin/tuxm_aar-04_make.sh". install(TARGETS RUNTIME DESTINATION /usr/bin) -----> install TARGETS given target "tuxm_aar-04_make.sh" which does not exist in this directory. install(TARGETS ${CMAKE_CURRENT_SOURCE_DIR}/ ${CMAKE_CURRENT_SOURCE_DIR}/ ... RUNTIME DESTINATION /usr/bin) -----> install TARGETS given target "/opt/build/tuxminds_3.96_cmake/tools/tuxm_aar-04_make.sh" which does not exist in this directory. (The files are located in ${CMAKE_CURRENT_SOURCE_DIR} .) So, I would be glad, if someone could help me with this topic. Thanks in advance! Winfried -- View this message in context: http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951.html Sent from the CMake mailing list archive at Nabble.com. From bballet at ivsweb.com Wed Mar 9 06:27:32 2016 From: bballet at ivsweb.com (Benjamin Ballet) Date: Wed, 9 Mar 2016 12:27:32 +0100 Subject: [CMake] Some Visual Studio/CMake questions In-Reply-To: References: Message-ID: Here we migrated a huge Visual Studio solution (130 targets) to CMake. * The switch between Debug and Release always took a few seconds, during with Visual seems freezed. * We have the same problem : I think the cmake generator has to modify vcxproj files and when a file like this, Visual studio assume the whole project to be out of date and hence has to recompile it and its dependencies. 2016-03-08 17:13 GMT+01:00 Nicholas Braden : > IIRC, the project() command can be called once per directory. So you > can have each directory be a separate project via add_subdirectory(). > > I just tried it out and it seems to create a solution (*.sln) for each > project(). > > I can't answer the other questions, sorry. > > On Tue, Mar 8, 2016 at 10:03 AM, Jakob van Bethlehem > wrote: > > Dear users, > > > > Since about a year I work on a project that uses CMake in combination > with > > Visual Studio. This works kind of oke, but over time some questions have > > emerged. Hopefully I can get an answer on this list: > > > > * Our build infrastructure creates a Release and a Debug configuration by > > setting the CMAKE_CONFIGURATION_TYPES variable. However, when switching > > between these configurations, Visual Studio almost kills itself, and > becomes > > unresponding for quite some time. Is this a known issue with Visual > Studio > > and CMake-generated solutions? Or is there something we can do to improve > > this? > > > > * The generated solution file makes sure that CMake is ran again if any > > change in one of the CMakeLists.txt file is detected. What we typically > see > > however, is that afterwards Visual Studio recompiles loads of files that > > were not changed, and that were already compiled before. It seems that > the > > CMake run someone makes Visual Studio believe that all, or at least way > too > > many, files are out of date and need to be recompiled. We make use of a > > Visual Studio plugin that provides a bunch of smart functions, which > scans > > the files in the solution in order to do its job. This plugin has the > same > > behaviour, so it seems like CMake is the common denominator causing > > behaviour one wouldn't expect or want. > > Same question: known issue, or something we can improve somehow? > > > > * Over time I have seen a view times that it was mentioned that it is > > possible to call the 'project()' function multiple times, and that this > will > > produce separate Visual Studio solution files. Interestingly, this is > > documented absolutely nowhere. As a matter of fact, the documentation of > the > > 'project()' function clearly states that you should call that function > only > > once, and exactly once. > > > > What about it? Is this some undocumented feature we can rely on? Or is > this > > a serious bug, that many people incidentally have come to rely upon. If > this > > is considered a feature, will this feature remain working for the > > foreseeable future? If yes is the answer to these questions, what > *exactly* > > does this feature contain, so where *can* I get documentation? My main > > question is whether it is possible to create dependencies between > projects, > > i.e. solution files, and will CMake generate calls to msbuild that will > > automatically take care that dependencies between solution files are > handled > > properly? > > > > Hopefully someone can help me out a bit here! > > > > Sincerely, > > Jakob van Bethlehem > > > > -- > > > > 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 > -- *Benjamin BALLET* Ing?nieur R&D *ACTIVISU* 19, rue Klock - 92110 Clichy *> Standard T?l* : 01 44 69 37 37 *>* www.activisu.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From calebwherry at gmail.com Wed Mar 9 08:38:41 2016 From: calebwherry at gmail.com (J. Caleb Wherry) Date: Wed, 9 Mar 2016 08:38:41 -0500 Subject: [CMake] Howto install executables that aren't targets In-Reply-To: <1457519264587-7592951.post@n2.nabble.com> References: <1457519264587-7592951.post@n2.nabble.com> Message-ID: "install(FILES..." should work, that is how you install non-target files. Are you sure it isn't a permission issue? Do other install commands work that copy to /usr/bin? We'll need a little more information to diagnose the issue, an simple CMake example would be nice. Caleb On Wednesday, March 9, 2016, Winfried wrote: > Hi, > the build system of a qt-based visual robot programming teaching platform > shall be ported from autotools to cmake. > For the build process of the platform the underlying compilers and some > shell scripts aiming diffenent robot targets are not built but just have to > be installed (copied) to /usr/bin. > > I tried different ways to do this: > install(FILES DESTINATION /usr/bin) > -----> file INSTALL cannot copy file > "/opt/build/tuxminds_3.96_cmake/tools/tuxm_aar-04_make.sh" to > "/usr/bin/tuxm_aar-04_make.sh". > > install(TARGETS RUNTIME DESTINATION /usr/bin) > -----> install TARGETS given target "tuxm_aar-04_make.sh" which does not > exist in > this directory. > > install(TARGETS ${CMAKE_CURRENT_SOURCE_DIR}/ > ${CMAKE_CURRENT_SOURCE_DIR}/ > ... > RUNTIME DESTINATION /usr/bin) > -----> install TARGETS given target > "/opt/build/tuxminds_3.96_cmake/tools/tuxm_aar-04_make.sh" which > does not exist in this directory. > > (The files are located in ${CMAKE_CURRENT_SOURCE_DIR} .) > > So, I would be glad, if someone could help me with this topic. > Thanks in advance! > Winfried > > > > > -- > View this message in context: > http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951.html > Sent from the CMake mailing list archive at Nabble.com. > -- > > 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 > -- Sent from my iPhone 4s -------------- next part -------------- An HTML attachment was scrubbed... URL: From d3ck0r at gmail.com Wed Mar 9 10:44:20 2016 From: d3ck0r at gmail.com (J Decker) Date: Wed, 9 Mar 2016 07:44:20 -0800 Subject: [CMake] Howto install executables that aren't targets In-Reply-To: References: <1457519264587-7592951.post@n2.nabble.com> Message-ID: use INSTALL( PROGRAMS ) ... FILES drops executable bit on linux On Wed, Mar 9, 2016 at 5:38 AM, J. Caleb Wherry wrote: > "install(FILES..." should work, that is how you install non-target files. > Are you sure it isn't a permission issue? Do other install commands work > that copy to /usr/bin? > > We'll need a little more information to diagnose the issue, an simple CMake > example would be nice. > > Caleb > > > On Wednesday, March 9, 2016, Winfried wrote: >> >> Hi, >> the build system of a qt-based visual robot programming teaching platform >> shall be ported from autotools to cmake. >> For the build process of the platform the underlying compilers and some >> shell scripts aiming diffenent robot targets are not built but just have >> to >> be installed (copied) to /usr/bin. >> >> I tried different ways to do this: >> install(FILES DESTINATION /usr/bin) >> -----> file INSTALL cannot copy file >> "/opt/build/tuxminds_3.96_cmake/tools/tuxm_aar-04_make.sh" to >> "/usr/bin/tuxm_aar-04_make.sh". >> >> install(TARGETS RUNTIME DESTINATION /usr/bin) >> -----> install TARGETS given target "tuxm_aar-04_make.sh" which does not >> exist in >> this directory. >> >> install(TARGETS ${CMAKE_CURRENT_SOURCE_DIR}/ >> ${CMAKE_CURRENT_SOURCE_DIR}/ >> ... >> RUNTIME DESTINATION /usr/bin) >> -----> install TARGETS given target >> "/opt/build/tuxminds_3.96_cmake/tools/tuxm_aar-04_make.sh" which >> does not exist in this directory. >> >> (The files are located in ${CMAKE_CURRENT_SOURCE_DIR} .) >> >> So, I would be glad, if someone could help me with this topic. >> Thanks in advance! >> Winfried >> >> >> >> >> -- >> View this message in context: >> http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951.html >> Sent from the CMake mailing list archive at Nabble.com. >> -- >> >> 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 > > > > -- > Sent from my iPhone 4s > > -- > > 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 From winkus4u at arcor.de Wed Mar 9 10:58:58 2016 From: winkus4u at arcor.de (Winfried) Date: Wed, 9 Mar 2016 08:58:58 -0700 (MST) Subject: [CMake] Howto install executables that aren't targets In-Reply-To: References: <1457519264587-7592951.post@n2.nabble.com> Message-ID: <1457539138398-7592955.post@n2.nabble.com> Hi Caleb, yes, I also suppose that it's some kind of permission issue, but I don't know how to handle it: All other install commands work exept those that should also copy to /usr/bin. I also tried to install those with another order, here is that code form subdirectory 'tools': install( FILES nqc nbc tuxm_aar-04_make.sh tuxm_asuro_make.sh tuxm_nxt_make.sh tuxm_nxtsim_make.sh tuxm_rcx_make.sh RUNTIME DESTINATION /usr/bin) 'cmake ..' runs normal without an error, but when I call CPack by executing 'make package' the error always appears when it tries to pack the first of the above files. Here's the complete error message of the CPack part (before it is only i18n stuff output): Run CPack packaging tool... /usr/bin/cpack --config ./CPackConfig.cmake CPack: Create package using STGZ CPack: Install projects CPack: - Run preinstall target for: TuxMinds CPack: - Install project: TuxMinds CMake Error at /opt/build/tuxminds_3.96_20141203_cmake/build/tools/cmake_install.cmake:44 (file): file INSTALL cannot copy file "/opt/build/tuxminds_3.96_20141203_cmake/tools/nqc" to "/usr/bin/nqc". Call Stack (most recent call first): /opt/build/tuxminds_3.96_20141203_cmake/build/cmake_install.cmake:41 (include) CPack Error: Error when generating package: TuxMinds make: *** [package] Fehler 1 When I exclude subdirectory 'tools' the package is successfully built by 'make package'. Here's the output of 'ls -la' for that directory: insgesamt 3512 drwxr-xr-x 1 me users 300 9. M?r 16:26 . drwxr-xr-x 1 me users 1924 9. M?r 16:26 .. -rw-r--r-- 1 me users 389 9. M?r 16:26 CMakeLists.txt -rw-r--r-- 1 me users 419 9. M?r 16:26 CMakeLists.txt~ drwxr-xr-x 1 me users 42 18. Dez 2013 .deps -rw-r--r-- 1 me users 105 29. M?r 2014 Makefile.am -rw-r--r-- 1 me users 13732 3. Dez 2014 Makefile.in -rwxr-xr-x 1 me users 3123348 15. M?r 2011 nbc -rwxr-xr-x 1 me users 420440 15. Jan 2012 nqc -rwxr-xr-x 1 me users 968 17. Nov 2014 tuxm_aar-04_make.sh -rwxr-xr-x 1 me users 1249 4. Dez 2013 tuxm_asuro_make.sh -rwxr-xr-x 1 me users 1544 4. Dez 2013 tuxm_nxt_make.sh -rwxr-xr-x 1 me users 834 5. Dez 2013 tuxm_nxtsim_make.sh -rwxr-xr-x 1 me users 1056 4. Dez 2013 tuxm_rcx_make.sh nothing unusual as I think. If you need some more information, please let me know... -- View this message in context: http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592955.html Sent from the CMake mailing list archive at Nabble.com. From eric.noulard at gmail.com Wed Mar 9 11:24:07 2016 From: eric.noulard at gmail.com (Eric Noulard) Date: Wed, 9 Mar 2016 17:24:07 +0100 Subject: [CMake] Howto install executables that aren't targets In-Reply-To: <1457539138398-7592955.post@n2.nabble.com> References: <1457519264587-7592951.post@n2.nabble.com> <1457539138398-7592955.post@n2.nabble.com> Message-ID: 2016-03-09 16:58 GMT+01:00 Winfried : > Hi Caleb, > > yes, I also suppose that it's some kind of permission issue, but I don't > know how to handle it: > > All other install commands work exept those that should also copy to > /usr/bin. > I also tried to install those with another order, here is that code form > subdirectory 'tools': > install( FILES nqc > nbc > tuxm_aar-04_make.sh > tuxm_asuro_make.sh > tuxm_nxt_make.sh > tuxm_nxtsim_make.sh > tuxm_rcx_make.sh > RUNTIME DESTINATION /usr/bin) > The problem here is that you ask to install the files/programs to an absolute path i.e. "/usr/bin". Not all CPack generator can transparently handle absolute install path. Usually one uses relative install path like "bin" package it and then when you unpack (the RPM, the zip, the STGZ etc...) you chose the installation prefix. In your case CPack is trying to install to /usr/bin where you may not have the right to write. For more information on CPack and absolute destination handling see: - CPACK_ABSOLUTE_DESTINATION_FILES - CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION - CPACK_PACKAGING_INSTALL_PREFIX - CPACK_SET_DESTDIR - CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION > > 'cmake ..' runs normal without an error, but when I call CPack by executing > 'make package' the error always appears when it tries to pack the first of > the above files. Here's the complete error message of the CPack part > (before > it is only i18n stuff output): > Run CPack packaging tool... > /usr/bin/cpack --config ./CPackConfig.cmake > CPack: Create package using STGZ > CPack: Install projects > CPack: - Run preinstall target for: TuxMinds > CPack: - Install project: TuxMinds > CMake Error at > /opt/build/tuxminds_3.96_20141203_cmake/build/tools/cmake_install.cmake:44 > (file): > file INSTALL cannot copy file > > "/opt/build/tuxminds_3.96_20141203_cmake/tools/nqc" to "/usr/bin/nqc". > Call Stack (most recent call first): > /opt/build/tuxminds_3.96_20141203_cmake/build/cmake_install.cmake:41 > (include) > > CPack Error: Error when generating package: TuxMinds > make: *** [package] Fehler 1 > > When I exclude subdirectory 'tools' the package is successfully built by > 'make package'. > > Here's the output of 'ls -la' for that directory: > insgesamt 3512 > drwxr-xr-x 1 me users 300 9. M?r 16:26 . > drwxr-xr-x 1 me users 1924 9. M?r 16:26 .. > -rw-r--r-- 1 me users 389 9. M?r 16:26 CMakeLists.txt > -rw-r--r-- 1 me users 419 9. M?r 16:26 CMakeLists.txt~ > drwxr-xr-x 1 me users 42 18. Dez 2013 .deps > -rw-r--r-- 1 me users 105 29. M?r 2014 Makefile.am > -rw-r--r-- 1 me users 13732 3. Dez 2014 Makefile.in > -rwxr-xr-x 1 me users 3123348 15. M?r 2011 nbc > -rwxr-xr-x 1 me users 420440 15. Jan 2012 nqc > -rwxr-xr-x 1 me users 968 17. Nov 2014 tuxm_aar-04_make.sh > -rwxr-xr-x 1 me users 1249 4. Dez 2013 tuxm_asuro_make.sh > -rwxr-xr-x 1 me users 1544 4. Dez 2013 tuxm_nxt_make.sh > -rwxr-xr-x 1 me users 834 5. Dez 2013 tuxm_nxtsim_make.sh > -rwxr-xr-x 1 me users 1056 4. Dez 2013 tuxm_rcx_make.sh > > nothing unusual as I think. > > If you need some more information, please let me know... > > > > > -- > View this message in context: > http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592955.html > Sent from the CMake mailing list archive at Nabble.com. > -- > > 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 > -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From winkus4u at arcor.de Wed Mar 9 11:31:38 2016 From: winkus4u at arcor.de (Winfried) Date: Wed, 9 Mar 2016 09:31:38 -0700 (MST) Subject: [CMake] Howto install executables that aren't targets In-Reply-To: References: <1457519264587-7592951.post@n2.nabble.com> Message-ID: <1457541098831-7592957.post@n2.nabble.com> Hi J Decker, sorry I've missed your answer, while I wrote mine. Now I used install( PROGRAMS ... instead of FILES but I can't see any difference in the output. The error message is exactly the same as in my last reply. To be sure that it is not a cache problem, I deleted the 'build' dir and made a completely new build by: cmake .. make make package -- View this message in context: http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592957.html Sent from the CMake mailing list archive at Nabble.com. From calebwherry at gmail.com Wed Mar 9 11:39:32 2016 From: calebwherry at gmail.com (J. Caleb Wherry) Date: Wed, 9 Mar 2016 11:39:32 -0500 Subject: [CMake] Howto install executables that aren't targets In-Reply-To: <1457541098831-7592957.post@n2.nabble.com> References: <1457519264587-7592951.post@n2.nabble.com> <1457541098831-7592957.post@n2.nabble.com> Message-ID: To Eric's point: your destination for these files should probably be "bin" and not "/usr/bin". That way from CPack you can set the " CPACK_INSTALL_PREFIX" to point to the actual place you want to install your project. But everything still comes down to this: if your above prefix is "/usr" then someone needs write access to that directory. Typically on unix with makefiles the install step is run with "sudo" so that it can write to that location. If you are doing an actual install to the system, then you have to run it with sudo (or give you current user elevated permissions). -Caleb On Wed, Mar 9, 2016 at 11:31 AM, Winfried wrote: > Hi J Decker, > > sorry I've missed your answer, while I wrote mine. > > Now I used install( PROGRAMS ... instead of FILES > but I can't see any difference in the output. The error message is exactly > the same as in my last reply. > To be sure that it is not a cache problem, I deleted the 'build' dir and > made a completely new build by: > cmake .. > make > make package > > > > > -- > View this message in context: > http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592957.html > Sent from the CMake mailing list archive at Nabble.com. > -- > > 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 > -- J. Caleb Wherry *Scientific Software Engineer* http://www.calebwherry.com +1 (615) 708-5651 calebwherry at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From winkus4u at arcor.de Wed Mar 9 13:50:36 2016 From: winkus4u at arcor.de (Winfried) Date: Wed, 9 Mar 2016 11:50:36 -0700 (MST) Subject: [CMake] Howto install executables that aren't targets In-Reply-To: References: <1457519264587-7592951.post@n2.nabble.com> <1457541098831-7592957.post@n2.nabble.com> Message-ID: <1457549436353-7592959.post@n2.nabble.com> Yes, when using 'bin' instead of '/usr/bin' ( with PROGRAMS and without RUNTIME) it works. But nevertheless it's a bit sad because I used the absolute paths with consideration for two reasons: 1. As I mentioned it's a Qt/KDE program (still version 3 at the moment). Depending on the target distro the application shall be stored at the usual place for that distribution (SuSE: /opt/kde3, Debian/Ubuntu: /usr/local, ...) But those compilers and their shell scripts have nothing to do with Qt/KDE stuff and should normally be installed at /usr/bin regardless where the other binaries go to. 2. I planned to make possible a second LOCAL install for development purposes parallel to the system installation. For such a local installation the installer shall be able to flexibly decide where to install the application data by setting an environment variable. Im not sure if this is possible if absolute paths are not usable. Missing documentation: The variant 'install( PROGRAMS ...)' is not yet documented at 'https://cmake.org/cmake/help/v3.4/command/install.html'. Could someone from Kitware please add it? Btw, please also add a sentence like "Following C-tradition the first position in a string is '0' " to the documentation of 'FIND'. J. Caleb Wherry wrote > To Eric's point: your destination for these files should probably be "bin" > and not "/usr/bin". That way from CPack you can set the " > CPACK_INSTALL_PREFIX" to point to the actual place you want to install > your > project. > > But everything still comes down to this: if your above prefix is "/usr" > then someone needs write access to that directory. Typically on unix with > makefiles the install step is run with "sudo" so that it can write to that > location. If you are doing an actual install to the system, then you have > to run it with sudo (or give you current user elevated permissions). > > -Caleb > > On Wed, Mar 9, 2016 at 11:31 AM, Winfried < > winkus4u@ > > wrote: > >> Hi J Decker, >> >> sorry I've missed your answer, while I wrote mine. >> >> Now I used install( PROGRAMS ... instead of FILES >> but I can't see any difference in the output. The error message is >> exactly >> the same as in my last reply. >> To be sure that it is not a cache problem, I deleted the 'build' dir and >> made a completely new build by: >> cmake .. >> make >> make package >> >> >> >> >> -- >> View this message in context: >> http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592957.html >> Sent from the CMake mailing list archive at Nabble.com. >> -- >> >> 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 >> > > > > -- > J. Caleb Wherry > *Scientific Software Engineer* > > <http://www.calebwherry.com> > http://www.calebwherry.com > +1 (615) 708-5651 > calebwherry@ > > -- > > 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 -- View this message in context: http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592959.html Sent from the CMake mailing list archive at Nabble.com. From eric.noulard at gmail.com Wed Mar 9 14:27:23 2016 From: eric.noulard at gmail.com (Eric Noulard) Date: Wed, 9 Mar 2016 20:27:23 +0100 Subject: [CMake] Howto install executables that aren't targets In-Reply-To: <1457549436353-7592959.post@n2.nabble.com> References: <1457519264587-7592951.post@n2.nabble.com> <1457541098831-7592957.post@n2.nabble.com> <1457549436353-7592959.post@n2.nabble.com> Message-ID: 2016-03-09 19:50 GMT+01:00 Winfried : > Yes, when using 'bin' instead of '/usr/bin' ( with PROGRAMS and without > RUNTIME) it works. > > But nevertheless it's a bit sad because I used the absolute paths with > consideration for two reasons: > > 1. As I mentioned it's a Qt/KDE program (still version 3 at the moment). > Depending on the target distro the application shall be stored at the usual > place for that distribution (SuSE: /opt/kde3, Debian/Ubuntu: /usr/local, > ...) But those compilers and their shell scripts have nothing to do with > Qt/KDE stuff and should normally be installed at /usr/bin regardless where > the other binaries go to. > I do not get your point? If you build an installer (using CPack) which has relative path in it (./bin) or is relocatable (.rpm or .deb) then you may perfectly chose the prefix **at install time** be it /opt/kde3 or /usr or /opt .... > 2. I planned to make possible a second LOCAL install for development > purposes parallel to the system installation. For such a local installation > the installer shall be able to flexibly decide where to install the > application data by setting an environment variable. > Precisely, you need a relocatable installer. Building an installer using relative install path makes it easier to build a relocatable installer. E.g. CPack RPM may perfectly handle absolute install path like files put in /etc/ but then the whole package will be relocatable but the absolutely installed file. For RPM see rpm --prefix or --relocate > > Im not sure if this is possible if absolute paths are not usable. > This is possible indeed, you should build relocatable package with CPack. > > Missing documentation: > The variant 'install( PROGRAMS ...)' is not yet documented at > 'https://cmake.org/cmake/help/v3.4/command/install.html'. > Could someone from Kitware please add it? > The documentation for install(PROGRAMS is documented in the same paragraph as install(FILES... see: https://cmake.org/cmake/help/v3.4/command/install.html#installing-files "The PROGRAMS form is identical to the FILES form except that the default permissions for the installed file also include OWNER ...." > > Btw, please also add a sentence like "Following C-tradition the first > position in a string is '0' " to the documentation of 'FIND'. > > J. Caleb Wherry wrote > > To Eric's point: your destination for these files should probably be > "bin" > > and not "/usr/bin". That way from CPack you can set the " > > CPACK_INSTALL_PREFIX" to point to the actual place you want to install > > your > > project. > > > > But everything still comes down to this: if your above prefix is "/usr" > > then someone needs write access to that directory. Typically on unix with > > makefiles the install step is run with "sudo" so that it can write to > that > > location. If you are doing an actual install to the system, then you have > > to run it with sudo (or give you current user elevated permissions). > > > > -Caleb > > > > On Wed, Mar 9, 2016 at 11:31 AM, Winfried < > > > winkus4u@ > > > > wrote: > > > >> Hi J Decker, > >> > >> sorry I've missed your answer, while I wrote mine. > >> > >> Now I used install( PROGRAMS ... instead of FILES > >> but I can't see any difference in the output. The error message is > >> exactly > >> the same as in my last reply. > >> To be sure that it is not a cache problem, I deleted the 'build' dir and > >> made a completely new build by: > >> cmake .. > >> make > >> make package > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592957.html > >> Sent from the CMake mailing list archive at Nabble.com. > >> -- > >> > >> 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 > >> > > > > > > > > -- > > J. Caleb Wherry > > *Scientific Software Engineer* > > > > <http://www.calebwherry.com> > > http://www.calebwherry.com > > +1 (615) 708-5651 > > > calebwherry@ > > > > > -- > > > > 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 > > > > > > -- > View this message in context: > http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592959.html > Sent from the CMake mailing list archive at Nabble.com. > -- > > 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 > -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjvbertin at gmail.com Wed Mar 9 16:05:05 2016 From: rjvbertin at gmail.com (=?UTF-8?B?UmVuw6kgSi4gVi4=?= Bertin) Date: Wed, 09 Mar 2016 22:05:05 +0100 Subject: [CMake] [OS X] example CMake file to create a Preference Pane? Message-ID: <3522347.BMVGPxe8Tf@portia.local> Hi, I'd like to experiment writing a Preference Pane for Qt-based apps. I'd prefer to use CMake instead of Xcode and wonder if someone can point me to an example CMake file that generates a proper .prefPane bundle? I'm not having much luck googling for one for now. Thanks, Ren? From winkus4u at arcor.de Wed Mar 9 16:12:55 2016 From: winkus4u at arcor.de (Winfried) Date: Wed, 9 Mar 2016 14:12:55 -0700 (MST) Subject: [CMake] Howto install executables that aren't targets In-Reply-To: References: <1457519264587-7592951.post@n2.nabble.com> <1457541098831-7592957.post@n2.nabble.com> <1457549436353-7592959.post@n2.nabble.com> Message-ID: <1457557975858-7592962.post@n2.nabble.com> Eric Noulard wrote > 2016-03-09 19:50 GMT+01:00 Winfried < > winkus4u@ > >: > >> Yes, when using 'bin' instead of '/usr/bin' ( with PROGRAMS and without >> RUNTIME) it works. >> >> But nevertheless it's a bit sad because I used the absolute paths with >> consideration for two reasons: >> >> 1. As I mentioned it's a Qt/KDE program (still version 3 at the moment). >> Depending on the target distro the application shall be stored at the >> usual >> place for that distribution (SuSE: /opt/kde3, Debian/Ubuntu: /usr/local, >> ...) But those compilers and their shell scripts have nothing to do with >> Qt/KDE stuff and should normally be installed at /usr/bin regardless >> where >> the other binaries go to. >> > > I do not get your point? If you build an installer (using CPack) which has > relative path in it (./bin) or is relocatable (.rpm or .deb) then you may > perfectly > chose the prefix **at install time** be it /opt/kde3 or /usr or /opt .... The point is that there are two different fractions of binaries that shall be installed at **two different locations for one package install** : -- the robot programming platform: the main part of the package, KDE/Qt Software (program sources in subdir 'src'), these are **targets that shall be relocatable** for the needs of different distributions -----versus----- -- the underlying compilers (binaries only) and skripts: nessesary tools, third party, console Software (in subdir 'tools'), shall **always** go to **/usr/bin** because console software like compilers are usually installed there (in almost every distribution) If absolute paths do not work for generating rpm-packages via CPack the only way to get this done is to put the compilers and scipts into another package. Do you agree or not? -- View this message in context: http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592962.html Sent from the CMake mailing list archive at Nabble.com. From eric.noulard at gmail.com Wed Mar 9 16:13:22 2016 From: eric.noulard at gmail.com (Eric Noulard) Date: Wed, 9 Mar 2016 22:13:22 +0100 Subject: [CMake] Howto install executables that aren't targets In-Reply-To: References: <1457519264587-7592951.post@n2.nabble.com> <1457541098831-7592957.post@n2.nabble.com> <1457549436353-7592959.post@n2.nabble.com> Message-ID: 2016-03-09 20:27 GMT+01:00 Eric Noulard : > > > 2016-03-09 19:50 GMT+01:00 Winfried : > >> Yes, when using 'bin' instead of '/usr/bin' ( with PROGRAMS and without >> RUNTIME) it works. >> >> But nevertheless it's a bit sad because I used the absolute paths with >> consideration for two reasons: >> >> 1. As I mentioned it's a Qt/KDE program (still version 3 at the moment). >> Depending on the target distro the application shall be stored at the >> usual >> place for that distribution (SuSE: /opt/kde3, Debian/Ubuntu: /usr/local, >> ...) But those compilers and their shell scripts have nothing to do with >> Qt/KDE stuff and should normally be installed at /usr/bin regardless where >> the other binaries go to. >> > > I do not get your point? If you build an installer (using CPack) which has > relative path in it (./bin) or is relocatable (.rpm or .deb) then you may > perfectly > chose the prefix **at install time** be it /opt/kde3 or /usr or /opt .... > Sorry rereading your message I think now I get it. You want 2 prefixes for your applications /opt/kde3 or /usr/local for you KDE app and /usr/ for binaries and shell scripts. For doing that with CPack I suggest you build a multi-component package and configure your CPack generator (RPM, STGZ, etc...) to build 1 package file per component: see: https://cmake.org/Wiki/CMake:Component_Install_With_CPack#CPack_Generator_specific_behavior and/or: https://cmake.org/cmake/help/v3.4/module/CPackComponent.html > >> 2. I planned to make possible a second LOCAL install for development >> purposes parallel to the system installation. For such a local >> installation >> the installer shall be able to flexibly decide where to install the >> application data by setting an environment variable. >> > > Precisely, you need a relocatable installer. > Building an installer using relative install path makes it easier to build > a relocatable installer. > > E.g. CPack RPM may perfectly handle absolute install path like files > put in /etc/ but then the whole package will be relocatable but the > absolutely installed file. > > For RPM see rpm --prefix or --relocate > > >> >> Im not sure if this is possible if absolute paths are not usable. >> > > This is possible indeed, you should build relocatable package with CPack. > > >> >> Missing documentation: >> The variant 'install( PROGRAMS ...)' is not yet documented at >> 'https://cmake.org/cmake/help/v3.4/command/install.html'. >> Could someone from Kitware please add it? >> > > The documentation for install(PROGRAMS is documented in the same paragraph > as install(FILES... > see: > https://cmake.org/cmake/help/v3.4/command/install.html#installing-files > > "The PROGRAMS form is identical to the FILES form except that the default > permissions for the installed file also include OWNER ...." > > > > >> >> Btw, please also add a sentence like "Following C-tradition the first >> position in a string is '0' " to the documentation of 'FIND'. >> >> J. Caleb Wherry wrote >> > To Eric's point: your destination for these files should probably be >> "bin" >> > and not "/usr/bin". That way from CPack you can set the " >> > CPACK_INSTALL_PREFIX" to point to the actual place you want to install >> > your >> > project. >> > >> > But everything still comes down to this: if your above prefix is "/usr" >> > then someone needs write access to that directory. Typically on unix >> with >> > makefiles the install step is run with "sudo" so that it can write to >> that >> > location. If you are doing an actual install to the system, then you >> have >> > to run it with sudo (or give you current user elevated permissions). >> > >> > -Caleb >> > >> > On Wed, Mar 9, 2016 at 11:31 AM, Winfried < >> >> > winkus4u@ >> >> > > wrote: >> > >> >> Hi J Decker, >> >> >> >> sorry I've missed your answer, while I wrote mine. >> >> >> >> Now I used install( PROGRAMS ... instead of FILES >> >> but I can't see any difference in the output. The error message is >> >> exactly >> >> the same as in my last reply. >> >> To be sure that it is not a cache problem, I deleted the 'build' dir >> and >> >> made a completely new build by: >> >> cmake .. >> >> make >> >> make package >> >> >> >> >> >> >> >> >> >> -- >> >> View this message in context: >> >> >> http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592957.html >> >> Sent from the CMake mailing list archive at Nabble.com. >> >> -- >> >> >> >> 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 >> >> >> > >> > >> > >> > -- >> > J. Caleb Wherry >> > *Scientific Software Engineer* >> > >> > <http://www.calebwherry.com> >> > http://www.calebwherry.com >> > +1 (615) 708-5651 >> >> > calebwherry@ >> >> > >> > -- >> > >> > 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 >> >> >> >> >> >> -- >> View this message in context: >> http://cmake.3232098.n2.nabble.com/Howto-install-executables-that-aren-t-targets-tp7592951p7592959.html >> Sent from the CMake mailing list archive at Nabble.com. >> -- >> >> 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 >> > > > > -- > Eric > -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.noulard at gmail.com Wed Mar 9 16:18:40 2016 From: eric.noulard at gmail.com (Eric Noulard) Date: Wed, 9 Mar 2016 22:18:40 +0100 Subject: [CMake] Howto install executables that aren't targets In-Reply-To: <1457557975858-7592962.post@n2.nabble.com> References: <1457519264587-7592951.post@n2.nabble.com> <1457541098831-7592957.post@n2.nabble.com> <1457549436353-7592959.post@n2.nabble.com> <1457557975858-7592962.post@n2.nabble.com> Message-ID: 2016-03-09 22:12 GMT+01:00 Winfried : > Eric Noulard wrote > > 2016-03-09 19:50 GMT+01:00 Winfried < > > > winkus4u@ > > > >: > > > >> Yes, when using 'bin' instead of '/usr/bin' ( with PROGRAMS and without > >> RUNTIME) it works. > >> > >> But nevertheless it's a bit sad because I used the absolute paths with > >> consideration for two reasons: > >> > >> 1. As I mentioned it's a Qt/KDE program (still version 3 at the moment). > >> Depending on the target distro the application shall be stored at the > >> usual > >> place for that distribution (SuSE: /opt/kde3, Debian/Ubuntu: /usr/local, > >> ...) But those compilers and their shell scripts have nothing to do with > >> Qt/KDE stuff and should normally be installed at /usr/bin regardless > >> where > >> the other binaries go to. > >> > > > > I do not get your point? If you build an installer (using CPack) which > has > > relative path in it (./bin) or is relocatable (.rpm or .deb) then you > may > > perfectly > > chose the prefix **at install time** be it /opt/kde3 or /usr or /opt .... > > The point is that there are two different fractions of binaries that shall > be installed at **two different locations for one package install** : > -- the robot programming platform: the main part of the package, KDE/Qt > Software (program sources in subdir 'src'), > these are **targets that shall be relocatable** for the needs of > different distributions > > -----versus----- > > -- the underlying compilers (binaries only) and skripts: nessesary tools, > third party, console Software (in subdir 'tools'), > shall **always** go to **/usr/bin** because console software like > compilers are usually installed there (in almost every > distribution) > > If absolute paths do not work for generating rpm-packages via CPack the > only > way to get this done is to put the compilers and scipts into another > package. Do you agree or not? > Again sorry for my misunderstanding. Yes you need 2 packages, but those 2 packages may be built in 1 cpack call using COMPONENT package. Nevertheless, note that using absolute path **WILL** work with CPackRPM (see my previous refs about CPack RPM) but they will certainly fails with archive generator familiy (ZIP, TGZ, STGZ, etc...) Not all CPack generators have the same capability w.r.t. absolute files. -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruce.r.stephens at gmail.com Wed Mar 9 16:22:14 2016 From: bruce.r.stephens at gmail.com (Bruce Stephens) Date: Wed, 9 Mar 2016 21:22:14 +0000 Subject: [CMake] ExternalProject and libraries again Message-ID: (This is really a continuation of a discussion from 25/26 January.) I'm still confused about ExternalProject_Add and libraries. I'd like to get to the point where I (or more likely a process somewhere) can check out a project, then run cmake and ninja (or make or whatever) and have that build the project and its dependencies. Concretely, suppose I have a trivial project that uses libcrypto from OpenSSL and I have a local repository with OpenSSL with some patches to build it with cmake. One suggestion is that I can use ExternalProject_Add to download and build this openssl which can then export a FindOpenSSL.cmake script. But that happens too late, doesn't it? When I run cmake on my project it can't use find_library and things to find the right library files since those won't exist until I actually build the project? Hence hunter's approach of downloading and building projects during the cmake process, I imagine. Which feels a bit icky, but maybe it's really the most straightforward way to do it? I think I might resort to some trickery: build the various dependent things on the platforms I care about, and then have my main project just know about where the interesting targets are relative to BINARY_DIR for each of the external projects. (Or use the approach of hunter, or use some build script.) Am I missing something obvious? It feels like I must be somehow. From nicholas11braden at gmail.com Wed Mar 9 16:27:25 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Wed, 9 Mar 2016 15:27:25 -0600 Subject: [CMake] ExternalProject and libraries again In-Reply-To: References: Message-ID: I'm not sure which discussion you're referring to, so forgive me if this was already mentioned - but are you using a superproject to ensure that dependencies are built and installed before your own project? That is, all dependencies as well as your own project are built via ExternalProject_Add and you use the DEPENDS option to ensure build order. This is generally the easiest way to do things, in my experience. On Wed, Mar 9, 2016 at 3:22 PM, Bruce Stephens wrote: > (This is really a continuation of a discussion from 25/26 January.) > > I'm still confused about ExternalProject_Add and libraries. > > I'd like to get to the point where I (or more likely a process > somewhere) can check out a project, then run cmake and ninja (or make > or whatever) and have that build the project and its dependencies. > > Concretely, suppose I have a trivial project that uses libcrypto from > OpenSSL and I have a local repository with OpenSSL with some patches > to build it with cmake. > > One suggestion is that I can use ExternalProject_Add to download and > build this openssl which can then export a FindOpenSSL.cmake script. > But that happens too late, doesn't it? > > When I run cmake on my project it can't use find_library and things to > find the right library files since those won't exist until I actually > build the project? > > Hence hunter's approach of downloading and building projects during > the cmake process, I imagine. Which feels a bit icky, but maybe it's > really the most straightforward way to do it? > > I think I might resort to some trickery: build the various dependent > things on the platforms I care about, and then have my main project > just know about where the interesting targets are relative to > BINARY_DIR for each of the external projects. (Or use the approach of > hunter, or use some build script.) > > Am I missing something obvious? It feels like I must be somehow. > -- > > 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 From bruce.r.stephens at gmail.com Wed Mar 9 16:34:38 2016 From: bruce.r.stephens at gmail.com (Bruce Stephens) Date: Wed, 9 Mar 2016 21:34:38 +0000 Subject: [CMake] ExternalProject and libraries again In-Reply-To: References: Message-ID: On Wed, Mar 9, 2016 at 9:27 PM, Nicholas Braden wrote: > I'm not sure which discussion you're referring to, so forgive me if > this was already mentioned - but are you using a superproject to > ensure that dependencies are built and installed before your own > project? That is, all dependencies as well as your own project are > built via ExternalProject_Add and you use the DEPENDS option to ensure > build order. This is generally the easiest way to do things, in my > experience. Ah! That makes sense. So I have a project (say a single CMakeLists.txt) which just contains one or more ExternalProject_Add (maybe other things too, but not much else), and then the subprojects can sensibly get at previous subprojects. And those can be ordered using DEPENDS. OK, I see how that can work. Thanks (and apologies, I'm sure I've read that advice before but probably I didn't understand it then). From anton.yartsev at gmail.com Wed Mar 9 16:46:27 2016 From: anton.yartsev at gmail.com (Anton Yartsev) Date: Thu, 10 Mar 2016 00:46:27 +0300 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> Message-ID: <56E099B3.1010206@Gmail.com> Hi Cristian, That's what I did: 1) Created empty directory "D:\CL", moved clang-cl.exe there and renamed it to cl.exe. 2) Put the paths to cl.exe and Clang first in the global PATH environment variable. Set path to Clang Includes first in INCLUDE 3) Launched Cmake from an empty project dir. Still having the same issue. What am I doing wrong? Any ideas? ------ check that project dir is empty: $dir Directory of D:\-Work-\llvm-3.7.1.src\-CLANG-\ProjectDir 10.03.2016 00:31 . 10.03.2016 00:31 .. 10.03.2016 00:31 0 out 1 File(s) 0 bytes 2 Dir(s) 874 200 309 760 bytes free ------ check PATH: $set PATH Path=D:\CL;D:\LLVM-3.7.1\bin;... ------ check INCLUDE: $set INCLUDE INCLUDE=D:\LLVM-3.7.1\lib\clang\3.7.1\include;C:\Program Files\Microsoft Visual Studio 12.0\VC\include ------ check which cl.exe is used: $which cl D:\CL\cl.EXE ------ trying to build: $cmake -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang .. -- The C compiler identification is Clang 3.7.1 -- The CXX compiler identification is Clang 3.7.1 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "D:/LLVM-3.7.1/bin/clang.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/CMakeTmp Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_c46bb" [1/2] Building C object CMakeFiles\cmTC_c46bb.dir\testCCompiler.c.obj FAILED: D:\LLVM-3.7.1\bin\clang.exe /nologo /DWIN32 /D_WINDOWS /W3 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_c46bb.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_c46bb.dir\ -c testCCompiler.c clang.exe: error: no such file or directory: '/nologo' clang.exe: error: no such file or directory: '/DWIN32' ... > Hi Anton, > > When I say clang-cl I mean how the official llvm package does it - a > 50mb executable named cl.exe and not clang-cl.exe. > > Ninja believes it compiles with visual c++, but instead it compiles > with clang. That's why you need to put the path to clang INCLUDE and > PATH first. > > Simply rename clang-cl.exe as cl.exe, copy it in a directory and put > that path as first in the PATH environment variable. > > Cheers, > Cristian. > > On Mar 4, 2016 12:16, "Anton Yartsev" > wrote: > > Hi Cristian, > > thanks for the replay. I have clang-cl first in PATH, the problem > persists. > > $ SET PATH > Path=D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin;... > > $cd D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin > $dir > Directory of D:\-Work-\llvm-3.7.1.src\-VS_build VS 2013-\Release\bin > > 04.03.2016 14:03 . > 04.03.2016 14:03 .. > 04.03.2016 01:00 11 662 848 arcmt-test.exe > 04.03.2016 01:02 6 446 080 bugpoint.exe > 04.03.2016 01:01 9 728 c-arcmt-test.exe > 04.03.2016 01:01 82 944 c-index-test.exe > 04.03.2016 17:20 40 207 872 clang++.exe > 04.03.2016 01:01 32 803 840 clang-check.exe > 04.03.2016 17:20 40 207 872 clang-cl.exe > 04.03.2016 01:00 1 401 856 clang-format.exe > 04.03.2016 17:05 814 592 clang-tblgen.exe > 04.03.2016 17:20 40 207 872 clang.exe > ... > > >> Hi Anton, >> >> clang.exe doesn't know of any windows specific things. Clang-cl >> instead does. >> >> Just make sure to have clang-cl before msvc-cl in path and ninja >> will just work. >> >> Cheers, >> Cristian >> >> On Mar 4, 2016 01:31, "Anton Yartsev" > > wrote: >> >> Hi all, >> >> I'm trying to use Clang, compiled with VS 2013 >> (configuration:Release, platform:x64) as a C/C++ compiler for >> a simple HelloWorld CMake project. Generation ends up with >> errors like "clang.exe: error: no such file or directory: >> '/DWIN32'" at compiler check stage. If I understand correctly >> the problem is that MSVC compiler options are fed to Clang >> for some reason (maybe the "-- The C compiler identification >> is unknown" log entry is related to the problem?). >> Could anyone help to resolve this, please? >> >> I also tried to change compiler ID with >> "-DCMAKE_C_COMPILER_ID=Clang -DCMAKE_CXX_COMPILER_ID=Clang", >> then compilation succeeded, but linkage failed (just as >> described in the thread "Question on usage of cmake on >> Windows with clang" >> http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/54650). >> Here the problem seems to be reversed: GNU linker options are >> fed to MS linker. >> >> ************** Setup and details: >> 1) INCLUDE and PATH set to clang/clang-cl >> 2) command line environment is configured with vsvars32.bat >> 3) CC and CXX set to clang >> >> $ cat CMakeLists.txt >> project(test_project) >> add_executable(main file.cpp) >> >> $ cmake -G "Ninja" -DCMAKE_C_COMPILER=clang >> -DCMAKE_CXX_COMPILER=clang .. >> >> Log: >> -- The C compiler identification is unknown >> -- The CXX compiler identification is Clang 3.7.1 >> -- Check for working C compiler using: Ninja >> -- Check for working C compiler using: Ninja -- broken >> CMake Error at C:/Program >> Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 >> (message): >> The C compiler "D:/-Work-/llvm-3.7.1.src/-VS_build VS >> 2013-/Release/bin/clang.exe" is not able to compile a >> simple test program. >> It fails with the following output: >> Change Dir: >> D:/-Work-/llvm-3.7.1.src/-CLANG-/CMakeFiles/CMakeTmp >> >> Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_2cb9d" >> >> [1/2] Building C object >> CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj >> >> FAILED: >> D:\-Work-\LLVM-3~2.SRC\-VS_BU~2\Release\bin\clang.exe /DWIN32 >> /D_WINDOWS /W3 -o >> CMakeFiles\cmTC_2cb9d.dir\testCCompiler.c.obj -c >> testCCompiler.c >> >> clang.exe: error: no such file or directory: '/DWIN32' >> clang.exe: error: no such file or directory: '/D_WINDOWS' >> ... >> >> OS: Windows 7 (x64) >> >> clang version 3.7.1 (tags/RELEASE_371/final) >> Target: x86_64-pc-windows-msvc >> Thread model: posix >> >> cmake version 3.5.0-rc3 >> >> Thank you! >> >> -- >> Anton >> >> -- >> >> 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 >> > > > -- > Anton > -- Anton -------------- next part -------------- An HTML attachment was scrubbed... URL: From anton.yartsev at gmail.com Wed Mar 9 16:52:26 2016 From: anton.yartsev at gmail.com (Anton Yartsev) Date: Thu, 10 Mar 2016 00:52:26 +0300 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: <20160304123637.Horde.RG8oLdmm6tO1NSq6vmRxrkc@webmail.eikel.org> References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> <56D97E6F.5000902@Gmail.com> <20160304123637.Horde.RG8oLdmm6tO1NSq6vmRxrkc@webmail.eikel.org> Message-ID: <56E09B1A.1060309@Gmail.com> Hi Benjamin, thanks for the idea, tried to use simple paths, unfortunately it doesn't solved the problem. > the path to your compiler seems to have spaces in it. I had problems > on Windows with spaces or other special characters in the compiler > path, too. Please try to locate the compiler in another path and see > if it fixes your issue. If it does, maybe the CMake developers could > check the path escaping on Windows. > > Kind regards > Benjamin > -- Anton From dan at su-root.co.uk Wed Mar 9 17:26:04 2016 From: dan at su-root.co.uk (Dan Liew) Date: Wed, 9 Mar 2016 22:26:04 +0000 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: <56E099B3.1010206@Gmail.com> References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> <56E099B3.1010206@Gmail.com> Message-ID: > ------ check which cl.exe is used: > $which cl > D:\CL\cl.EXE > > ------ trying to build: > $cmake -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang .. If your goal is use your renamed clang-cl (cl.exe) then why are you telling CMake to use to use clang.exe ? You can clearly see if your error message that ``clang.exe`` is being invoked. Shouldn't your command line be something like this? CC=cl.exe CXX=cl.exe cmake -G "Ninja" .. If you want to be really specific you could do CC=D:\LLVM-3.7.1\bin\clang-cl.exe CXX=D:\LLVM-3.7.1\bin\clang-cl.exe cmake -G "Ninja" .. From anton.yartsev at gmail.com Wed Mar 9 18:48:47 2016 From: anton.yartsev at gmail.com (Anton Yartsev) Date: Thu, 10 Mar 2016 02:48:47 +0300 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> <56E099B3.1010206@Gmail.com> Message-ID: <56E0B65F.4060505@Gmail.com> Oops, sorry, confused with different variants. I've tried $SET CC=D:\LLVM-3.7.1\bin\clang-cl.exe $SET CXX=D:\LLVM-3.7.1\bin\clang-cl.exe $cmake -G "Ninja" .. Compilation succeeded, linkage has ended up with "clang-cl.exe: error: unable to execute command: program not executable". The same result with clang-cl.exe renamed to cl.exe. ------------------------------------------- output: -- The C compiler identification is Clang 3.7.1 -- The CXX compiler identification is Clang 3.7.1 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "D:/LLVM-3.7.1/bin/clang-cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/CMakeTmp Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_b1a57" [1/2] Building C object CMakeFiles\cmTC_b1a57.dir\testCCompiler.c.obj [2/2] Linking C executable cmTC_b1a57.exe FAILED: cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_b1a57.dir --manifests -- CMAKE_LINKER-NOTFOUND /nologo CMakeFiles\cmTC_b1a57.dir\testCCompiler.c.obj /out:cmTC_b1a57.exe /implib:cmTC_b1a57.lib /pdb:cmTC_b1a57.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." RC Pass 1 failed to run. ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. ------------------------------------------------ CMakeError.log Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: D:/LLVM-3.7.1/bin/clang-cl.exe Build flags: Id flags: The output was: 1 clang-cl.exe: error: unable to execute command: program not executable clang-cl.exe: error: linker command failed with exit code 1 (use -v to see invocation) Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: D:/LLVM-3.7.1/bin/clang-cl.exe Build flags: Id flags: The output was: 1 clang-cl.exe: error: unable to execute command: program not executable clang-cl.exe: error: linker command failed with exit code 1 (use -v to see invocation) Determining if the C compiler works failed with the following output: Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/CMakeTmp Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_2dff3" [1/2] Building C object CMakeFiles\cmTC_2dff3.dir\testCCompiler.c.obj [2/2] Linking C executable cmTC_2dff3.exe FAILED: cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_2dff3.dir --manifests -- C:\PROGRA~1\MICROS~2.0\VC\bin\link.exe /nologo CMakeFiles\cmTC_2dff3.dir\testCCompiler.c.obj /out:cmTC_2dff3.exe /implib:cmTC_2dff3.lib /pdb:cmTC_2dff3.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." RC Pass 1 failed to run. ninja: build stopped: subcommand failed. >> ------ check which cl.exe is used: >> $which cl >> D:\CL\cl.EXE >> >> ------ trying to build: >> $cmake -G "Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang .. > If your goal is use your renamed clang-cl (cl.exe) then why are you > telling CMake to use to use clang.exe ? > > You can clearly see if your error message that ``clang.exe`` is being invoked. > > Shouldn't your command line be something like this? > > CC=cl.exe CXX=cl.exe cmake -G "Ninja" .. > > If you want to be really specific you could do > > CC=D:\LLVM-3.7.1\bin\clang-cl.exe CXX=D:\LLVM-3.7.1\bin\clang-cl.exe > cmake -G "Ninja" .. -- Anton From mdrahos at aurisrobotics.com Wed Mar 9 20:38:39 2016 From: mdrahos at aurisrobotics.com (Miroslav Drahos) Date: Thu, 10 Mar 2016 01:38:39 +0000 Subject: [CMake] passing toolchain file with ExternalProjects_Add Message-ID: Hi folks, Trying to cross-compile, passing the toolchain as usual: cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/Toolchain.cmake <...> And forwarding CMAKE_TOOLCHAIN_FILE variable down to my external projects, like so: ExternalProject_Add(${app} # ... CMAKE_CACHE_ARGS -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE} # ... ) However this doesn't work as I expected. What is the proper way to pass the toolchain from a script (i.e. not from command line)? Thank you!! Miro -------------- next part -------------- An HTML attachment was scrubbed... URL: From cristian.adam at gmail.com Thu Mar 10 05:47:47 2016 From: cristian.adam at gmail.com (Cristian Adam) Date: Thu, 10 Mar 2016 11:47:47 +0100 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: <56E0B65F.4060505@Gmail.com> References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> <56E099B3.1010206@Gmail.com> <56E0B65F.4060505@Gmail.com> Message-ID: On Thu, Mar 10, 2016 at 12:48 AM, Anton Yartsev wrote: > Oops, sorry, confused with different variants. > > I've tried > $SET CC=D:\LLVM-3.7.1\bin\clang-cl.exe > $SET CXX=D:\LLVM-3.7.1\bin\clang-cl.exe > $cmake -G "Ninja" .. > > Compilation succeeded, linkage has ended up with "clang-cl.exe: error: > unable to execute command: program not executable". > The same result with clang-cl.exe renamed to cl.exe. > Hi Anton, My setup is: * Visual Studio 2013 x86 and amd64 * Clang 3.7.1 64 bit installed in c:\Program Files\LLVM\ * CMake 3.5.0 * Ninja 1.5.3 * C++ Hello World CMake project Visual Studio 2013 amd64 ==================== 1. Opened a command prompt and run "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 2. set INCLUDE=c:\Program Files\LLVM\lib\clang\3.7.1\include\;%INCLUDE% 3. set PATH=c:\Program Files\LLVM\msbuild-bin\;%PATH% 4. cmake -G "Ninja" ..\helloworldcmake CMake output was: $ cmake -G "Ninja" ..\helloworldcmake -- The C compiler identification is Clang 3.7.1 -- The CXX compiler identification is Clang 3.7.1 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - failed -- Configuring done -- Generating done -- Build files have been written to: C:/Projects/C++/helloworldcmake-build Visual Studio 2013 x86 ================= 1. Opened a command prompt and run "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 2. set INCLUDE=c:\Program Files\LLVM\lib\clang\3.7.1\include\;%INCLUDE% 3. set PATH=c:\Program Files\LLVM\msbuild-bin\;%PATH% 4. cmake -G "Ninja" ..\helloworldcmake CMake output was: $ cmake -G "Ninja" ..\helloworldcmake -- The C compiler identification is Clang 3.7.1 -- The CXX compiler identification is Clang 3.7.1 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- broken CMake Error at C:/Tools/cmake-3.5.0/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "C:/Program Files/LLVM/msbuild-bin/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Projects/C++/helloworldcmake-build/CMakeFiles/CMakeTmp Run Build Command:"C:/Tools/ninja/ninja.exe" "cmTC_89c35" [1/2] Building C object CMakeFiles\cmTC_89c35.dir\testCCompiler.c.obj [2/2] Linking C executable cmTC_89c35.exe FAILED: cmd.exe /C "cd . && C:\Tools\cmake-3.5.0\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_89c35.dir --manifests -- C:\PROGRA~2\MICROS~3.0\VC\bin\link.exe /nologo CMakeFiles\cmTC_89c35.dir\testCCompiler.c.obj /out:cmTC_89c35.exe /implib:cmTC_89c35.lib /pdb:cmTC_89c35.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." LINK : error LNK2001: unresolved external symbol mainCRTStartup cmTC_89c35.exe : fatal error LNK1120: 1 unresolved externals LINK Pass 1 failed. with 1120 ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:1 (project) -- Configuring incomplete, errors occurred! See also "C:/Projects/C++/helloworldcmake-build/CMakeFiles/CMakeOutput.log". See also "C:/Projects/C++/helloworldcmake-build/CMakeFiles/CMakeError.log". Clang people say that both Clang builds (32 or 64 bit) can compile both 32 and 64 bit applications. [1] As it turns out this statement is not completely true :) I've installed the 32 bit Clang 3.7.1 version to c:\Program Files (x86)\LLVM\ and tried again: Visual Studio 2013 x86 ================= 1. Opened a command prompt and run "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 2. set INCLUDE=c:\Program Files (x86)\LLVM\lib\clang\3.7.1\include\;%INCLUDE% 3. set PATH=c:\Program Files (x86)\LLVM\msbuild-bin\;%PATH% 4. cmake -G "Ninja" ..\helloworldcmake This time the CMake output was: $ cmake -G "Ninja" ..\helloworldcmake -- The C compiler identification is Clang 3.7.1 -- The CXX compiler identification is Clang 3.7.1 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - failed -- Configuring done -- Generating done -- Build files have been written to: C:/Projects/C++/helloworldcmake-build This means that you have to match your Visual C++ compiler with the Clang one! And as you can see, I didn't set any CC, CCX, CMAKE_C_COMPILER_ID or CMAKE_CXX_COMPILER_ID variables. Cheers, Cristian. [1] https://llvm.org/bugs/show_bug.cgi?id=26212#c5 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hegewald at awi.de Thu Mar 10 08:40:20 2016 From: jan.hegewald at awi.de (=?utf-8?Q?=F0=9F=90=8B_Jan_Hegewald?=) Date: Thu, 10 Mar 2016 14:40:20 +0100 Subject: [CMake] Create main and sub-projects; be able to compile them together and individually. In-Reply-To: References: <0B7D83FB-5FD4-4438-844B-807ED86DAD9D@awi.de> Message-ID: <5FE106F2-9855-45CA-BA25-FF3D9B6EF7B5@awi.de> Hi Muhammad, > On 08.03.2016, at 19:12, Muhammad Osama wrote: > > Hi Jan, > > Thank you for your reply, I am in the similar situation, have a very similar implementation using target_*** but since I don't do that for ALL the dependencies, I am unable to cmake or compile individual projects in the sub directories. So, few questions; Dos this mean you have CMakeLists without any targets? > > 1. This still requires me to run cmake on the root CMakeLists.txt to set the flags and what not before I run the sub project to make it correct? No. With the setup I mentioned you would be able to build everything if CMAKE_CURRENT_LIST_DIR is the root, or you could choose to build any of the other sub-dirs on their own. > 2. Another question is that your implementation, does it not include a config file? In theory you're copy pasting most of the dependencies in the CMakeLists.txt of root into the sub-dir ones? Is there a better way to do this? I think you are now talking of you original setup, not the one I proposed? Cheers, Jan From gilles.follic at sgcib.com Thu Mar 10 13:04:44 2016 From: gilles.follic at sgcib.com (FOLLIC Gilles) Date: Thu, 10 Mar 2016 18:04:44 +0000 Subject: [CMake] target_link_libraries from executable Message-ID: <6D594A7814710F46BBFFA389AC18857C040B055D@MMXDC2643.hermes.si.socgen> Hello, The idea is to get all the depedencies from an other project (executable). set_property(TARGET [EXECUTABLE] PROPERTY ENABLE_EXPORTS true) target_link_libraries(${PROJECT_NAME} [EXECUTABLE]) This works perfectly, as I get all the include, libs I need, but I get on my visual studio a new lib from my [EXECUTABLE], called [EXECUTABLE].lib which I don't need since it is a executable, not a librairy. How can I do to remove this lib? Thank you Gilles ************************************************************************* This message and any attachments (the "message") are confidential, intended solely for the addresse(s), and may contain legally privileged information. Any unauthorized use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. Please visit http://swapdisclosure.sgcib.com for important information with respect to derivative products. ************ Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes par le secret professionnel. Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. Veuillez consulter le site http://swapdisclosure.sgcib.com afin de recueillir d'importantes informations sur les produits derives. ************************************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From amalaye.oyake at jpl.nasa.gov Thu Mar 10 14:12:40 2016 From: amalaye.oyake at jpl.nasa.gov (Oyake, Amalaye (398F)) Date: Thu, 10 Mar 2016 19:12:40 +0000 Subject: [CMake] Building CMake on gcc 5.2.1 fails Message-ID: Hello, This is my first time posting here. My compilation of CMake failed on my system (Ubuntu 15.1/Wily with gcc 5.2.1). My configure claims that sstream is not there and the compilation failure seems to be related to this. I do have the gcc/g++ libraries installed ( ? a locate libstdc++ shows them). I would like to try to get around this issue. I have put the relevant information below. Any help would be appreciated. SYSTEM ENVIRONMENT ------------------ gtst at system1:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily COMPILER ENVIRONMENT -------------------- gtst at system1:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.2.1-22ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2) COMPILATION OUTPUT ------------------ /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1$ ./configure --------------------------------------------- CMake 2.8.12.1, Copyright 2000-2012 Kitware, Inc. Found GNU toolchain C compiler on this system is: gcc C++ compiler on this system is: g++ Makefile processor on this system is: gmake g++ is GNU compiler g++ has setenv g++ has unsetenv g++ does not have environ in stdlib.h g++ has STL in std:: namespace g++ has ANSI streams g++ has streams in std:: namespace g++ does not have sstream g++ does not have strstream.h g++ does not have strstrea.h g++ does not have operator!=(string, char*) g++ has stl iterator_traits g++ has standard template allocator g++ has allocator<>::rebind<> g++ does not have non-standard allocator<>::max_size argument g++ has stl containers supporting allocator objects g++ has header cstddef g++ requires template friends to use <> g++ supports member templates g++ has standard template specialization syntax g++ has argument dependent lookup g++ has struct stat with st_mtim member g++ has ios::binary openmode g++ has ANSI for scoping --------------------------------------------- In file included from /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmDocumentVariables.cxx:4:0: /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmsys/ios/sstream: In member function ?void cmsys_ios::istringstream::clear(int)?: /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmsys/ios/sstream:176:34: error: invalid conversion from ?int? to ?std::ios_base::iostate {aka std::_Ios_Iostate}? [-fpermissive] this->IStrStream::clear(flags); ^ In file included from /usr/include/c++/5/bits/basic_ios.h:516:0, from /usr/include/c++/5/ios:44, from /usr/include/c++/5/istream:38, from /usr/include/c++/5/fstream:38, from /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmStandardIncludes.h:84, from /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmSystemTools.h:15, from /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmake.h:16, from /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmDocumentVariables.cxx:2: /usr/include/c++/5/bits/basic_ios.tcc:41:5: note: initializing argument 1 of ?void std::basic_ios<_CharT, _Traits>::clear(std::ios_base::iostate) [with _CharT = char; _Traits = std::char_traits; std::ios_base::iostate = std::_Ios_Iostate]? basic_ios<_CharT, _Traits>::clear(iostate __state) ^ Makefile:126: recipe for target 'cmDocumentVariables.o' failed gmake: *** [cmDocumentVariables.o] Error 1 --------------------------------------------- Error when bootstrapping CMake: Problem while running gmake --------------------------------------------- Log of errors: /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmake_bootstrap.log ##### ----------- * Amalaye Oyake * * Instrument Product Software Development Group */\ * * Jet Propulsion Laboratory, Pasadena *|| * * CA 91109 818.393.7168 work 626.399.1707 cell /||\ * **************************************************^^*** -------------- next part -------------- An HTML attachment was scrubbed... URL: From winkus4u at arcor.de Thu Mar 10 17:41:11 2016 From: winkus4u at arcor.de (Winfried) Date: Thu, 10 Mar 2016 15:41:11 -0700 (MST) Subject: [CMake] 'make package': Is setting generators to different default paths possible? Message-ID: <1457649671989-7592978.post@n2.nabble.com> It's possible to invoke several CPack generators with one call of 'make package' by configuring in CMakeLists.txt: set(CPACK_GENERATOR "STGZ;TGZ;TZ;RPM;DEB") So far, so good! A generated package can and shall be relocatable. In other words: You can determine at package install time, **where** in the file system the content of the package shall be installed to. If you install the package without an explicit target location, the default value is used. Each CPack generator has it's own individual predefined default value (/usr for RPM, ...). " This default value may be overwritten from the CMakeLists.txt or the cpack command line by setting an alternative value. e.g. set(CPACK_PACKAGING_INSTALL_PREFIX ?/opt?) " ( ->doc of CPACK_PACKAGING_INSTALL_PREFIX) My question: It's not unusual that one package has different default locations for different distributions. So, is it possible to configure different default locations for RPM and DEB, so that one call of 'make package' can generate a .rpm package with default location '/opt/kde3' and a .deb package with default location '/usr/local/kde' ? My problem: When I tried set(CPACK_PACKAGING_INSTALL_PREFIX ?/opt/kde3?), 'cmake -DCMAKE_INSTALL_PREFIX=/opt/kde3 ..' ran normal, but 'make package' aborted with an error messages (repeated several times): CMake Error at /usr/share/cmake/Modules/CPackRPM.cmake:623 (file): file RELATIVE_PATH must be passed a full path to the directory: ?/opt/kde3? Call Stack (most recent call first): /usr/share/cmake/Modules/CPackRPM.cmake:1282 (cpack_rpm_prepare_relocation_paths) /usr/share/cmake/Modules/CPackRPM.cmake:1770 (cpack_rpm_generate_package) The code: # CPACK include(InstallRequiredSystemLibraries) set(CPACK_GENERATOR "STGZ;TGZ;TZ;RPM;DEB") set(CPACK_PACKAGING_INSTALL_PREFIX ?/opt/kde3?) #set(CPACK_SET_DESTDIR "ON") set(CPACK_PACKAGE_VERSION "${TuxMinds_VERSION}") set(CPACK_PACKAGE_VERSION_MAJOR "${TuxMinds_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${TuxMinds_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${TuxMinds_VERSION_PATCH}") set(CPACK_PACKAGE_NAME "${P_NAME}") set(CPACK_PACKAGE_FILE_NAME "${P_NAME}-${CPACK_PACKAGE_VERSION}-1.x86_64") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An easy to use GUI for robot programming and remote control tool") set(CPACK_PACKAGE_VENDOR "Winfried ") set(CPACK_PACKAGE_DESCRIPTION_FILE "${TuxMinds_SOURCE_DIR}/DESCRIPTION") set(CPACK_RESOURCE_FILE_LICENSE "${TuxMinds_SOURCE_DIR}/COPYING") # RPM #set(CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") done by default! #set(CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") done by default! #set(CPACK_RPM_PACKAGE_RELEASE "1") done by default, do alter if packaging errors have to be fixed! #set(CPACK_RPM_PACKAGE_RELEASE "2") activate, if the previous packaging was buggy and/or for fancy Linux distro specific numbering! #set(CPACK_RPM_PACKAGE_SUMMARY "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") done by default! #set(CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}") done by default! if(BUILD_X64) set(CPACK_RPM_PACKAGE_ARCH "x86_64") else(BUILD_X64) set(CPACK_RPM_PACKAGE_ARCH "i386") endif(BUILD_X64) set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}.${CPACK_RPM_PACKAGE_ARCH}.rpm") set(CPACK_RPM_PACKAGE_LICENSE "${CPACK_RESOURCE_FILE_LICENSE}") # DEB INCLUDE(CPack) Before trying set(CPACK_PACKAGING_INSTALL_PREFIX ?/opt/kde3?) I tried set(CPACK_SET_DESTDIR "ON"). Files in the package were in the right place but I was warned that the resulting .rpm package isn't relocatable anymore. -- View this message in context: http://cmake.3232098.n2.nabble.com/make-package-Is-setting-generators-to-different-default-paths-possible-tp7592978.html Sent from the CMake mailing list archive at Nabble.com. From anton.yartsev at gmail.com Thu Mar 10 17:44:41 2016 From: anton.yartsev at gmail.com (Anton Yartsev) Date: Fri, 11 Mar 2016 01:44:41 +0300 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> <56E099B3.1010206@Gmail.com> <56E0B65F.4060505@Gmail.com> Message-ID: <56E1F8D9.4020602@Gmail.com> > Hi Anton, > > My setup is: > > * Visual Studio 2013 x86 and amd64 > * Clang 3.7.1 64 bit installed in c:\Program Files\LLVM\ > * CMake 3.5.0 > * Ninja 1.5.3 > * C++ Hello World CMake project > > Visual Studio 2013 amd64 > ==================== > > 1. Opened a command prompt and run "C:\Program Files (x86)\Microsoft > Visual Studio 12.0\VC\vcvarsall.bat" amd64 > 2. set INCLUDE=c:\Program Files\LLVM\lib\clang\3.7.1\include\;%INCLUDE% > 3. set PATH=c:\Program Files\LLVM\msbuild-bin\;%PATH% > 4. cmake -G "Ninja" ..\helloworldcmake > CMake output was: > > $ cmake -G "Ninja" ..\helloworldcmake > -- The C compiler identification is Clang 3.7.1 > -- The CXX compiler identification is Clang 3.7.1 > -- Check for working C compiler using: Ninja > -- Check for working C compiler using: Ninja -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Check for working CXX compiler using: Ninja > -- Check for working CXX compiler using: Ninja -- works > -- Detecting CXX compiler ABI info > -- Detecting CXX compiler ABI info - done > -- Detecting CXX compile features > -- Detecting CXX compile features - failed > -- Configuring done > -- Generating done > -- Build files have been written to: > C:/Projects/C++/helloworldcmake-build > > Hi Cristian, Great thanks for your assistance! Now I see, that it is possible to use Clang. I've tried many different combinations of LLVM/ninja versions: ninja 1.5.3/1.6.0, LLVM x86/x64 prebuild and compiled from the scratch. Neither of this succeeded. I also managed to reproduce the linkage error "LINK : error LNK2001: unresolved external symbol mainCRTStartup" when VC++ and Clang mismatch. The best approach I got with the following setup: * Windows 7 x64 * Visual Studio 2013 Update 4 * Clang 3.7.1 x64 bit installed in D:\-Work-\LLVM_3.7.1_win64 * CMake 3.5.0 * Ninja 1.5.3 1) "C:\Program Files\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 2) SET INCLUDE=D:\-Work-\LLVM_3.7.1_win64\lib\clang\3.7.1\include;%INCLUDE% 3) SET PATH=D:\-Work-\LLVM_3.7.1_win64\msbuild-bin;%PATH% 4) cmake -G "Ninja" .. --------------------------------------------------- CMake output: -- The C compiler identification is Clang 3.7.1 -- The CXX compiler identification is Clang 3.7.1 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "D:/-Work-/LLVM_3.7.1_win64/msbuild-bin/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/CMakeTmp Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_6d431" [1/2] Building C object CMakeFiles\cmTC_6d431.dir\testCCompiler.c.obj [2/2] Linking C executable cmTC_6d431.exe FAILED: cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_6d431.dir --manifests -- C:\PROGRA~1\MICROS~2.0\VC\bin\link.exe /nologo CMakeFiles\cmTC_6d431.dir\testCCompiler.c.obj /out:cmTC_6d431.exe /implib:cmTC_6d431.lib /pdb:cmTC_6d431.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." RC Pass 1 failed to run. ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:1 (project) -- Configuring incomplete, errors occurred! See also "D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/CMakeOutput.log". See also "D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/CMakeError.log". --------------------------------------------------- CMakeError.log Determining if the C compiler works failed with the following output: Change Dir: D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/CMakeTmp Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_6d431" [1/2] Building C object CMakeFiles\cmTC_6d431.dir\testCCompiler.c.obj [2/2] Linking C executable cmTC_6d431.exe FAILED: cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_6d431.dir --manifests -- C:\PROGRA~1\MICROS~2.0\VC\bin\link.exe /nologo CMakeFiles\cmTC_6d431.dir\testCCompiler.c.obj /out:cmTC_6d431.exe /implib:cmTC_6d431.lib /pdb:cmTC_6d431.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." RC Pass 1 failed to run. ninja: build stopped: subcommand failed. --------------------------------------------------- CMakeOutput.log The system is: Windows - 6.1.7601 - AMD64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: D:/-Work-/LLVM_3.7.1_win64/msbuild-bin/cl.exe Build flags: Id flags: The output was: 0 Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.exe" The C compiler identification is Clang, found in "D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/3.5.0/CompilerIdC/CMakeCCompilerId.exe" Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: D:/-Work-/LLVM_3.7.1_win64/msbuild-bin/cl.exe Build flags: Id flags: The output was: 0 Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.exe" The CXX compiler identification is Clang, found in "D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/3.5.0/CompilerIdCXX/CMakeCXXCompilerId.exe" ---------------------------------------------------------------------------- If I understand correctly Clang managed to build the test file. But build failed for unknown reason.. Have no idea what is wrong. Could you, please, show me the contents your CMakeCache.txt left from the successful x64 cmake build? > And as you can see, I didn't set any CC, CCX, CMAKE_C_COMPILER_ID or > CMAKE_CXX_COMPILER_ID variables. I had to set CC and CXX when MinGW was in PATH, now I removed MinGW from PATH to reduce influencing factors. -- Anton -------------- next part -------------- An HTML attachment was scrubbed... URL: From mluparu at microsoft.com Thu Mar 10 21:14:38 2016 From: mluparu at microsoft.com (Marian Luparu) Date: Fri, 11 Mar 2016 02:14:38 +0000 Subject: [CMake] CMake IDE integration survey (was RE: Visual Studio + Ninja?) Message-ID: Lead PM for the VC++ team at Microsoft here. I just wanted to echo Nagy-Egri?s message. We are very interested in learning more about your current edit-build-debug experience for C++ apps or libs using CMake. Whether you?re developing on Windows or not, using VS or not today, we do want to hear from you on how the IDE integration for CMake projects can be improved. We are currently running a survey (short!) for that purpose. If you have a few minutes to complete it, Thank You!, your feedback is important to us. From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Nagy-Egri M?t? Ferenc via CMake Sent: Monday, March 7, 2016 1:19 AM To: Robert Dailey ; CMake Subject: Re: [CMake] Visual Studio + Ninja? Short version: no. Long version: Visual Studio is heavily built around MSBuild as the back-end of execution of various tasks. While theoretically it could be done that MSBuild only acts as a relay and calls into Ninja scripts, you would lose the entire feature set of Solution Explorer, which is quite a large portion of the IDE. (Using CMake does preclude using most of it though.) MS is looking into deeper CMake integration into their IDE, but the exec back-end will most likely be MSBuild. Should you really want to achieve this, you would need support from both CMake side and VS side. You would need to develop an Add-In with a custom project type (CMake+Ninja) and hook up most Solution Explorer entries to generate not MSBuild but Ninja script portions. And from CMake you would need a generator for this mixed generator type. It could be done, but it?s a lot of effort. Given the performance of MSBuild (which is not that bad compared to Ninja), the benefits would only be substantial in enourmous projects. MS generally looks into increasing build throughput by integrating IncrediBuild into their IDE. Felad?: Robert Dailey Elk?ldve: 2016. m?rcius 2., szerda 21:45 C?mzett: CMake T?rgy: [CMake] Visual Studio + Ninja? Right now I am using a toolchain file to setup cmake to build my C++ code against Android NDK. I also have several custom targets for running 'ant' commands for the java portions. I can use the Ninja generator to generate the build scripts to make my builds work fine. However, I'd love to be able to use Visual Studio on Windows as my IDE. However, there is no "Visual Studio - Ninja" generator that I can see. Is there a way to make Visual Studio wrap the Ninja scripts and simply execute them? that way I can use it to edit code and invoke builds. Thanks in advance. -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.noulard at gmail.com Fri Mar 11 01:25:56 2016 From: eric.noulard at gmail.com (Eric Noulard) Date: Fri, 11 Mar 2016 07:25:56 +0100 Subject: [CMake] 'make package': Is setting generators to different default paths possible? In-Reply-To: <1457649671989-7592978.post@n2.nabble.com> References: <1457649671989-7592978.post@n2.nabble.com> Message-ID: 2016-03-10 23:41 GMT+01:00 Winfried : > It's possible to invoke several CPack generators with one call of 'make > package' by configuring in CMakeLists.txt: > set(CPACK_GENERATOR "STGZ;TGZ;TZ;RPM;DEB") > So far, so good! > > A generated package can and shall be relocatable. In other words: You can > determine at package install time, **where** in the file system the content > of the package shall be installed to. > If you install the package without an explicit target location, the default > value is used. Each CPack generator has it's own individual predefined > default value (/usr for RPM, ...). > " This default value may be overwritten from the CMakeLists.txt or the > cpack > command line by setting an alternative value. > e.g. set(CPACK_PACKAGING_INSTALL_PREFIX ?/opt?) " ( ->doc of > CPACK_PACKAGING_INSTALL_PREFIX) > > My question: > It's not unusual that one package has different default locations for > different distributions. > So, is it possible to configure different default locations for RPM and > DEB, > so that one call of 'make package' can generate a .rpm package with default > location '/opt/kde3' and a .deb package with default location > '/usr/local/kde' ? > Yes it is. The more general way to do that is to use a CPACK_PROJECT_CONFIG_FILE. The specified file will be included **at CPack time** once **for each** CPack generator so that you check the currently running CPack generator and do whatever specific setting you want. See documentation on how it works here: https://cmake.org/cmake/help/v3.0/module/CPack.html and an example there: http://stackoverflow.com/questions/30937317/cpack-cmake-different-installation-prefixes-per-cpack-generator > My problem: > When I tried set(CPACK_PACKAGING_INSTALL_PREFIX ?/opt/kde3?), 'cmake > -DCMAKE_INSTALL_PREFIX=/opt/kde3 ..' ran normal, but 'make package' aborted > with an error messages (repeated several times): > [...] > > > INCLUDE(CPack) > > Before trying set(CPACK_PACKAGING_INSTALL_PREFIX ?/opt/kde3?) I tried > set(CPACK_SET_DESTDIR "ON"). > Files in the package were in the right place but I was warned that the > resulting .rpm package isn't relocatable anymore. > CPackRPM is playing with CPACK_SET_DESTDIR internally in order to be able to build relocatable RPM whilst keeping the possibility to have absolutely installed file like /etc/whatever.conf. So if you set CPACK_SET_DESTDIR to ON then CPackRPM stop being able to play with that. If you want to play gently with relocation and CPackRPM you can have a look at: CPACK_RPM__PACKAGE_PREFIX CPACK_RPM_RELOCATION_PATHS CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION CPACK_RPM_NO__INSTALL_PREFIX_RELOCATION Again the best way to do generator specific config with CPack is to use CPACK_PROJECT_CONFIG_FILE. You'll find attached an excerpt of an outdated CMake tutorial ( https://github.com/TheErk/CMake-tutorial) which explain when things takes place. This is important to notice that CMake runs way before CPack runs. Moreover CPack was designed to possibly be used without CMake so you can not always "program" things you want for CPack in your CMakeLists.txt. I hope this will help you to do what you want -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CMake-workflow-sumarized.pdf Type: application/pdf Size: 200640 bytes Desc: not available URL: From petr.kmoch at gmail.com Fri Mar 11 02:33:56 2016 From: petr.kmoch at gmail.com (Petr Kmoch) Date: Fri, 11 Mar 2016 08:33:56 +0100 Subject: [CMake] target_link_libraries from executable In-Reply-To: <6D594A7814710F46BBFFA389AC18857C040B055D@MMXDC2643.hermes.si.socgen> References: <6D594A7814710F46BBFFA389AC18857C040B055D@MMXDC2643.hermes.si.socgen> Message-ID: Hi Gilles, I don't think you can get rid of this .lib, which is the import library. Linking in the .exe/.dll world does not use the .exe or .dll file itself as the item to be linked against, but its import library (.lib) instead. You cannot link against a .dll if you only have the .dll, you need its import library. The same holds true for executables. So if you want to link against a.exe, you need its a.lib import library. Petr On Thu, Mar 10, 2016 at 7:04 PM, FOLLIC Gilles wrote: > Hello, > > > > The idea is to get all the depedencies from an other project (executable). > > > > set_property(TARGET [EXECUTABLE] PROPERTY ENABLE_EXPORTS true) > > target_link_libraries(${PROJECT_NAME} [EXECUTABLE]) > > > > This works perfectly, as I get all the include, libs I need, but I get on > my > > visual studio a new lib from my [EXECUTABLE], called [EXECUTABLE].lib which > > I don't need since it is a executable, not a librairy. > > > > How can I do to remove this lib? > > > > Thank you > > > > Gilles > > > > ************************************************************************* > This message and any attachments (the "message") are confidential, > intended solely for the addresse(s), and may contain legally privileged > information. > Any unauthorized use or dissemination is prohibited. E-mails are > susceptible to alteration. > Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall > be liable for the message if altered, changed or > falsified. > Please visit http://swapdisclosure.sgcib.com for important information > with respect to derivative products. > ************ > Ce message et toutes les pieces jointes (ci-apres le "message") sont > confidentiels et susceptibles de contenir des informations couvertes > par le secret professionnel. > Ce message est etabli a l'intention exclusive de ses destinataires. Toute > utilisation ou diffusion non autorisee est interdite. > Tout message electronique est susceptible d'alteration. > La SOCIETE GENERALE et ses filiales declinent toute responsabilite au > titre de ce message s'il a ete altere, deforme ou falsifie. > Veuillez consulter le site http://swapdisclosure.sgcib.com afin de > recueillir d'importantes informations sur les produits derives. > ************************************************************************* > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.wueger at gmx.at Fri Mar 11 02:41:09 2016 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Fri, 11 Mar 2016 08:41:09 +0100 Subject: [CMake] CPack includes WINTRUST.DLL Message-ID: Hello, i noticed that CPack includes the WINTRUST.dll when I generate an NSIS installer. How can I avoid this? I have no dependencies to this library. The problem is that the application doesn't work on older Windows versions with this dll. If I remove the dll after installation then everything is working fine. Thanks in advance Best regards Romab From brad.king at kitware.com Fri Mar 11 08:25:59 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Mar 2016 08:25:59 -0500 Subject: [CMake] [cmake-developers] CPack includes WINTRUST.DLL In-Reply-To: References: Message-ID: <56E2C767.5040001@kitware.com> On 03/11/2016 02:41 AM, Roman W?ger wrote: > i noticed that CPack includes the WINTRUST.dll when I > generate an NSIS installer. > How can I avoid this? > I have no dependencies to this library. CMake has no mention of that dll in its source so we are not adding the dependency explicitly anywhere. Are you using fixup_bundle? That may somehow think this dependency is needed. -Brad From robert.maynard at kitware.com Fri Mar 11 09:51:13 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Fri, 11 Mar 2016 09:51:13 -0500 Subject: [CMake] Building CMake on gcc 5.2.1 fails In-Reply-To: References: Message-ID: Have you tried building a newer version of CMake? I expect issues like these have been resolved in the 30+ months since 2.8.12 was released. On Thu, Mar 10, 2016 at 2:12 PM, Oyake, Amalaye (398F) wrote: > Hello, > > This is my first time posting here. > > My compilation of CMake failed on my system (Ubuntu 15.1/Wily with gcc > 5.2.1). My configure claims that sstream is not there and the compilation > failure seems to be related to this. I do have the gcc/g++ libraries > installed ( ? a locate libstdc++ shows them). > > I would like to try to get around this issue. I have put the relevant > information below. Any help would be appreciated. > > > SYSTEM ENVIRONMENT > ------------------ > > gtst at system1:~$ lsb_release -a > No LSB modules are available. > Distributor ID: Ubuntu > Description: Ubuntu 15.10 > Release: 15.10 > Codename: wily > > > COMPILER ENVIRONMENT > -------------------- > > gtst at system1:~$ gcc -v > Using built-in specs. > COLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper > Target: x86_64-linux-gnu > Configured with: ../src/configure -v --with-pkgversion='Ubuntu > 5.2.1-22ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs > --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr > --program-suffix=-5 --enable-shared --enable-linker-build-id > --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix > --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu > --enable-libstdcxx-debug --enable-libstdcxx-time=yes > --with-default-libstdcxx-abi=new --enable-gnu-unique-object > --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib > --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo > --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home > --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 > --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 > --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar > --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 > --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib > --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu > --host=x86_64-linux-gnu --target=x86_64-linux-gnu > Thread model: posix > gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2) > > > COMPILATION OUTPUT > ------------------ > > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1$ > ./configure > --------------------------------------------- > CMake 2.8.12.1, Copyright 2000-2012 Kitware, Inc. > Found GNU toolchain > C compiler on this system is: gcc > C++ compiler on this system is: g++ > Makefile processor on this system is: gmake > g++ is GNU compiler > g++ has setenv > g++ has unsetenv > g++ does not have environ in stdlib.h > g++ has STL in std:: namespace > g++ has ANSI streams > g++ has streams in std:: namespace > g++ does not have sstream > g++ does not have strstream.h > g++ does not have strstrea.h > g++ does not have operator!=(string, char*) > g++ has stl iterator_traits > g++ has standard template allocator > g++ has allocator<>::rebind<> > g++ does not have non-standard allocator<>::max_size argument > g++ has stl containers supporting allocator objects > g++ has header cstddef > g++ requires template friends to use <> > g++ supports member templates > g++ has standard template specialization syntax > g++ has argument dependent lookup > g++ has struct stat with st_mtim member > g++ has ios::binary openmode > g++ has ANSI for scoping > --------------------------------------------- > > > In file included from > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmDocumentVariables.cxx:4:0: > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmsys/ios/sstream: > In member function ?void cmsys_ios::istringstream::clear(int)?: > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmsys/ios/sstream:176:34: > error: invalid conversion from ?int? to ?std::ios_base::iostate {aka > std::_Ios_Iostate}? [-fpermissive] > this->IStrStream::clear(flags); > ^ > In file included from /usr/include/c++/5/bits/basic_ios.h:516:0, > from /usr/include/c++/5/ios:44, > from /usr/include/c++/5/istream:38, > from /usr/include/c++/5/fstream:38, > from > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmStandardIncludes.h:84, > from > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmSystemTools.h:15, > from > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmake.h:16, > from > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmDocumentVariables.cxx:2: > /usr/include/c++/5/bits/basic_ios.tcc:41:5: note: initializing argument 1 > of ?void std::basic_ios<_CharT, _Traits>::clear(std::ios_base::iostate) > [with _CharT = char; _Traits = std::char_traits; > std::ios_base::iostate = std::_Ios_Iostate]? > basic_ios<_CharT, _Traits>::clear(iostate __state) > ^ > Makefile:126: recipe for target 'cmDocumentVariables.o' failed > gmake: *** [cmDocumentVariables.o] Error 1 > --------------------------------------------- > Error when bootstrapping CMake: > Problem while running gmake > --------------------------------------------- > Log of errors: > /home/gtst/devcode/os/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmake_bootstrap.log > > > ##### > > ----------- > * Amalaye Oyake * > * Instrument Product Software Development Group */\ * > * Jet Propulsion Laboratory, Pasadena *|| * > * CA 91109 818.393.7168 work 626.399.1707 cell /||\ * > **************************************************^^*** > > > -- > > 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 From ggarra13 at gmail.com Fri Mar 11 10:19:15 2016 From: ggarra13 at gmail.com (Gonzalo) Date: Fri, 11 Mar 2016 12:19:15 -0300 Subject: [CMake] Building CMake on gcc 5.2.1 fails In-Reply-To: References: Message-ID: <56E2E1F3.7060401@gmail.com> El 10/03/16 a las 16:12, Oyake, Amalaye (398F) escribi?: > Hello > > This is my first time posting here Welcome. > > My compilation of CMake failed on my system (Ubuntu 15.1/Wily with gcc > 5.2.1). My configure claims that sstream is not there and the > compilation failure seems to be related to this. I do have the gcc/g++ > libraries installed ( ? a locate libstdc++ shows them). You are missing the headers to the libraries. Do a locate sstream. It should appear like: /usr/include/c++/5.2/sstream If it does not show up you need to apt-get the -dev versions of the libraries. -- Gonzalo Garramu?o ggarra13 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott at towel42.com Fri Mar 11 12:06:38 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Fri, 11 Mar 2016 17:06:38 +0000 Subject: [CMake] CMake IDE integration survey (was RE: Visual Studio + Ninja?) In-Reply-To: References: Message-ID: The number one thing I would love to see for CMake + Visual Studio is the ability to create a Win64 and Win32 from the same project. Scott From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Marian Luparu Sent: Thursday, March 10, 2016 6:15 PM To: cmake at cmake.org Subject: [CMake] CMake IDE integration survey (was RE: Visual Studio + Ninja?) Lead PM for the VC++ team at Microsoft here. I just wanted to echo Nagy-Egri?s message. We are very interested in learning more about your current edit-build-debug experience for C++ apps or libs using CMake. Whether you?re developing on Windows or not, using VS or not today, we do want to hear from you on how the IDE integration for CMake projects can be improved. We are currently running a survey (short!) for that purpose. If you have a few minutes to complete it, Thank You!, your feedback is important to us. From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Nagy-Egri M?t? Ferenc via CMake Sent: Monday, March 7, 2016 1:19 AM To: Robert Dailey >; CMake > Subject: Re: [CMake] Visual Studio + Ninja? Short version: no. Long version: Visual Studio is heavily built around MSBuild as the back-end of execution of various tasks. While theoretically it could be done that MSBuild only acts as a relay and calls into Ninja scripts, you would lose the entire feature set of Solution Explorer, which is quite a large portion of the IDE. (Using CMake does preclude using most of it though.) MS is looking into deeper CMake integration into their IDE, but the exec back-end will most likely be MSBuild. Should you really want to achieve this, you would need support from both CMake side and VS side. You would need to develop an Add-In with a custom project type (CMake+Ninja) and hook up most Solution Explorer entries to generate not MSBuild but Ninja script portions. And from CMake you would need a generator for this mixed generator type. It could be done, but it?s a lot of effort. Given the performance of MSBuild (which is not that bad compared to Ninja), the benefits would only be substantial in enourmous projects. MS generally looks into increasing build throughput by integrating IncrediBuild into their IDE. Felad?: Robert Dailey Elk?ldve: 2016. m?rcius 2., szerda 21:45 C?mzett: CMake T?rgy: [CMake] Visual Studio + Ninja? Right now I am using a toolchain file to setup cmake to build my C++ code against Android NDK. I also have several custom targets for running 'ant' commands for the java portions. I can use the Ninja generator to generate the build scripts to make my builds work fine. However, I'd love to be able to use Visual Studio on Windows as my IDE. However, there is no "Visual Studio - Ninja" generator that I can see. Is there a way to make Visual Studio wrap the Ninja scripts and simply execute them? that way I can use it to edit code and invoke builds. Thanks in advance. -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From amalaye.oyake at jpl.nasa.gov Fri Mar 11 13:24:08 2016 From: amalaye.oyake at jpl.nasa.gov (Oyake, Amalaye (398F)) Date: Fri, 11 Mar 2016 18:24:08 +0000 Subject: [CMake] Building CMake on gcc 5.2.1 fails In-Reply-To: <56E2E1F3.7060401@gmail.com> References: <56E2E1F3.7060401@gmail.com> Message-ID: Hello Gonzalo, Thank you for your reply. A locate does show the following ? /usr/include/c++/5/sstream /usr/include/c++/5/bits/sstream.tcc I am still poking around and looking into it. Regards, ----------- * Amalaye Oyake * * Instrument Product Software Development Group */\ * * Jet Propulsion Laboratory, Pasadena *|| * * CA 91109 /||\ * **************************************************^^*** From: CMake > on behalf of Gonzalo > Date: Friday, March 11, 2016 at 7:19 AM To: "cmake at cmake.org" > Subject: Re: [CMake] Building CMake on gcc 5.2.1 fails El 10/03/16 a las 16:12, Oyake, Amalaye (398F) escribi?: Hello This is my first time posting here Welcome. My compilation of CMake failed on my system (Ubuntu 15.1/Wily with gcc 5.2.1). My configure claims that sstream is not there and the compilation failure seems to be related to this. I do have the gcc/g++ libraries installed ( ? a locate libstdc++ shows them). You are missing the headers to the libraries. Do a locate sstream. It should appear like: /usr/include/c++/5.2/sstream If it does not show up you need to apt-get the -dev versions of the libraries. -- Gonzalo Garramu?o ggarra13 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From amalaye.oyake at jpl.nasa.gov Fri Mar 11 17:19:53 2016 From: amalaye.oyake at jpl.nasa.gov (Oyake, Amalaye (398F)) Date: Fri, 11 Mar 2016 22:19:53 +0000 Subject: [CMake] Building CMake on gcc 5.2.1 fails In-Reply-To: <56E2E1F3.7060401@gmail.com> References: <56E2E1F3.7060401@gmail.com> Message-ID: Hello, I would like to CLOSE this issue. I was building an embedded environment for a small Xilinx Zynq board (which includes Cmake). The steps call for setting up some Xilinx environment variables (through a script). Some how this messed up the include paths for g++. Without doing this, it builds fine under gcc 5.2.1. I will now focus on the build environment for the board and see what is out of step. Please consider this issue closed. Regards, ----------- * Amalaye Oyake * * Instrument Product Software Development Group */\ * * Jet Propulsion Laboratory, Pasadena *|| * * CA 91109 /||\ * **************************************************^^*** From: CMake > on behalf of Gonzalo > Date: Friday, March 11, 2016 at 7:19 AM To: "cmake at cmake.org" > Subject: Re: [CMake] Building CMake on gcc 5.2.1 fails El 10/03/16 a las 16:12, Oyake, Amalaye (398F) escribi?: Hello This is my first time posting here Welcome. My compilation of CMake failed on my system (Ubuntu 15.1/Wily with gcc 5.2.1). My configure claims that sstream is not there and the compilation failure seems to be related to this. I do have the gcc/g++ libraries installed ( ? a locate libstdc++ shows them). You are missing the headers to the libraries. Do a locate sstream. It should appear like: /usr/include/c++/5.2/sstream If it does not show up you need to apt-get the -dev versions of the libraries. -- Gonzalo Garramu?o ggarra13 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pfultz2 at yahoo.com Sat Mar 12 13:48:32 2016 From: pfultz2 at yahoo.com (paul Fultz) Date: Sat, 12 Mar 2016 18:48:32 +0000 (UTC) Subject: [CMake] cget: cmake package retrieval References: <288900680.267075.1457808512652.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <288900680.267075.1457808512652.JavaMail.yahoo@mail.yahoo.com> Hello All, I have written a tool that I didn't know if people in the CMake community might be interested in, called CGet that will retrieve and install packages with CMake: https://github.com/pfultz2/cget This will download a package and run the CMake build and install on the package. It can even download the dependencies if they are listed in a requirements.txt. Also, it doesn't require changes to the CMake to integrate with CGet. So it can already install lots of packages already. For example, the ZLib library can be installed directly like this: cget install http://zlib.net/zlib-1.2.8.tar.gz Tests for a CMake package can be ran as well: cget install --test http://zlib.net/zlib-1.2.8.tar.gz In the future, I am planning to support the idea of "channels". A channel is a list of CMake packages but provides additional metadata about the package such as version number, or checksums. This will allow better versioning constraints when using packages. Any feedback or comments about this would be great. Thanks, Paul From pfultz2 at yahoo.com Sat Mar 12 16:27:46 2016 From: pfultz2 at yahoo.com (paul Fultz) Date: Sat, 12 Mar 2016 21:27:46 +0000 (UTC) Subject: [CMake] cget: cmake package retrieval In-Reply-To: References: Message-ID: <1246926448.309326.1457818066139.JavaMail.yahoo@mail.yahoo.com> On Saturday, March 12, 2016 1:57 PM, Elizabeth Fischer wrote: > > >Paul, >See Spack. >http://github. com/llnl/spack That looks pretty cool, and its build-independent. With cget I used cmake to manage the configuration of the toolchain because its quite mature. Spack creates its own system. It might be possible to create mappers to map cmake's toolchain settings over to another build system, thus cget could support other build systems as well. Although, this is very similar to generators. Also, Spack seems to be somewhat centralized. To get a third-party library the user would need to create a package first, whereas cget will install the package directly from the url with no intermediate step. Paul From roman.wueger at gmx.at Sat Mar 12 17:19:34 2016 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Sat, 12 Mar 2016 23:19:34 +0100 Subject: [CMake] [cmake-developers] CPack includes WINTRUST.DLL In-Reply-To: <56E2C767.5040001@kitware.com> References: <56E2C767.5040001@kitware.com> Message-ID: Yes, i use fixup_bundle. Is there a better alternative? Regards > Am 11.03.2016 um 14:25 schrieb Brad King : > >> On 03/11/2016 02:41 AM, Roman W?ger wrote: >> i noticed that CPack includes the WINTRUST.dll when I >> generate an NSIS installer. >> How can I avoid this? >> I have no dependencies to this library. > > CMake has no mention of that dll in its source so we are not adding > the dependency explicitly anywhere. Are you using fixup_bundle? > That may somehow think this dependency is needed. > > -Brad > From mirrownight at gmail.com Sat Mar 12 17:46:35 2016 From: mirrownight at gmail.com (mirrownight) Date: Sun, 13 Mar 2016 06:46:35 +0800 Subject: [CMake] Failed to configure ITK with CMake Visual Studio 2012 Message-ID: I failed to configure ITK on Windows 7 using CMake compiled with Visual Studio 2012. The link bellow is a zip file containing the error codes and screen capture. https://www.dropbox.com/s/63uktkppfw0pjv0/Fail.7z?dl=0 Detailed environment information: ** Windows 7 Professional x64 ** CMake 3.5.0 ** ITK 4.9.0 ** Visual Studio 11 2012 I followed the operation in the vedio bellow, https://www.youtube.com/watch?v=vZOMu5YSfoI but used different versions of the programs. (I thought that's not the problem.) I've searched other posts on this and other forums. And tried the followings: 1. Download the patches for Visual Studio 2012 Professional. 2. Use the other version of CMake, ITK and Visual Studio. (ex. CMake 3.0, ITK 4.8.2 and Visual Studio 2015) but still failed. Any help is going to be appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at klingt.org Sun Mar 13 00:21:32 2016 From: tim at klingt.org (Tim Blechmann) Date: Sun, 13 Mar 2016 13:21:32 +0800 Subject: [CMake] CMake IDE integration survey (was RE: Visual Studio + Ninja?) In-Reply-To: References: Message-ID: > Lead PM for the VC++ team at Microsoft here. I just wanted to echo > Nagy-Egri?s message. > > > > We are very interested in learning more about your current > edit-build-debug experience for C++ apps or libs using CMake. Whether > you?re developing on Windows or not, using VS or not today, we do want > to hear from you on how the IDE integration for CMake projects can be > improved. it is currently not possible to generate driver projects from cmake. for one project i have to use an arcane workflow of generating vsprops files from cmake and import them into a native visual studio solution to build the driver. it would be great if these msvc-specific targets with the driver specific options could be generated from cmake (PlatformToolset: WindowsKernelModeDriver8.1, ConfigurationType: Driver, DriverType: KMDF). cheers, tim From christian.froestl at ssw-trading.com Mon Mar 14 10:42:56 2016 From: christian.froestl at ssw-trading.com (=?iso-8859-1?Q?Christian_Fr=F6stl?=) Date: Mon, 14 Mar 2016 14:42:56 +0000 Subject: [CMake] error bulding cmake-3.4.3 on SL6.4 Message-ID: <530C4E2C6192F9449318DB0D8684619C40E888D0@skinner.iathh.local> Hi, If I build cmake 3.4.3 on SL 3.4 with the attached .spec file I always get the following error message at Test 8, kwsys.testSystemTools. test 8 Start 8: kwsys.testSystemTools 8: Test command: /root/rpmbuild/BUILD/cmake-3.4.3/build/Source/kwsys/cmsysTestsCxx "testSystemTools" 8: Test timeout computed to be: 1500 8: TestFileAccess incorrectly indicated that this is a writable file:/root/rpmbuild/BUILD/cmake-3.4.3/build/Source/kwsys/testSystemToolsNewDir/testNewFile.txt 9/416 Test #8: kwsys.testSystemTools ............................***Failed 0.01 sec Do you have any idea how to fix this? Do you need any further informations? Kind regards, Christian [SSW] SSW-Trading GmbH fon: +49(0)40 607708 547 eMail: christian.froestl at ssw-trading.com Am Knick 4 22113 Oststeinbek, Germany Gesch?ftsf?hrer Peter Vorrath Georg von Wiedebach Gesellschaftssitz: Oststeinbek Registergericht: L?beck | Registernummer: HRB 7869HL -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 13227 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cmake.spec Type: application/octet-stream Size: 33671 bytes Desc: cmake.spec URL: From brad.king at kitware.com Mon Mar 14 10:58:50 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Mar 2016 10:58:50 -0400 Subject: [CMake] [cmake-developers] CPack includes WINTRUST.DLL In-Reply-To: References: <56E2C767.5040001@kitware.com> Message-ID: <56E6D1AA.9000609@kitware.com> On 03/12/2016 05:19 PM, Roman W?ger wrote: > Yes, i use fixup_bundle. > Is there a better alternative? No, but you'll have to trace through its execution to see where it picks up the dependency on wintrust.dll. -Brad From barry at barrys-emacs.org Mon Mar 14 10:44:16 2016 From: barry at barrys-emacs.org (Barry Scott) Date: Mon, 14 Mar 2016 14:44:16 +0000 Subject: [CMake] Cmake fails to build libssh2 - wants VC 2010 told for VC 2015 build Message-ID: <20160314144416.000036db@barrys-emacs.org> Windows 10 with Cmake 3.4.3 or 3.5.0. I have the following Visual C versions installed. Microsoft Visual Studio 14.0 Microsoft Visual Studio 12.0 Microsoft Visual Studio 11.0 Visual C++ for Python I use the following script to build libssh2: setlocal set VER=1.7.0 call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" set PATH="c:\Program Files (x86)\CMake\bin";%PATH% if exist libssh2-%VER% rmdir /s /q libssh2-%VER% c:\unxutils\zcat libssh2-%VER%.tar.gz | c:\unxutils\tar xf - pushd libssh2-%VER% mkdir build.Release pushd build.Release rem configure cmake -G "Visual Studio 14 2015 Win64" .. -DOPENSSL_ROOT_DIR=c:\OpenSource64 rem build cmake --build . --config RelWithDebugInfo popd popd endlocal Cmake fails with: Build FAILED. "C:\Users\barry\Work\libssh2-1.7.0\build.Release\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users\barry\Work\libssh2-1.7.0\build.Release\ZERO_CHECK.vcxproj" (default target) (2) -> (PlatformPrepareForBuild target) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using th e v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\barry\Work\libssh2-1.7.0\build.Release\ZERO_CHECK.vcxproj] 0 Warning(s) 1 Error(s) Why is CMAKE trying to use anything from VC 2010? Can I work around this bug? Removing VC 2010 is reasonable workaround. Barry From asimmons at sensoryinc.com Mon Mar 14 13:11:26 2016 From: asimmons at sensoryinc.com (Aaron Simmons) Date: Mon, 14 Mar 2016 11:11:26 -0600 Subject: [CMake] can't generate WindowsPhone 8.1 projects Message-ID: With this CMakeLists.txt: cmake_minimum_required(VERSION 3.5.0) project(TestLib) and this command: cmake .. -G "Visual Studio 14 2015 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 I get this output: -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found. Oddly, using WindowsPhone/8.0 or WindowsStore/10.0 works. I'm not sure how to debug this problem. Any pointers? Thanks, aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From asimmons at sensoryinc.com Mon Mar 14 13:30:50 2016 From: asimmons at sensoryinc.com (Aaron Simmons) Date: Mon, 14 Mar 2016 11:30:50 -0600 Subject: [CMake] can't generate WindowsPhone 8.1 projects In-Reply-To: References: Message-ID: In the successful case, I printed out CMAKE_C_COMPILER and found that its pointing to C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/WPSDK/WP80/bin/x86_arm/cl.exe even though I'm using the generator for "Visual Studio 14 2015 ARM". I think its not working because there isn't a WindowsPhone/8.1 compiler in that old Visual Studio. (I'm unsure as to why WindowsStore/10.0 works.) I have Visual Studio 11, 12, and 14 on my system. How can I tell CMake to use the right one? Aaron Simmons Application Software Engineer at Sensory, Inc On Mon, Mar 14, 2016 at 11:11 AM, Aaron Simmons wrote: > With this CMakeLists.txt: > cmake_minimum_required(VERSION 3.5.0) > project(TestLib) > and this command: > cmake .. -G "Visual Studio 14 2015 ARM" > -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 > I get this output: > -- The C compiler identification is unknown > -- The CXX compiler identification is unknown > CMake Error at CMakeLists.txt:2 (project): > No CMAKE_C_COMPILER could be found. > > CMake Error at CMakeLists.txt:2 (project): > No CMAKE_CXX_COMPILER could be found. > > Oddly, using WindowsPhone/8.0 or WindowsStore/10.0 works. I'm not sure > how to debug this problem. Any pointers? > > > > Thanks, > aaron > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asimmons at sensoryinc.com Mon Mar 14 13:34:19 2016 From: asimmons at sensoryinc.com (Aaron Simmons) Date: Mon, 14 Mar 2016 11:34:19 -0600 Subject: [CMake] can't generate WindowsPhone 8.1 projects In-Reply-To: References: Message-ID: I looked at the CMAKE_C_COMPILER for WindowsStore/10.0, and its printing C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe which is correct! So I think the problem is that for WindowsPhone CMake is looking up the Visual Studio version incorrectly. Aaron Simmons Application Software Engineer at Sensory, Inc On Mon, Mar 14, 2016 at 11:30 AM, Aaron Simmons wrote: > In the successful case, I printed out CMAKE_C_COMPILER and found that its > pointing to > C:/Program Files (x86)/Microsoft Visual Studio > 11.0/VC/WPSDK/WP80/bin/x86_arm/cl.exe > even though I'm using the generator for "Visual Studio 14 2015 ARM". > > I think its not working because there isn't a WindowsPhone/8.1 compiler > in that old Visual Studio. (I'm unsure as to why WindowsStore/10.0 > works.) > > I have Visual Studio 11, 12, and 14 on my system. How can I tell CMake to > use the right one? > > > Aaron Simmons > Application Software Engineer at Sensory, Inc > > > On Mon, Mar 14, 2016 at 11:11 AM, Aaron Simmons > wrote: > >> With this CMakeLists.txt: >> cmake_minimum_required(VERSION 3.5.0) >> project(TestLib) >> and this command: >> cmake .. -G "Visual Studio 14 2015 ARM" >> -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 >> I get this output: >> -- The C compiler identification is unknown >> -- The CXX compiler identification is unknown >> CMake Error at CMakeLists.txt:2 (project): >> No CMAKE_C_COMPILER could be found. >> >> CMake Error at CMakeLists.txt:2 (project): >> No CMAKE_CXX_COMPILER could be found. >> >> Oddly, using WindowsPhone/8.0 or WindowsStore/10.0 works. I'm not sure >> how to debug this problem. Any pointers? >> >> >> >> Thanks, >> aaron >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aidar at saifoulline.ru Mon Mar 14 15:32:50 2016 From: aidar at saifoulline.ru (Aidar Saifoulline) Date: Mon, 14 Mar 2016 22:32:50 +0300 Subject: [CMake] CMake multi-processor compile for Fortran projects In-Reply-To: <000201d17e1e$8dd721a0$a98564e0$@saifoulline.ru> References: <000201d17e1e$8dd721a0$a98564e0$@saifoulline.ru> Message-ID: <000801d17e28$4c39e7f0$e4adb7d0$@saifoulline.ru> For Fortran project Visual Studio support /MP flags for multi-processor compile. How set this flag in CMakeLists.txt for Fortran projects? For example, I set definition /MP for c++ projects. and it is work. But don't work for Fortran language. I try set in CMAKE_Fortran_FLAGS /MP flag, but unsuccessfully. e-mail: esaj at inbox.ru -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gilles.Khouzam at microsoft.com Mon Mar 14 16:40:39 2016 From: Gilles.Khouzam at microsoft.com (Gilles Khouzam) Date: Mon, 14 Mar 2016 20:40:39 +0000 Subject: [CMake] can't generate WindowsPhone 8.1 projects In-Reply-To: References: Message-ID: Hi Aaron What happens if you sent the compiler to Visual Studio 12 2013 ARM? I?ll try this on my side and see if I can repro. Which version of CMake are you running? Thanks ~Gilles From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Aaron Simmons via CMake Sent: Monday, March 14, 2016 10:34 To: cmake at cmake.org Subject: Re: [CMake] can't generate WindowsPhone 8.1 projects I looked at the CMAKE_C_COMPILER for WindowsStore/10.0, and its printing C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe which is correct! So I think the problem is that for WindowsPhone CMake is looking up the Visual Studio version incorrectly. Aaron Simmons Application Software Engineer at Sensory, Inc On Mon, Mar 14, 2016 at 11:30 AM, Aaron Simmons > wrote: In the successful case, I printed out CMAKE_C_COMPILER and found that its pointing to C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/WPSDK/WP80/bin/x86_arm/cl.exe even though I'm using the generator for "Visual Studio 14 2015 ARM". I think its not working because there isn't a WindowsPhone/8.1 compiler in that old Visual Studio. (I'm unsure as to why WindowsStore/10.0 works.) I have Visual Studio 11, 12, and 14 on my system. How can I tell CMake to use the right one? Aaron Simmons Application Software Engineer at Sensory, Inc On Mon, Mar 14, 2016 at 11:11 AM, Aaron Simmons > wrote: With this CMakeLists.txt: cmake_minimum_required(VERSION 3.5.0) project(TestLib) and this command: cmake .. -G "Visual Studio 14 2015 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 I get this output: -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found. Oddly, using WindowsPhone/8.0 or WindowsStore/10.0 works. I'm not sure how to debug this problem. Any pointers? Thanks, aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergey.nikulov at gmail.com Tue Mar 15 03:37:04 2016 From: sergey.nikulov at gmail.com (Sergei Nikulov) Date: Tue, 15 Mar 2016 10:37:04 +0300 Subject: [CMake] Cmake fails to build libssh2 - wants VC 2010 told for VC 2015 build In-Reply-To: <20160314144416.000036db@barrys-emacs.org> References: <20160314144416.000036db@barrys-emacs.org> Message-ID: 2016-03-14 17:44 GMT+03:00 Barry Scott : > Windows 10 with Cmake 3.4.3 or 3.5.0. > I have the following Visual C versions installed. > > Microsoft Visual Studio 14.0 > Microsoft Visual Studio 12.0 > Microsoft Visual Studio 11.0 > Visual C++ for Python > ...snip... > Why is CMAKE trying to use anything from VC 2010? > > Can I work around this bug? Just checked with following steps 1. Opened command window (cmd.exe) 2. Clone libssh2 from GitHub (git clone https://github.com/libssh2/libssh2.git) 3. Change dir to libssh2 (cd libssh2) 4. Create folder build (mkdir build) 5. Change dir to build (cd build) 6. Generate build for MSVS 2015 (cmake .. -G"Visual Studio 14 Win64") 7. Build it (cmake --build . --config Release) And see no any problems :( Could you please be more specific? For example provide generator log for your "bug". Thank you. > Removing VC 2010 is reasonable workaround. > > Barry > -- > > 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 -- Best Regards, Sergei Nikulov From barry at barrys-emacs.org Tue Mar 15 07:50:59 2016 From: barry at barrys-emacs.org (Barry Scott) Date: Tue, 15 Mar 2016 11:50:59 +0000 Subject: [CMake] Cmake fails to build libssh2 - wants VC 2010 told for VC 2015 build In-Reply-To: References: <20160314144416.000036db@barrys-emacs.org> Message-ID: <20160315115059.00000d98@barrys-emacs.org> On Tue, 15 Mar 2016 10:37:04 +0300 Sergei Nikulov wrote: > Just checked with following steps > > 1. Opened command window (cmd.exe) > 2. Clone libssh2 from GitHub (git clone https://github.com/libssh2/libssh2.git) Out of curiosity why did you ignore my steps using the tar ball and use the git clone? > 3. Change dir to libssh2 (cd libssh2) > 4. Create folder build (mkdir build) > 5. Change dir to build (cd build) > 6. Generate build for MSVS 2015 (cmake .. -G"Visual Studio 14 Win64") > 7. Build it (cmake --build . --config Release) > > And see no any problems :( I also see no problem with the git clone. > Could you please be more specific? > For example provide generator log for your "bug". The conclusion I draw is that libssh2 has fixed a "bug" with its cmake config files. Thanks for looking at this. Barry From benzejaa at gmail.com Tue Mar 15 10:38:20 2016 From: benzejaa at gmail.com (James Benze) Date: Tue, 15 Mar 2016 10:38:20 -0400 Subject: [CMake] Clarifying Cmake behavior Message-ID: Hey all: I'm trying to compile boost with some weird options, and I can't get projects linked with it to compile correctly. As using regularly compiled boost seems to work just fine, this indicates my issue is not with cmake...however I was hoping I could get some clarification on how cmake searches for things in order to diagnose my issue. I made a toy project here: cmake_minimum_required(VERSION 2.8.4) project(testproject) find_package(Boost 1.58.0 REQUIRED COMPONENTS thread) add_executable(a.out main.cpp) target_link_libraries(a.out ${Boost_LIBRARIES}) When I build this project with the "good" normally compiled boost libraries, I get this CMakeFiles/a.out.dir/link.txt: /full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out -rdynamic /full/path/to/good/boost/libboost_thread.so -Wl,-rpath,/full/path/to/good/boost When I build the project with the exact same options, except substituting the "bad" boost for the BOOST_ROOT variable, I get: /full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out -rdynamic -lboost_thread The obvious differences here are that with the good boost libraries, we get a full path to the boost library and not a shortened path. Additionally, with the good library, I get a the rpath to the library set as well. The ${Boost_LIBRARIES} variable is the full path to libboost_thread.so in both cases. This is obviously a problem with my boost compilation, but this is my only clue to diagnosing the problem. I was hoping for some insight as to why cmake would choose one way of linking over another so I could attempt to fix my actual problem. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From benzejaa at gmail.com Tue Mar 15 14:38:19 2016 From: benzejaa at gmail.com (James Benze) Date: Tue, 15 Mar 2016 14:38:19 -0400 Subject: [CMake] Clarifying Cmake behavior In-Reply-To: References: Message-ID: So I combed through the source code, and solved the problem, mostly. It did turn out to be a cmake issue, sort of, so I figured I'd post here for posterity in case future problem solvers come across a similar issue. So I'm using both a custom compiler and a custom set of boost libraries. For simplicity, I installed them to the same prefix (/path/to/custom/stuff). Now cmake has a list of libraries that it thinks are always looked in for link directories. If you use a custom compiler (/path/to/custom/stuff/bin/g++ for example), it adds that compiler's libraries to it's "implicit link directories", ones that it assumes are found automatically (in this case /path/to/custom/stuff/lib and /path/to/custom/stuff/lib64). Because my custom boost version was in this library path (/path/to/custom/stuff/lib) cmake assumed that the compiler could find them and just used the "-l" syntax with no RPATH set. When I used my control set of libraries, they were installed in a different prefix (/path/to/test/boost/) so cmake says "oh you can't find these" and did the full path linkage plus RPATH. So my two solutions are as follows: 1) set LD_LIBRARY_PATH when building. In this case, everything links correctly, although ld harmlessly complains about conflicts with the distribution-installed libraries in /usr/lib/ 2) Install boost in a different directory than my custom compiler. Cheers, all. On Tue, Mar 15, 2016 at 10:38 AM, James Benze wrote: > Hey all: > > I'm trying to compile boost with some weird options, and I can't get > projects linked with it to compile correctly. As using regularly compiled > boost seems to work just fine, this indicates my issue is not with > cmake...however I was hoping I could get some clarification on how cmake > searches for things in order to diagnose my issue. > > I made a toy project here: > > cmake_minimum_required(VERSION 2.8.4) > project(testproject) > > find_package(Boost 1.58.0 REQUIRED COMPONENTS thread) > add_executable(a.out main.cpp) > target_link_libraries(a.out ${Boost_LIBRARIES}) > > When I build this project with the "good" normally compiled boost > libraries, I get this CMakeFiles/a.out.dir/link.txt: > > /full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out > -rdynamic /full/path/to/good/boost/libboost_thread.so > -Wl,-rpath,/full/path/to/good/boost > > When I build the project with the exact same options, except substituting > the "bad" boost for the BOOST_ROOT variable, I get: > > /full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out > -rdynamic -lboost_thread > > The obvious differences here are that with the good boost libraries, we > get a full path to the boost library and not a shortened path. > Additionally, with the good library, I get a the rpath to the library set > as well. The ${Boost_LIBRARIES} variable is the full path to > libboost_thread.so in both cases. > > This is obviously a problem with my boost compilation, but this is my only > clue to diagnosing the problem. I was hoping for some insight as to why > cmake would choose one way of linking over another so I could attempt to > fix my actual problem. > > Thanks! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asimmons at sensoryinc.com Tue Mar 15 19:49:43 2016 From: asimmons at sensoryinc.com (Aaron Simmons) Date: Tue, 15 Mar 2016 17:49:43 -0600 Subject: [CMake] can't generate WindowsPhone 8.1 projects In-Reply-To: References: Message-ID: I'm using CMake 3.5.0 on Windows 10. To simplify things, I started from a fresh Windows 10 image and installed Visual Studio 2015. When I try your suggestion to use the 2013 generator, I get cmake .. -G "Visual Studio 12 2013 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 CMake Error at CMakeLists.txt:2 (project): A Windows Phone component with CMake requires both the Windows Desktop SDK as well as the Windows Phone '8.1' SDK. Please make sure that you have both installed When I try it with the 2015 generator, I get cmake .. -G "Visual Studio 14 2015 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 -- The C compiler identification is MSVC 18.0.31010.0 -- The CXX compiler identification is MSVC 18.0.31010.0 -- Check for working C compiler using: Visual Studio 14 2015 ARM -- Check for working C compiler using: Visual Studio 14 2015 ARM -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 14 2015 ARM -- Check for working CXX compiler using: Visual Studio 14 2015 ARM -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMAKE_C_COMPILER C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_arm/cl.exe CMAKE_CXX_COMPILER C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_arm/cl.exe -- Configuring done -- Generating done How odd-- it can't generate with 2013, but when it generates with 2015 it uses the 2013 compiler. Aaron Simmons Application Software Engineer at Sensory, Inc On Mon, Mar 14, 2016 at 2:40 PM, Gilles Khouzam < Gilles.Khouzam at microsoft.com> wrote: > Hi Aaron > > > > What happens if you sent the compiler to Visual Studio 12 2013 ARM? > > > > I?ll try this on my side and see if I can repro. > > > > Which version of CMake are you running? > > > > Thanks > > ~Gilles > > > > *From:* CMake [mailto:cmake-bounces at cmake.org] *On Behalf Of *Aaron > Simmons via CMake > *Sent:* Monday, March 14, 2016 10:34 > *To:* cmake at cmake.org > *Subject:* Re: [CMake] can't generate WindowsPhone 8.1 projects > > > > I looked at the CMAKE_C_COMPILER for WindowsStore/10.0, and its printing > > C:/Program Files (x86)/Microsoft Visual Studio > 14.0/VC/bin/x86_arm/cl.exe > > which is correct! > > > > So I think the problem is that for WindowsPhone CMake is looking up the > Visual Studio version incorrectly. > > > > > Aaron Simmons > > Application Software Engineer at Sensory, Inc > > > > On Mon, Mar 14, 2016 at 11:30 AM, Aaron Simmons > wrote: > > In the successful case, I printed out CMAKE_C_COMPILER and found that its > pointing to > > C:/Program Files (x86)/Microsoft Visual Studio > 11.0/VC/WPSDK/WP80/bin/x86_arm/cl.exe > > even though I'm using the generator for "Visual Studio 14 2015 ARM". > > > > I think its not working because there isn't a WindowsPhone/8.1 compiler > in that old Visual Studio. (I'm unsure as to why WindowsStore/10.0 > works.) > > > > I have Visual Studio 11, 12, and 14 on my system. How can I tell CMake to > use the right one? > > > > > Aaron Simmons > > Application Software Engineer at Sensory, Inc > > > > On Mon, Mar 14, 2016 at 11:11 AM, Aaron Simmons > wrote: > > With this CMakeLists.txt: > > cmake_minimum_required(VERSION 3.5.0) > > project(TestLib) > > and this command: > > cmake .. -G "Visual Studio 14 2015 ARM" > -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 > > I get this output: > > -- The C compiler identification is unknown > > -- The CXX compiler identification is unknown > > CMake Error at CMakeLists.txt:2 (project): > > No CMAKE_C_COMPILER could be found. > > > > CMake Error at CMakeLists.txt:2 (project): > > No CMAKE_CXX_COMPILER could be found. > > > > Oddly, using WindowsPhone/8.0 or WindowsStore/10.0 works. I'm not sure > how to debug this problem. Any pointers? > > > > > > > > Thanks, > > aaron > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asimmons at sensoryinc.com Tue Mar 15 19:59:52 2016 From: asimmons at sensoryinc.com (Aaron Simmons) Date: Tue, 15 Mar 2016 17:59:52 -0600 Subject: [CMake] can't generate WindowsPhone 8.1 projects In-Reply-To: References: Message-ID: I think my problem was that I had a dev machine that had upgraded through several Visual Studio versions. Now that I'm using a fresh-install of Visual Studio 2015, its working. The use of the old compiler was confusing, but if that's expected then that's ok. Aaron Simmons Application Software Engineer at Sensory, Inc On Tue, Mar 15, 2016 at 5:56 PM, Gilles Khouzam < Gilles.Khouzam at microsoft.com> wrote: > If you only have VS2015, then this behavior is normal. When you install > the Windows Phone 8.1 SDK, it will have the VS 2013 toolset for those > projects, but not the full compiler toolset. > > > > So is this currently working? Are you having trouble on one particular > machine? > > > > Thanks > > ~Gilles > > > > *From:* Aaron Simmons [mailto:asimmons at sensoryinc.com] > *Sent:* Tuesday, March 15, 2016 16:50 > *To:* Gilles Khouzam > *Cc:* cmake at cmake.org > > *Subject:* Re: [CMake] can't generate WindowsPhone 8.1 projects > > > > I'm using CMake 3.5.0 on Windows 10. To simplify things, I started from a > fresh Windows 10 image and installed Visual Studio 2015. > > > > When I try your suggestion to use the 2013 generator, I get > > cmake .. -G "Visual Studio 12 2013 ARM" > -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 > > CMake Error at CMakeLists.txt:2 (project): > > A Windows Phone component with CMake requires both the Windows > Desktop SDK > > as well as the Windows Phone '8.1' SDK. Please make sure that you > have > > both installed > > > > When I try it with the 2015 generator, I get > > cmake .. -G "Visual Studio 14 2015 ARM" > -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 > > -- The C compiler identification is MSVC 18.0.31010.0 > > -- The CXX compiler identification is MSVC 18.0.31010.0 > > -- Check for working C compiler using: Visual Studio 14 2015 ARM > > -- Check for working C compiler using: Visual Studio 14 2015 ARM -- > works > > -- Detecting C compiler ABI info > > -- Detecting C compiler ABI info - done > > -- Check for working CXX compiler using: Visual Studio 14 2015 ARM > > -- Check for working CXX compiler using: Visual Studio 14 2015 ARM -- > works > > -- Detecting CXX compiler ABI info > > -- Detecting CXX compiler ABI info - done > > -- Detecting CXX compile features > > -- Detecting CXX compile features - done > > CMAKE_C_COMPILER C:/Program Files (x86)/Microsoft Visual Studio > 12.0/VC/bin/x86_arm/cl.exe > > CMAKE_CXX_COMPILER C:/Program Files (x86)/Microsoft Visual Studio > 12.0/VC/bin/x86_arm/cl.exe > > -- Configuring done > > -- Generating done > > > > > > How odd-- it can't generate with 2013, but when it generates with 2015 it > uses the 2013 compiler. > > > > > > > Aaron Simmons > > Application Software Engineer at Sensory, Inc > > > > On Mon, Mar 14, 2016 at 2:40 PM, Gilles Khouzam < > Gilles.Khouzam at microsoft.com> wrote: > > Hi Aaron > > > > What happens if you sent the compiler to Visual Studio 12 2013 ARM? > > > > I?ll try this on my side and see if I can repro. > > > > Which version of CMake are you running? > > > > Thanks > > ~Gilles > > > > *From:* CMake [mailto:cmake-bounces at cmake.org] *On Behalf Of *Aaron > Simmons via CMake > *Sent:* Monday, March 14, 2016 10:34 > *To:* cmake at cmake.org > *Subject:* Re: [CMake] can't generate WindowsPhone 8.1 projects > > > > I looked at the CMAKE_C_COMPILER for WindowsStore/10.0, and its printing > > C:/Program Files (x86)/Microsoft Visual Studio > 14.0/VC/bin/x86_arm/cl.exe > > which is correct! > > > > So I think the problem is that for WindowsPhone CMake is looking up the > Visual Studio version incorrectly. > > > > > Aaron Simmons > > Application Software Engineer at Sensory, Inc > > > > On Mon, Mar 14, 2016 at 11:30 AM, Aaron Simmons > wrote: > > In the successful case, I printed out CMAKE_C_COMPILER and found that its > pointing to > > C:/Program Files (x86)/Microsoft Visual Studio > 11.0/VC/WPSDK/WP80/bin/x86_arm/cl.exe > > even though I'm using the generator for "Visual Studio 14 2015 ARM". > > > > I think its not working because there isn't a WindowsPhone/8.1 compiler > in that old Visual Studio. (I'm unsure as to why WindowsStore/10.0 > works.) > > > > I have Visual Studio 11, 12, and 14 on my system. How can I tell CMake to > use the right one? > > > > > Aaron Simmons > > Application Software Engineer at Sensory, Inc > > > > On Mon, Mar 14, 2016 at 11:11 AM, Aaron Simmons > wrote: > > With this CMakeLists.txt: > > cmake_minimum_required(VERSION 3.5.0) > > project(TestLib) > > and this command: > > cmake .. -G "Visual Studio 14 2015 ARM" > -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 > > I get this output: > > -- The C compiler identification is unknown > > -- The CXX compiler identification is unknown > > CMake Error at CMakeLists.txt:2 (project): > > No CMAKE_C_COMPILER could be found. > > > > CMake Error at CMakeLists.txt:2 (project): > > No CMAKE_CXX_COMPILER could be found. > > > > Oddly, using WindowsPhone/8.0 or WindowsStore/10.0 works. I'm not sure > how to debug this problem. Any pointers? > > > > > > > > Thanks, > > aaron > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gilles.Khouzam at microsoft.com Tue Mar 15 19:56:31 2016 From: Gilles.Khouzam at microsoft.com (Gilles Khouzam) Date: Tue, 15 Mar 2016 23:56:31 +0000 Subject: [CMake] can't generate WindowsPhone 8.1 projects In-Reply-To: References: Message-ID: If you only have VS2015, then this behavior is normal. When you install the Windows Phone 8.1 SDK, it will have the VS 2013 toolset for those projects, but not the full compiler toolset. So is this currently working? Are you having trouble on one particular machine? Thanks ~Gilles From: Aaron Simmons [mailto:asimmons at sensoryinc.com] Sent: Tuesday, March 15, 2016 16:50 To: Gilles Khouzam Cc: cmake at cmake.org Subject: Re: [CMake] can't generate WindowsPhone 8.1 projects I'm using CMake 3.5.0 on Windows 10. To simplify things, I started from a fresh Windows 10 image and installed Visual Studio 2015. When I try your suggestion to use the 2013 generator, I get cmake .. -G "Visual Studio 12 2013 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 CMake Error at CMakeLists.txt:2 (project): A Windows Phone component with CMake requires both the Windows Desktop SDK as well as the Windows Phone '8.1' SDK. Please make sure that you have both installed When I try it with the 2015 generator, I get cmake .. -G "Visual Studio 14 2015 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 -- The C compiler identification is MSVC 18.0.31010.0 -- The CXX compiler identification is MSVC 18.0.31010.0 -- Check for working C compiler using: Visual Studio 14 2015 ARM -- Check for working C compiler using: Visual Studio 14 2015 ARM -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 14 2015 ARM -- Check for working CXX compiler using: Visual Studio 14 2015 ARM -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMAKE_C_COMPILER C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_arm/cl.exe CMAKE_CXX_COMPILER C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_arm/cl.exe -- Configuring done -- Generating done How odd-- it can't generate with 2013, but when it generates with 2015 it uses the 2013 compiler. Aaron Simmons Application Software Engineer at Sensory, Inc On Mon, Mar 14, 2016 at 2:40 PM, Gilles Khouzam > wrote: Hi Aaron What happens if you sent the compiler to Visual Studio 12 2013 ARM? I?ll try this on my side and see if I can repro. Which version of CMake are you running? Thanks ~Gilles From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Aaron Simmons via CMake Sent: Monday, March 14, 2016 10:34 To: cmake at cmake.org Subject: Re: [CMake] can't generate WindowsPhone 8.1 projects I looked at the CMAKE_C_COMPILER for WindowsStore/10.0, and its printing C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe which is correct! So I think the problem is that for WindowsPhone CMake is looking up the Visual Studio version incorrectly. Aaron Simmons Application Software Engineer at Sensory, Inc On Mon, Mar 14, 2016 at 11:30 AM, Aaron Simmons > wrote: In the successful case, I printed out CMAKE_C_COMPILER and found that its pointing to C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/WPSDK/WP80/bin/x86_arm/cl.exe even though I'm using the generator for "Visual Studio 14 2015 ARM". I think its not working because there isn't a WindowsPhone/8.1 compiler in that old Visual Studio. (I'm unsure as to why WindowsStore/10.0 works.) I have Visual Studio 11, 12, and 14 on my system. How can I tell CMake to use the right one? Aaron Simmons Application Software Engineer at Sensory, Inc On Mon, Mar 14, 2016 at 11:11 AM, Aaron Simmons > wrote: With this CMakeLists.txt: cmake_minimum_required(VERSION 3.5.0) project(TestLib) and this command: cmake .. -G "Visual Studio 14 2015 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 I get this output: -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found. Oddly, using WindowsPhone/8.0 or WindowsStore/10.0 works. I'm not sure how to debug this problem. Any pointers? Thanks, aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From Mateju.Miroslav at azd.cz Wed Mar 16 06:50:03 2016 From: Mateju.Miroslav at azd.cz (=?iso-8859-2?Q?Mat=ECj=F9_Miroslav=2C_Ing=2E?=) Date: Wed, 16 Mar 2016 10:50:03 +0000 Subject: [CMake] CTest: Handle output of a custom CTEST_CONFIGURE_COMMAND Message-ID: Hi, I am using CTest to encapsulate automatic build and testing of a microcontroller software and report results to CDash. This process generally works but I am facing a problem with handling configure errors within CTest and CDash. Configure phase involves several tools besides CMake, so I have created a batch-file and use it as a custom CTEST_CONFIGURE_COMMAND: set(CTEST_CONFIGURE_COMMAND "$ENV{SCRIPT_FOLDER}/configure.bat") When one of configure tools fails, configure.bat exits with a positive return value using 'exit /b %ERRCODE_TOOL%'. If I run configure.bat directly, I can check the desired value is returned by running 'echo %ERRORLEVEL%' after the script finishes. However, when the script is called from CTest script using 'ctest_configure(RETURN_VALUE configure_failed)', the variable configure_failed does not prevent building, although following code is used: if ($ENV{DO_BUILD} AND NOT configure_failed) ctest_build(RETURN_VALUE build_failed) endif($ENV{DO_BUILD} AND NOT configure_failed) Also the report of configure phase in CDash contains: Configure Command: D:/checkout/integration/script//configure.bat Configure Return Value: 0 Configure Output: [configure] ---------- XMLConf ---------- error: Cannot find CFG overlay XML file [configure] Error: XMLConf failed. CDash reports 0 errors and 0 warnings for the configure phase, although the last two lines of configure.bat output go to stderr. What can I do to get configure errors properly reported in my environment? I use Windows 7 64-bit and native CMake 3.5.0. Thanks in advance for any help! Miroslav Mat?j? From sergey.nikulov at gmail.com Wed Mar 16 08:44:57 2016 From: sergey.nikulov at gmail.com (Sergei Nikulov) Date: Wed, 16 Mar 2016 15:44:57 +0300 Subject: [CMake] Cmake fails to build libssh2 - wants VC 2010 told for VC 2015 build In-Reply-To: References: <20160314144416.000036db@barrys-emacs.org> <20160315115059.00000d98@barrys-emacs.org> Message-ID: 2016-03-16 15:40 GMT+03:00 Elizabeth Fischer : > Just get the tarball from: > > https://github.com/libssh2/libssh2/tarball/libssh2-1.7.0 > > We've already discussed/solved this The problem was --config RelWithDebugInfo should be --config RelWithDebInfo -- Best Regards, Sergei Nikulov From rpf2116 at columbia.edu Wed Mar 16 08:40:04 2016 From: rpf2116 at columbia.edu (Elizabeth Fischer) Date: Wed, 16 Mar 2016 08:40:04 -0400 Subject: [CMake] Cmake fails to build libssh2 - wants VC 2010 told for VC 2015 build In-Reply-To: <20160315115059.00000d98@barrys-emacs.org> References: <20160314144416.000036db@barrys-emacs.org> <20160315115059.00000d98@barrys-emacs.org> Message-ID: Just get the tarball from: https://github.com/libssh2/libssh2/tarball/libssh2-1.7.0 On Tue, Mar 15, 2016 at 7:50 AM, Barry Scott wrote: > On Tue, 15 Mar 2016 10:37:04 +0300 > Sergei Nikulov wrote: > > > Just checked with following steps > > > > 1. Opened command window (cmd.exe) > > 2. Clone libssh2 from GitHub (git clone > https://github.com/libssh2/libssh2.git) > > Out of curiosity why did you ignore my steps using the tar ball and use > the git clone? > > > 3. Change dir to libssh2 (cd libssh2) > > 4. Create folder build (mkdir build) > > 5. Change dir to build (cd build) > > 6. Generate build for MSVS 2015 (cmake .. -G"Visual Studio 14 Win64") > > 7. Build it (cmake --build . --config Release) > > > > And see no any problems :( > > I also see no problem with the git clone. > > > Could you please be more specific? > > For example provide generator log for your "bug". > > The conclusion I draw is that libssh2 has fixed a "bug" with its cmake > config files. > > Thanks for looking at this. > > Barry > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karelgeiregat at gmail.com Wed Mar 16 17:13:14 2016 From: karelgeiregat at gmail.com (Karel Geiregat) Date: Wed, 16 Mar 2016 22:13:14 +0100 Subject: [CMake] Building with Cmake using Boost problem Message-ID: Dear people at cmake Today, I have a problem with using cmake and Boost to build up Apache Avro , which is a data-serializer.I have to use that "avro" which can be built with cmake and boost. However, there is a problem when building up the component by using the CMakeLists.txt file. I have put an SO question on this matter, but there, I didn't have gotten an useful answer/comment so far. After placing the question, i have done further searches in the meanwhile to find a solution. I have now the latest, stable builds, but still no success. First, the versions of Cmake and Boost and my OS: - cmake: v3.5.0 - Boost: v1.60.0 - OS: Windows 10 64 bit cmake is a part of the system path: PS C:\Users\geire> cmake -version > cmake version 3.5.0 > > CMake suite maintained and supported by Kitware (kitware.com/cmake). > Now, I want to build up avro, you have to use cmake. My target platform is C++, so i used the C++ version there. The CMakeLists.txt content is here below; # > # Licensed to the Apache Software Foundation (ASF) under one > # or more contributor license agreements. See the NOTICE file > # distributed with this work for additional information > # regarding copyright ownership. The ASF licenses this file > # to you under the Apache License, Version 2.0 (the > # "License"); you may not use this file except in compliance > # with the License. You may obtain a copy of the License at > # > # http://www.apache.org/licenses/LICENSE-2.0 > # > # Unless required by applicable law or agreed to in writing, > # software distributed under the License is distributed on an > # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > # KIND, either express or implied. See the License for the > # specific language governing permissions and limitations > # under the License. > # > cmake_minimum_required (VERSION 2.6) > > set (CMAKE_LEGACY_CYGWIN_WIN32 0) > > if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) > set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) > endif() > > if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt) > file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" AVRO_VERSION) > else (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt) > file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../../share/VERSION.txt" > AVRO_VERSION) > endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt) > > set (AVRO_VERSION_MAJOR ${AVRO_VERSION}) > set (AVRO_VERSION_MINOR "0") > > project (Avro-cpp) > > if (WIN32 AND NOT CYGWIN AND NOT MSYS) > add_definitions (/EHa) > add_definitions ( > -DBOOST_REGEX_DYN_LINK > -DBOOST_FILESYSTEM_DYN_LINK > -DBOOST_SYSTEM_DYN_LINK > -DBOOST_IOSTREAMS_DYN_LINK > -DBOOST_PROGRAM_OPTIONS_DYN_LINK > -DBOOST_ALL_NO_LIB) > endif() > > if (CMAKE_COMPILER_IS_GNUCXX) > set(CMAKE_CXX_FLAGS "-Wall") > endif () > > > > # ==== edit, these 2 lines here below are original > # find_package (Boost 1.38 REQUIRED > # COMPONENTS filesystem system program_options iostreams) > # === commented these 2 lines here above and added the following here > below till "end edit" > set(BOOST_ROOT D:/software/boost_1_60_0) > set(BOOST_INCLUDEDIR D:/software/boost_1_60_0/boost) > set(BOOST_LIBRARYDIR D:/software/boost_1_60_0/stage/lib) > > find_package(Boost 1.54.0 > COMPONENTS filesystem system program_options iostreams REQUIRED > ) > > # end edit > > add_definitions (${Boost_LIB_DIAGNOSTIC_DEFINITIONS}) > > include_directories (api ${CMAKE_CURRENT_BINARY_DIR} ${Boost_INCLUDE_DIRS}) > > set (AVRO_SOURCE_FILES > impl/Compiler.cc impl/Node.cc > impl/NodeImpl.cc impl/ResolverSchema.cc impl/Schema.cc > impl/Types.cc impl/ValidSchema.cc impl/Zigzag.cc > impl/BinaryEncoder.cc impl/BinaryDecoder.cc > impl/Stream.cc impl/FileStream.cc > impl/Generic.cc impl/GenericDatum.cc > impl/DataFile.cc > impl/parsing/Symbol.cc > impl/parsing/ValidatingCodec.cc > impl/parsing/JsonCodec.cc > impl/parsing/ResolvingDecoder.cc > impl/json/JsonIO.cc > impl/json/JsonDom.cc > impl/Resolver.cc impl/Validator.cc > ) > > add_library (avrocpp SHARED ${AVRO_SOURCE_FILES}) > > set_property (TARGET avrocpp > APPEND PROPERTY COMPILE_DEFINITIONS AVRO_DYN_LINK) > > add_library (avrocpp_s STATIC ${AVRO_SOURCE_FILES}) > > set_property (TARGET avrocpp avrocpp_s > APPEND PROPERTY COMPILE_DEFINITIONS AVRO_SOURCE) > > set_target_properties (avrocpp PROPERTIES > VERSION ${AVRO_VERSION_MAJOR}.${AVRO_VERSION_MINOR}) > > set_target_properties (avrocpp_s PROPERTIES > VERSION ${AVRO_VERSION_MAJOR}.${AVRO_VERSION_MINOR}) > > target_link_libraries (avrocpp ${Boost_LIBRARIES}) > > add_executable (precompile test/precompile.cc) > > target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES}) > > macro (gen file ns) > add_custom_command (OUTPUT ${file}.hh > COMMAND avrogencpp > -p - > -i ${CMAKE_CURRENT_SOURCE_DIR}/jsonschemas/${file} > -o ${file}.hh -n ${ns} -U > DEPENDS avrogencpp ${CMAKE_CURRENT_SOURCE_DIR}/jsonschemas/${file}) > add_custom_target (${file}_hh DEPENDS ${file}.hh) > endmacro (gen) > > gen (empty_record empty) > gen (bigrecord testgen) > gen (bigrecord_r testgen_r) > gen (bigrecord2 testgen2) > gen (tweet testgen3) > gen (union_array_union uau) > gen (union_map_union umu) > gen (union_conflict uc) > gen (recursive rec) > gen (reuse ru) > gen (circulardep cd) > > add_executable (avrogencpp impl/avrogencpp.cc) > target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES}) > > enable_testing() > > macro (unittest name) > add_executable (${name} test/${name}.cc) > target_link_libraries (${name} avrocpp ${Boost_LIBRARIES}) > add_test (NAME ${name} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name}) > endmacro (unittest) > > unittest (buffertest) > unittest (unittest) > unittest (SchemaTests) > unittest (LargeSchemaTests) > unittest (CodecTests) > unittest (StreamTests) > unittest (SpecificTests) > unittest (DataFileTests) > unittest (JsonTests) > unittest (AvrogencppTests) > > add_dependencies (AvrogencppTests bigrecord_hh bigrecord_r_hh bigrecord2_hh > tweet_hh > union_array_union_hh union_map_union_hh union_conflict_hh > recursive_hh reuse_hh circulardep_hh empty_record_hh) > > include (InstallRequiredSystemLibraries) > > set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}") > > include (CPack) > > install (TARGETS avrocpp avrocpp_s > LIBRARY DESTINATION lib > ARCHIVE DESTINATION lib > RUNTIME DESTINATION lib) > > install (TARGETS avrogencpp RUNTIME DESTINATION bin) > > install (DIRECTORY api/ DESTINATION include/avro > FILES_MATCHING PATTERN *.hh) > > if (NOT CMAKE_BUILD_TYPE) > set (CMAKE_BUILD_TYPE Release CACHE STRING > "Choose the type of build, options are: None Debug Release > RelWithDebInfo MinSizeRel." > FORCE) > endif (NOT CMAKE_BUILD_TYPE) > The command here below is that what I've used to build the project by using Cmake. Since i'm using Visual Studio 2015 CE, i have used the -G flag so that i can use nmake to install it after. (part of the requirements) cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug > The output is as follows; -- The C compiler identification is MSVC 19.0.23506.0 > -- The CXX compiler identification is MSVC 19.0.23506.0 > -- Check for working C compiler: C:/Program Files (x86)/Visual Studio > 14.0/VC/bin/cl.exe > -- Check for working C compiler: C:/Program Files (x86)/Visual Studio > 14.0/VC/bin/cl.exe -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Check for working CXX compiler: C:/Program Files (x86)/Visual Studio > 14.0/VC/bin/cl.exe > -- Check for working CXX compiler: C:/Program Files (x86)/Visual Studio > 14.0/VC/bin/cl.exe -- works > -- Detecting CXX compiler ABI info > -- Detecting CXX compiler ABI info - done > -- Detecting CXX compile features > -- Detecting CXX compile features - done > CMake Error at > D:/software/cmake/share/cmake-3.5/Modules/FindBoost.cmake:1647 (message): > Unable to find the requested Boost libraries. > > Boost version: 1.60.0 > > Boost include path: D:/software/boost_1_60_0 > > Could not find the following Boost libraries: > > boost_filesystem > boost_system > boost_program_options > boost_iostreams > boost_regex > > No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to > the > directory containing Boost libraries or BOOST_ROOT to the location of > Boost. > Call Stack (most recent call first): > CMakeLists.txt:64 (find_package) > > > -- Configuring incomplete, errors occurred! > See also > "D:/kaa/kaaBuild/avro-src-1.7.7/lang/c++/build.win/CMakeFiles/CMakeOutput.log". > > Microsoft (R) Program Maintenance Utility Version 14.00.23506.0 > Copyright (C) Microsoft Corporation. All rights reserved. > > NMAKE : fatal error U1073: don't know how to make 'install' > Stop. > I really don't understand why it is not able to find the library files. I have pointed to the right folder, where the libraries are installed to after building and compiling Boost ( set(BOOST_LIBRARYDIR D:/software/boost_1_60_0/stage/lib) ). I have even edited the file so that the right path is used (see # edit comment somewhere): set(BOOST_ROOT D:/software/boost_1_60_0) > set(BOOST_INCLUDEDIR D:/software/boost_1_60_0/boost) > set(BOOST_LIBRARYDIR D:/software/boost_1_60_0/stage/lib) > According to the cmake documentation of FindBoost you have to name the required libraries as described; "date_time" for "libboost_date_time" The above is as an example. So from the requirements, i have to find boost_filesystem. Here below is a PS command that checks if the file is available. PS D:\software\boost_1_60_0\stage\lib> Get-ChildItem libboost_filesystem* > -name > libboost_filesystem-vc140-mt-1_60.lib > libboost_filesystem-vc140-mt-gd-1_60.lib > PS D:\software\boost_1_60_0\stage\lib> Get-ChildItem libboost_system* -name > libboost_system-vc140-mt-1_60.lib > libboost_system-vc140-mt-gd-1_60.lib > PS D:\software\boost_1_60_0\stage\lib> Get-ChildItem libboost_program_opt* > -name > libboost_program_options-vc140-mt-1_60.lib > libboost_program_options-vc140-mt-gd-1_60.lib > PS D:\software\boost_1_60_0\stage\lib> Get-ChildItem libboost_iostreams* > -name > libboost_iostreams-vc140-mt-1_60.lib > libboost_iostreams-vc140-mt-gd-1_60.lib > PS D:\software\boost_1_60_0\stage\lib> Get-ChildItem libboost_regex* -name > libboost_regex-vc140-mt-1_60.lib > libboost_regex-vc140-mt-gd-1_60.lib > As you can see, the libraries are on the right location. But Cmake is still unable to find these. That really surprises me ... I even ensured that the cache is empty (there was a SO post mentioning it). I just deleted the whole folder that got generated by the cmake program. Here below is the output file from the above command: The system is: Windows - 10.0.10586 - AMD64 > Compiling the C compiler identification source file "CMakeCCompilerId.c" > succeeded. > Compiler: C:/Program Files (x86)/Visual Studio 14.0/VC/bin/cl.exe > Build flags: > Id flags: > > The output was: > 0 > Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86 > Copyright (C) Microsoft Corporation. All rights reserved. > > CMakeCCompilerId.c > Microsoft (R) Incremental Linker Version 14.00.23506.0 > Copyright (C) Microsoft Corporation. All rights reserved. > > /out:CMakeCCompilerId.exe > CMakeCCompilerId.obj > > > Compilation of the C compiler identification source "CMakeCCompilerId.c" > produced "CMakeCCompilerId.exe" > > Compilation of the C compiler identification source "CMakeCCompilerId.c" > produced "CMakeCCompilerId.obj" > > The C compiler identification is MSVC, found in > "D:/kaa/kaaBuild/avro-src-1.7.7/lang/c++/build.win/CMakeFiles/3.5.0/CompilerIdC/CMakeCCompilerId.exe" > > Compiling the CXX compiler identification source file > "CMakeCXXCompilerId.cpp" succeeded. > Compiler: C:/Program Files (x86)/Visual Studio 14.0/VC/bin/cl.exe > Build flags: > Id flags: > > The output was: > 0 > Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86 > Copyright (C) Microsoft Corporation. All rights reserved. > > CMakeCXXCompilerId.cpp > Microsoft (R) Incremental Linker Version 14.00.23506.0 > Copyright (C) Microsoft Corporation. All rights reserved. > > /out:CMakeCXXCompilerId.exe > CMakeCXXCompilerId.obj > > > Compilation of the CXX compiler identification source > "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.exe" > > Compilation of the CXX compiler identification source > "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.obj" > > The CXX compiler identification is MSVC, found in > "D:/kaa/kaaBuild/avro-src-1.7.7/lang/c++/build.win/CMakeFiles/3.5.0/CompilerIdCXX/CMakeCXXCompilerId.exe" > > Determining if the C compiler works passed with the following output: > Change Dir: > D:/kaa/kaaBuild/avro-src-1.7.7/lang/c++/build.win/CMakeFiles/CMakeTmp > > Run Build Command:"nmake" "/NOLOGO" "cmTC_7d10a\fast" > "C:\Program Files (x86)\Visual Studio 14.0\VC\BIN\nmake.exe" -f > CMakeFiles\cmTC_7d10a.dir\build.make /nologo -L > CMakeFiles\cmTC_7d10a.dir\build > > Building C object CMakeFiles/cmTC_7d10a.dir/testCCompiler.c.obj > > C:\PROGRA~2\VISUAL~1.0\VC\bin\cl.exe > @C:\Users\geire\AppData\Local\Temp\nm29F3.tmp > > testCCompiler.c > > Linking C executable cmTC_7d10a.exe > > D:\software\cmake\bin\cmake.exe -E vs_link_exe > --intdir=CMakeFiles\cmTC_7d10a.dir --manifests -- > C:\PROGRA~2\VISUAL~1.0\VC\bin\link.exe /nologo > @CMakeFiles\cmTC_7d10a.dir\objects1.rsp > @C:\Users\geire\AppData\Local\Temp\nm2A33.tmp > > > > Detecting C compiler ABI info compiled with the following output: > Change Dir: > D:/kaa/kaaBuild/avro-src-1.7.7/lang/c++/build.win/CMakeFiles/CMakeTmp > > Run Build Command:"nmake" "/NOLOGO" "cmTC_acebd\fast" > "C:\Program Files (x86)\Visual Studio 14.0\VC\BIN\nmake.exe" -f > CMakeFiles\cmTC_acebd.dir\build.make /nologo -L > CMakeFiles\cmTC_acebd.dir\build > > Building C object CMakeFiles/cmTC_acebd.dir/CMakeCCompilerABI.c.obj > > C:\PROGRA~2\VISUAL~1.0\VC\bin\cl.exe > @C:\Users\geire\AppData\Local\Temp\nm2C26.tmp > > CMakeCCompilerABI.c > > Linking C executable cmTC_acebd.exe > > D:\software\cmake\bin\cmake.exe -E vs_link_exe > --intdir=CMakeFiles\cmTC_acebd.dir --manifests -- > C:\PROGRA~2\VISUAL~1.0\VC\bin\link.exe /nologo > @CMakeFiles\cmTC_acebd.dir\objects1.rsp > @C:\Users\geire\AppData\Local\Temp\nm2C65.tmp > > > > Determining if the CXX compiler works passed with the following output: > Change Dir: > D:/kaa/kaaBuild/avro-src-1.7.7/lang/c++/build.win/CMakeFiles/CMakeTmp > > Run Build Command:"nmake" "/NOLOGO" "cmTC_7a292\fast" > "C:\Program Files (x86)\Visual Studio 14.0\VC\BIN\nmake.exe" -f > CMakeFiles\cmTC_7a292.dir\build.make /nologo -L > CMakeFiles\cmTC_7a292.dir\build > > Building CXX object CMakeFiles/cmTC_7a292.dir/testCXXCompiler.cxx.obj > > C:\PROGRA~2\VISUAL~1.0\VC\bin\cl.exe > @C:\Users\geire\AppData\Local\Temp\nm2E87.tmp > > testCXXCompiler.cxx > > Linking CXX executable cmTC_7a292.exe > > D:\software\cmake\bin\cmake.exe -E vs_link_exe > --intdir=CMakeFiles\cmTC_7a292.dir --manifests -- > C:\PROGRA~2\VISUAL~1.0\VC\bin\link.exe /nologo > @CMakeFiles\cmTC_7a292.dir\objects1.rsp > @C:\Users\geire\AppData\Local\Temp\nm2ED6.tmp > > > > Detecting CXX compiler ABI info compiled with the following output: > Change Dir: > D:/kaa/kaaBuild/avro-src-1.7.7/lang/c++/build.win/CMakeFiles/CMakeTmp > > Run Build Command:"nmake" "/NOLOGO" "cmTC_f379b\fast" > "C:\Program Files (x86)\Visual Studio 14.0\VC\BIN\nmake.exe" -f > CMakeFiles\cmTC_f379b.dir\build.make /nologo -L > CMakeFiles\cmTC_f379b.dir\build > > Building CXX object CMakeFiles/cmTC_f379b.dir/CMakeCXXCompilerABI.cpp.obj > > C:\PROGRA~2\VISUAL~1.0\VC\bin\cl.exe > @C:\Users\geire\AppData\Local\Temp\nm30F8.tmp > > CMakeCXXCompilerABI.cpp > > Linking CXX executable cmTC_f379b.exe > > D:\software\cmake\bin\cmake.exe -E vs_link_exe > --intdir=CMakeFiles\cmTC_f379b.dir --manifests -- > C:\PROGRA~2\VISUAL~1.0\VC\bin\link.exe /nologo > @CMakeFiles\cmTC_f379b.dir\objects1.rsp > @C:\Users\geire\AppData\Local\Temp\nm3147.tmp > > > > > > Detecting CXX [] compiler features compiled with the following output: > Change Dir: > D:/kaa/kaaBuild/avro-src-1.7.7/lang/c++/build.win/CMakeFiles/CMakeTmp > > Run Build Command:"nmake" "/NOLOGO" "cmTC_1939d\fast" > "C:\Program Files (x86)\Visual Studio 14.0\VC\BIN\nmake.exe" -f > CMakeFiles\cmTC_1939d.dir\build.make /nologo -L > CMakeFiles\cmTC_1939d.dir\build > > Building CXX object CMakeFiles/cmTC_1939d.dir/feature_tests.cxx.obj > > C:\PROGRA~2\VISUAL~1.0\VC\bin\cl.exe > @C:\Users\geire\AppData\Local\Temp\nm3398.tmp > > feature_tests.cxx > > Linking CXX executable cmTC_1939d.exe > > D:\software\cmake\bin\cmake.exe -E vs_link_exe > --intdir=CMakeFiles\cmTC_1939d.dir --manifests -- > C:\PROGRA~2\VISUAL~1.0\VC\bin\link.exe /nologo > @CMakeFiles\cmTC_1939d.dir\objects1.rsp > @C:\Users\geire\AppData\Local\Temp\nm33F7.tmp > > > > Feature record: CXX_FEATURE:1cxx_alias_templates > Feature record: CXX_FEATURE:1cxx_alignas > Feature record: CXX_FEATURE:1cxx_alignof > Feature record: CXX_FEATURE:1cxx_attributes > Feature record: CXX_FEATURE:1cxx_attribute_deprecated > Feature record: CXX_FEATURE:1cxx_auto_type > Feature record: CXX_FEATURE:1cxx_binary_literals > Feature record: CXX_FEATURE:1cxx_constexpr > Feature record: CXX_FEATURE:1cxx_contextual_conversions > Feature record: CXX_FEATURE:1cxx_decltype > Feature record: CXX_FEATURE:1cxx_decltype_auto > Feature record: CXX_FEATURE:1cxx_default_function_template_args > Feature record: CXX_FEATURE:1cxx_defaulted_functions > Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers > Feature record: CXX_FEATURE:1cxx_delegating_constructors > Feature record: CXX_FEATURE:1cxx_deleted_functions > Feature record: CXX_FEATURE:1cxx_digit_separators > Feature record: CXX_FEATURE:1cxx_enum_forward_declarations > Feature record: CXX_FEATURE:1cxx_explicit_conversions > Feature record: CXX_FEATURE:1cxx_extended_friend_declarations > Feature record: CXX_FEATURE:1cxx_extern_templates > Feature record: CXX_FEATURE:1cxx_final > Feature record: CXX_FEATURE:1cxx_func_identifier > Feature record: CXX_FEATURE:1cxx_generalized_initializers > Feature record: CXX_FEATURE:1cxx_generic_lambdas > Feature record: CXX_FEATURE:1cxx_inheriting_constructors > Feature record: CXX_FEATURE:1cxx_inline_namespaces > Feature record: CXX_FEATURE:1cxx_lambdas > Feature record: CXX_FEATURE:1cxx_lambda_init_captures > Feature record: CXX_FEATURE:1cxx_local_type_template_args > Feature record: CXX_FEATURE:1cxx_long_long_type > Feature record: CXX_FEATURE:1cxx_noexcept > Feature record: CXX_FEATURE:1cxx_nonstatic_member_init > Feature record: CXX_FEATURE:1cxx_nullptr > Feature record: CXX_FEATURE:1cxx_override > Feature record: CXX_FEATURE:1cxx_range_for > Feature record: CXX_FEATURE:1cxx_raw_string_literals > Feature record: CXX_FEATURE:1cxx_reference_qualified_functions > Feature record: CXX_FEATURE:1cxx_return_type_deduction > Feature record: CXX_FEATURE:1cxx_right_angle_brackets > Feature record: CXX_FEATURE:1cxx_rvalue_references > Feature record: CXX_FEATURE:1cxx_sizeof_member > Feature record: CXX_FEATURE:1cxx_static_assert > Feature record: CXX_FEATURE:1cxx_strong_enums > Feature record: CXX_FEATURE:1cxx_template_template_parameters > Feature record: CXX_FEATURE:1cxx_thread_local > Feature record: CXX_FEATURE:1cxx_trailing_return_types > Feature record: CXX_FEATURE:1cxx_unicode_literals > Feature record: CXX_FEATURE:1cxx_uniform_initialization > Feature record: CXX_FEATURE:1cxx_unrestricted_unions > Feature record: CXX_FEATURE:1cxx_user_literals > Feature record: CXX_FEATURE:1cxx_variadic_macros > Feature record: CXX_FEATURE:1cxx_variadic_templates > You are my last hope for a solution. I know that i shouldn't hope too much, but i'm clueless after two days of searching and reading the documentations to be able to solve this problem. But I need avro so badly. Heh. Did I have missed something ? Overlooked something ? What can I do to solve this ? Any help would be appreciated. Sincerely - kg -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kent.Knox at amd.com Wed Mar 16 17:35:56 2016 From: Kent.Knox at amd.com (Knox, Kent) Date: Wed, 16 Mar 2016 21:35:56 +0000 Subject: [CMake] Building with Cmake using Boost problem (Karel Geiregat) In-Reply-To: References: Message-ID: It looks like you built static libraries with b2: PS D:\software\boost_1_60_0\stage\lib> Get-ChildItem libboost_filesystem* > -name > libboost_filesystem-vc140-mt-1_60.lib > libboost_filesystem-vc140-mt-gd-1_60.lib But I believe you are telling cmake (or boost preprocessor?) to search for dynamic libraries: > add_definitions ( > -DBOOST_REGEX_DYN_LINK > -DBOOST_FILESYSTEM_DYN_LINK > -DBOOST_SYSTEM_DYN_LINK Try building dynamic (.dll w/ import libs) boost libraries and see if cmake finds them. Kent ________________________________________ From post at hendrik-sattler.de Wed Mar 16 17:43:18 2016 From: post at hendrik-sattler.de (Hendrik Sattler) Date: Wed, 16 Mar 2016 22:43:18 +0100 Subject: [CMake] Building with Cmake using Boost problem In-Reply-To: References: Message-ID: Am 16. M?rz 2016 22:13:14 MEZ, schrieb Karel Geiregat : >According to the cmake documentation of FindBoost > you have to >name >the required libraries as described; > >"date_time" for "libboost_date_time" You do NOT have to rename any files! Doing so completely defeats the purpose of a find module. Additionally, .lib files for Microsoft compilers do NOT start like libxxx.lib but only xxx.lib Building boost with your compiler should give you the right files as-is. Why are you reading documentation of cmake 3.0 when using cmake 3.5? I cannot find anything in the documentation of the boost find module about renaming. However it documents steps to debug problems. HS From DLRdave at aol.com Thu Mar 17 08:51:53 2016 From: DLRdave at aol.com (David Cole) Date: Thu, 17 Mar 2016 08:51:53 -0400 Subject: [CMake] fixup_bundle on Windows : issue with multiple exe applications In-Reply-To: References: Message-ID: A multiple folder approach will be very difficult. The basic assumptions are: - On Windows, the "one executable path" is the destination path to which to copy all of the DLLs that need to be copied, so they all end up in the same directory. (You'd have to have multiple copies in multiple locations, at which point, it probably makes sense to have each of your exes set up to use a common shared DLL folder instead.) - On Mac, the "one executable path" is used to fixup libraries to use "@executable_path" relative references, so it's different for each different exe path. If two executables depend on the same library, but are in different places, but the library is only in one place, then you cannot use an "@executable_path" relative reference to find the library. If all your executables are not in the same directory with each other, then BundleUtilities will probably not make you a happy camper. HTH, David C. On Fri, Mar 4, 2016 at 9:30 AM, Benjamin Ballet wrote: > FYI verifying_app failed with main.exe failed (3.4.3) because toptool > depends on topdool.dll located only in toptoolfolder. The workaround is to > include toptoolfolder in libs folder for fixup_bundle(main.exe...) > > David your answer was helpful to me. I know it's an expected behavior. > > Would a patch handling such multiple folder application been accepted ? I > may try to work on it, since I either have to work on the workarounds or a > nice improvment. > > > 2016-03-04 14:15 GMT+01:00 Benjamin Ballet : >> >> Indeed I was lucky : It worked with 3.3.1 but not anymore with 3.4.3.. >> I've got a strang bug with one .NET dll generated near a tool : >> >> CMake Error at C:/Program Files >> (x86)/CMake/share/cmake-3.4/Modules/GetPrerequisites.cmake:798 (message): >> 106> C:/Program Files (x86)/Microsoft Visual Studio >> 12.0/VC/bin/dumpbin.exe >> 106> failed: 1181 >> >> I'm digging >> >> >> >> 2016-03-03 21:02 GMT+01:00 David Cole : >>> >>> It was designed originally with the assumption that all the >>> executables in a bundle are in the same directory. If you violate that >>> assumption, I don't think you can count on it to do the right thing >>> 100% of the time. >>> >>> If it works for you calling it multiple times with deepest first, then >>> maybe you can get lucky... >>> >>> I would definitely dig into it and understand exactly what it's doing, >>> though, if you want to make sure it's going to continue working for >>> your scenario. >>> >>> >>> HTH, >>> David C. >>> >>> >>> On Thu, Mar 3, 2016 at 1:43 PM, Benjamin Ballet >>> wrote: >>> > Hello >>> > >>> > I'd like to discuss a problem I encountered today with the very useful >>> > module BundleUtilities >>> > >>> > We have an application on Windows with one main exe file in the top >>> > folder >>> > and a few other exe in subdirectories, like that : >>> > >>> > applicationfolder \ >>> > | main.exe >>> > | toolsfolder \ >>> > | supertoolfolder \ >>> > | >>> > supertool.exe >>> > | toptoolfolder \ >>> > | >>> > toptool.exe >>> > >>> > But if I simply call >>> > fixup_bundle("applicationfolder/main.exe" plugins libs) >>> > >>> > the verify_app will fails. >>> > >>> > Just a reminder that there is no rpath on Windows : dll must be either >>> > in >>> > PATH or in the same folder or in the working directory. >>> > >>> > We expected fixup_bundle to copy the required dll for main.exe in >>> > applicationfolder, the required dll for supertool.exe in >>> > supertoolfolder and >>> > the required dll for toptool.exe in toptoolfolder, but it acually >>> > didn't >>> > copied anything in supertoolfolder and toptoolfolder. >>> > >>> > I worked around this issue by calling fixup_bundle multiple time with >>> > the >>> > following order : (the deepest exes first) >>> > >>> > >>> > fixup_bundle("applicationfolder/toolsfolder/supertoolfolder/supertool.exe" >>> > plugins libs) >>> > fixup_bundle("applicationfolder/toolsfolder/toptoolfolder/toptool.exe" >>> > plugins libs) >>> > fixup_bundle("applicationfolder/main.exe" plugins libs) >>> > >>> > >>> > -- >>> > Benjamin BALLET >>> > Ing?nieur R&D >>> > >>> > ACTIVISU >>> > 19, rue Klock - 92110 Clichy >>> >> Standard T?l : 01 44 69 37 37 >>> >> www.activisu.com >>> > >>> > -- >>> > >>> > 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 >> >> >> >> >> -- >> Benjamin BALLET >> Ing?nieur R&D >> >> ACTIVISU >> 19, rue Klock - 92110 Clichy >> > Standard T?l : 01 44 69 37 37 >> > www.activisu.com > > > > > -- > Benjamin BALLET > Ing?nieur R&D > > ACTIVISU > 19, rue Klock - 92110 Clichy >> Standard T?l : 01 44 69 37 37 >> www.activisu.com From c.coutinho at redstack.nl Thu Mar 17 09:32:29 2016 From: c.coutinho at redstack.nl (Chris Coutinho) Date: Thu, 17 Mar 2016 13:32:29 +0000 Subject: [CMake] Cmake cannot locate header file that exists on my system Message-ID: I'm attempting to install Dakota 6.3.0 using cmake 3.5.0 on a 64-bit Linux box from source (to link python and MATLAB), and Dakota is having trouble finding some dependencies. I've been able to install and use Dakota successfully on my previous machine (64-bit, OpenSUSE 13.2, cmake 3.3.0) without any problems. Now that I upgraded to the more recent version of OpenSUSE (Opensuse Leap 42.1) and cmake (3.5.0), I'm not able to get past this error. I am using cmake to build the source and create a makefile. Configuring cmake is fine; however, when running 'make' I get an error at around 5% of compiling: [ 5%] Building CXX object packages/OPTPP/src/CMakeFiles/optpp.dir/globals.C.o In file included from /opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/globals.C:4:0: /opt/dakota/dakota-6.3.0.src/packages/OPTPP/include/globals.h:22:41: fatal error: Teuchos_SerialDenseMatrix.hpp: No such file or directory #include "Teuchos_SerialDenseMatrix.hpp" ^ compilation terminated. I looked for the missing file 'Teuchos_SerialDenseMatrix.hpp', and see that I have two copies on my computer from installing trilinos 11.4.3 through the package manager. One is located under '/usr/include/trilinos', and the other is located '/usr/lib64/mpi/gcc/openmpi/include/trilinos'. I'm not sure why I have two copies... I added both of those directories to LD_LIBRARY_PATH in ~/.bashrc, but the error keeps coming up that Dakota isn't able to find the file. Can anyone help me with this installation issue? Kind regards, Chris Coutinho, EIT R&D Engineer REDstack, B.V. Pieter Zeemanstraat 6 8606 JR Sneek, The Netherlands work: +31 6 2222 5785 mobile: +31 6 1689 0287 www.redstack.nl De informatie verzonden middels deze e-mail is uitsluitend bestemd voor de geadresseerde. Gebruik door anderen is niet toegestaan. Openbaarmaking, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan. A.Hak staat niet in voor een juiste en volledige overbrenging van de inhoud, alsmede de tijdige ontvangst daarvan. The information contained in this communication, including files, is confidential and legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance to the contents of this information, is strictly prohibited and may be unlawful. A.Hak is not liable for the proper, complete and timely transmission of the information contained in this communication. -------------- next part -------------- An HTML attachment was scrubbed... URL: From benzejaa at gmail.com Thu Mar 17 10:48:44 2016 From: benzejaa at gmail.com (James Benze) Date: Thu, 17 Mar 2016 10:48:44 -0400 Subject: [CMake] Clarifying Cmake behavior In-Reply-To: References: Message-ID: I did a bit more searching around, and, for me at least, setting Boost_REALPATH on also seems to be a valid solution to the problem, as the linker will no longer get confused between the system installed libraries and my custom ones. I dunno if that works in all situations, but it seems to be the cleanest solution to what I'm doing. On Tue, Mar 15, 2016 at 5:16 PM, Elizabeth Fischer wrote: > Something is wrong here. In 99% of the cases I've seen, it is not > necessary to set LD_LIBRARY_PATH. That env var is evil, and should be used > only as a last resort, and temporarily at that. There must be a better > way... > > > On Tue, Mar 15, 2016 at 2:38 PM, James Benze wrote: > >> So I combed through the source code, and solved the problem, mostly. It >> did turn out to be a cmake issue, sort of, so I figured I'd post here for >> posterity in case future problem solvers come across a similar issue. >> >> So I'm using both a custom compiler and a custom set of boost libraries. >> For simplicity, I installed them to the same prefix >> (/path/to/custom/stuff). Now cmake has a list of libraries that it thinks >> are always looked in for link directories. If you use a custom compiler >> (/path/to/custom/stuff/bin/g++ for example), it adds that compiler's >> libraries to it's "implicit link directories", ones that it assumes are >> found automatically (in this case /path/to/custom/stuff/lib and >> /path/to/custom/stuff/lib64). Because my custom boost version was in this >> library path (/path/to/custom/stuff/lib) cmake assumed that the compiler >> could find them and just used the "-l" syntax with no RPATH set. When I >> used my control set of libraries, they were installed in a different prefix >> (/path/to/test/boost/) so cmake says "oh you can't find these" and did the >> full path linkage plus RPATH. >> >> So my two solutions are as follows: >> >> 1) set LD_LIBRARY_PATH when building. In this case, everything links >> correctly, although ld harmlessly complains about conflicts with the >> distribution-installed libraries in /usr/lib/ >> 2) Install boost in a different directory than my custom compiler. >> >> Cheers, all. >> >> On Tue, Mar 15, 2016 at 10:38 AM, James Benze wrote: >> >>> Hey all: >>> >>> I'm trying to compile boost with some weird options, and I can't get >>> projects linked with it to compile correctly. As using regularly compiled >>> boost seems to work just fine, this indicates my issue is not with >>> cmake...however I was hoping I could get some clarification on how cmake >>> searches for things in order to diagnose my issue. >>> >>> I made a toy project here: >>> >>> cmake_minimum_required(VERSION 2.8.4) >>> project(testproject) >>> >>> find_package(Boost 1.58.0 REQUIRED COMPONENTS thread) >>> add_executable(a.out main.cpp) >>> target_link_libraries(a.out ${Boost_LIBRARIES}) >>> >>> When I build this project with the "good" normally compiled boost >>> libraries, I get this CMakeFiles/a.out.dir/link.txt: >>> >>> /full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out >>> -rdynamic /full/path/to/good/boost/libboost_thread.so >>> -Wl,-rpath,/full/path/to/good/boost >>> >>> When I build the project with the exact same options, except >>> substituting the "bad" boost for the BOOST_ROOT variable, I get: >>> >>> /full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out >>> -rdynamic -lboost_thread >>> >>> The obvious differences here are that with the good boost libraries, we >>> get a full path to the boost library and not a shortened path. >>> Additionally, with the good library, I get a the rpath to the library set >>> as well. The ${Boost_LIBRARIES} variable is the full path to >>> libboost_thread.so in both cases. >>> >>> This is obviously a problem with my boost compilation, but this is my >>> only clue to diagnosing the problem. I was hoping for some insight as to >>> why cmake would choose one way of linking over another so I could attempt >>> to fix my actual problem. >>> >>> Thanks! >>> >> >> >> -- >> >> 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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karelgeiregat at gmail.com Thu Mar 17 11:14:59 2016 From: karelgeiregat at gmail.com (Karel Geiregat) Date: Thu, 17 Mar 2016 16:14:59 +0100 Subject: [CMake] Building with Cmake using Boost problem (Karel Geiregat) In-Reply-To: References: Message-ID: OH GOD ! Just saying, i have spent 3 days finding a solution to this problem since the files got provided from a 3th party provider. The team that got assigned to this project asked me (i'm senior QA and responsible for further development). In the meanwhile, this project has to be set in standby phase because of the building problems. We, all, and especially I certainly have overlooked on that part. I didn't understood it well. When i have generated the dll's using the build process described in Boost manuals ... cmake found the libraries ! Now, an other issue arises. But at least cmake is now able to find the boost libraries ^^ Thanks ! 2016-03-16 22:35 GMT+01:00 Knox, Kent : > It looks like you built static libraries with b2: > PS D:\software\boost_1_60_0\stage\lib> Get-ChildItem libboost_filesystem* > > -name > > libboost_filesystem-vc140-mt-1_60.lib > > libboost_filesystem-vc140-mt-gd-1_60.lib > > But I believe you are telling cmake (or boost preprocessor?) to search for > dynamic libraries: > > add_definitions ( > > -DBOOST_REGEX_DYN_LINK > > -DBOOST_FILESYSTEM_DYN_LINK > > -DBOOST_SYSTEM_DYN_LINK > > Try building dynamic (.dll w/ import libs) boost libraries and see if > cmake finds them. > > Kent > ________________________________________ > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andreas-Naumann at gmx.net Thu Mar 17 11:30:53 2016 From: Andreas-Naumann at gmx.net (Andreas Naumann) Date: Thu, 17 Mar 2016 16:30:53 +0100 Subject: [CMake] Cmake cannot locate header file that exists on my system In-Reply-To: References: Message-ID: <56EACDAD.8020901@gmx.net> You have to add the directory /usr/include/trilinos to the c++ include directories. The fastest workaround would be, to add the directory to the CMAKE_CXX_FLAGS using ccmake or cmake-gui. The better solution is to look for any hint regarding trilinos in the CMakeLists.txt of dakota and check, why the corresponding include directory is not added. Regards, Andreas Am 17.03.2016 um 14:32 schrieb Chris Coutinho: > > I?m attempting to install Dakota 6.3.0 using cmake 3.5.0 on a 64-bit > Linux box from source (to link python and MATLAB), and Dakota is > having trouble finding some dependencies. I?ve been able to install > and use Dakota successfully on my previous machine (64-bit, OpenSUSE > 13.2, cmake 3.3.0) without any problems. Now that I upgraded to the > more recent version of OpenSUSE (Opensuse Leap 42.1) and cmake > (3.5.0), I?m not able to get past this error. > > I am using cmake to build the source and create a makefile. > Configuring cmake is fine; however, when running ?make? I get an error > at around 5% of compiling: > > /[ 5%] Building CXX object > packages/OPTPP/src/CMakeFiles/optpp.dir/globals.C.o/ > /In file included from > /opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/globals.C:4:0:/ > //opt/dakota/dakota-6.3.0.src/packages/OPTPP/include/globals.h:22:41: > fatal error: Teuchos_SerialDenseMatrix.hpp: No such file or directory/ > /#include "Teuchos_SerialDenseMatrix.hpp"/ > /^/ > /compilation terminated./ > > I looked for the missing file ?Teuchos_SerialDenseMatrix.hpp?, and see > that I have two copies on my computer from installing trilinos 11.4.3 > through the package manager. One is located under > ?/usr/include/trilinos?, and the other is located > ?/usr/lib64/mpi/gcc/openmpi/include/trilinos?. I?m not sure why I have > two copies? > > I added both of those directories to LD_LIBRARY_PATH in ~/.bashrc, but > the error keeps coming up that Dakota isn?t able to find the file. Can > anyone help me with this installation issue? > > Kind regards, > > *Chris Coutinho,* EIT > > R&D Engineer > > REDstack, B.V. > > Pieter Zeemanstraat 6 > > 8606 JR Sneek, The Netherlands > > work: +31 6 2222 5785 > > mobile: +31 6 1689 0287 > > www.redstack.nl > > De informatie verzonden middels deze e-mail is uitsluitend bestemd > voor de geadresseerde. Gebruik door anderen is niet toegestaan. > Openbaarmaking, verspreiding en/of verstrekking van deze informatie > aan derden is niet toegestaan. A.Hak staat niet in voor een juiste en > volledige overbrenging van de inhoud, alsmede de tijdige ontvangst > daarvan. > > The information contained in this communication, including files, is > confidential and legally privileged. It is intended solely for the use > of the individual or entity to whom it is addressed and others > authorized to receive it. If you are not the intended recipient you > are hereby notified that any disclosure, copying, distribution or > taking any action in reliance to the contents of this information, is > strictly prohibited and may be unlawful. A.Hak is not liable for the > proper, complete and timely transmission of the information contained > in this communication. > > From c.coutinho at redstack.nl Thu Mar 17 12:16:21 2016 From: c.coutinho at redstack.nl (Chris Coutinho) Date: Thu, 17 Mar 2016 16:16:21 +0000 Subject: [CMake] Cmake cannot locate header file that exists on my system In-Reply-To: <56EACDAD.8020901@gmx.net> References: <56EACDAD.8020901@gmx.net> Message-ID: Thanks for the quickfix Andreas, that fixed the problem. I've also found the bug that's the reason for the error, the compiler flags are mixing up relative and absolute pathnames. This is definitely a Dakota issue. Setting verbose option on when executing make gives me a better idea of what's wrong: ------- OUTPUT ------- Scanning dependencies of target optpp make[2]: Leaving directory '/opt/dakota/dakota-6.3.0.build' make -f packages/OPTPP/src/CMakeFiles/optpp.dir/build.make packages/OPTPP/src/CMakeFiles/optpp.dir/build make[2]: Entering directory '/opt/dakota/dakota-6.3.0.build' [ 5%] Building CXX object packages/OPTPP/src/CMakeFiles/optpp.dir/globals.C.o cd /opt/dakota/dakota-6.3.0.build/packages/OPTPP/src && /usr/bin/c++ -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -DDAKOTA_OPTPP -DHAVE_STD -DHAVE_SYS_TIMES_H -DHAVE_SYS_TIME_H -DHAVE_TIMES -Doptpp_EXPORTS -I/opt/dakota/dakota-6.3.0.build/packages/OPTPP/include -I/opt/dakota/dakota-6.3.0.src/packages/OPTPP/include -I/usr/lib64/mpi/gcc/openmpi/lib64/cmake/Teuchos/../../../usr/lib64/mpi/gcc/openmpi/include/trilinos -I/opt/dakota/dakota-6.3.0.src/packages/ampl -I/opt/dakota/dakota-6.3.0.build/packages/ampl -I/opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/Base -I/opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/Constraints -I/opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/GSS -I/opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/Newton -I/opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/PDS -I/opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/Utils -fPIC -o CMakeFiles/optpp.dir/globals.C.o -c /opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/globals.C In file included from /opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/globals.C:4:0: /opt/dakota/dakota-6.3.0.src/packages/OPTPP/include/globals.h:22:41: fatal error: Teuchos_SerialDenseMatrix.hpp: No such file or directory #include "Teuchos_SerialDenseMatrix.hpp" ^ compilation terminated. ------- OUTPUT ------- The relevant line is when it tries to link to my machines trilinos package, when mixing up relative and absolute paths: -I/usr/lib64/mpi/gcc/openmpi/lib64/cmake/Teuchos/../../../usr/lib64/mpi/gcc/openmpi/include/trilinos Thanks for the workaround! Cheers, Chris -----Original Message----- From: Andreas Naumann [mailto:Andreas-Naumann at gmx.net] Sent: donderdag 17 maart 2016 16:31 To: Chris Coutinho ; cmake at cmake.org Subject: Re: [CMake] Cmake cannot locate header file that exists on my system You have to add the directory /usr/include/trilinos to the c++ include directories. The fastest workaround would be, to add the directory to the CMAKE_CXX_FLAGS using ccmake or cmake-gui. The better solution is to look for any hint regarding trilinos in the CMakeLists.txt of dakota and check, why the corresponding include directory is not added. Regards, Andreas Am 17.03.2016 um 14:32 schrieb Chris Coutinho: > > I'm attempting to install Dakota 6.3.0 using cmake 3.5.0 on a 64-bit > Linux box from source (to link python and MATLAB), and Dakota is > having trouble finding some dependencies. I've been able to install > and use Dakota successfully on my previous machine (64-bit, OpenSUSE > 13.2, cmake 3.3.0) without any problems. Now that I upgraded to the > more recent version of OpenSUSE (Opensuse Leap 42.1) and cmake > (3.5.0), I'm not able to get past this error. > > I am using cmake to build the source and create a makefile. > Configuring cmake is fine; however, when running 'make' I get an error > at around 5% of compiling: > > /[ 5%] Building CXX object > packages/OPTPP/src/CMakeFiles/optpp.dir/globals.C.o/ > /In file included from > /opt/dakota/dakota-6.3.0.src/packages/OPTPP/src/globals.C:4:0:/ > //opt/dakota/dakota-6.3.0.src/packages/OPTPP/include/globals.h:22:41: > fatal error: Teuchos_SerialDenseMatrix.hpp: No such file or directory/ > /#include "Teuchos_SerialDenseMatrix.hpp"/ /^/ /compilation > terminated./ > > I looked for the missing file 'Teuchos_SerialDenseMatrix.hpp', and see > that I have two copies on my computer from installing trilinos 11.4.3 > through the package manager. One is located under > '/usr/include/trilinos', and the other is located > '/usr/lib64/mpi/gcc/openmpi/include/trilinos'. I'm not sure why I have > two copies... > > I added both of those directories to LD_LIBRARY_PATH in ~/.bashrc, but > the error keeps coming up that Dakota isn't able to find the file. Can > anyone help me with this installation issue? > > Kind regards, > > *Chris Coutinho,* EIT > > R&D Engineer > > REDstack, B.V. > > Pieter Zeemanstraat 6 > > 8606 JR Sneek, The Netherlands > > work: +31 6 2222 5785 > > mobile: +31 6 1689 0287 > > www.redstack.nl > > De informatie verzonden middels deze e-mail is uitsluitend bestemd > voor de geadresseerde. Gebruik door anderen is niet toegestaan. > Openbaarmaking, verspreiding en/of verstrekking van deze informatie > aan derden is niet toegestaan. A.Hak staat niet in voor een juiste en > volledige overbrenging van de inhoud, alsmede de tijdige ontvangst > daarvan. > > The information contained in this communication, including files, is > confidential and legally privileged. It is intended solely for the use > of the individual or entity to whom it is addressed and others > authorized to receive it. If you are not the intended recipient you > are hereby notified that any disclosure, copying, distribution or > taking any action in reliance to the contents of this information, is > strictly prohibited and may be unlawful. A.Hak is not liable for the > proper, complete and timely transmission of the information contained > in this communication. > > De informatie verzonden middels deze e-mail is uitsluitend bestemd voor de geadresseerde. Gebruik door anderen is niet toegestaan. Openbaarmaking, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan. A.Hak staat niet in voor een juiste en volledige overbrenging van de inhoud, alsmede de tijdige ontvangst daarvan. The information contained in this communication, including files, is confidential and legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance to the contents of this information, is strictly prohibited and may be unlawful. A.Hak is not liable for the proper, complete and timely transmission of the information contained in this communication. From allenbarnett5 at gmail.com Thu Mar 17 12:38:01 2016 From: allenbarnett5 at gmail.com (Allen Barnett) Date: Thu, 17 Mar 2016 12:38:01 -0400 Subject: [CMake] File names with unbalanced square brackets Message-ID: I inherited a set of files with somewhat unusual file names. In particular, there were a couple of files whose names included a single square bracket character. I processed these files with the file( GLOB ...) command and then iterated over the resulting list with foreach. However, the foreach command does not seem to break the resulting list apart correctly. To make this concrete, I have a directory with files named "a", "b[", and "c". file( GLOB FILES "*" ) returns the list: /home/allen/test/b[;/home/allen/test/c;/home/allen/test/a However, foreach( FILE ${FILES} ) message( ${FILE} ) endforeach() just prints the same thing. That is, foreach does not split FILES into separate pieces. If I rename "b[" to "b]" I see the same behavior. If I rename "b[" to "b[]" (or even "b]["), then foreach successfully splits FILES into the individual file names. I'm using CMake 3.3.2. I see the same thing on linux and windows. Thanks, Allen -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.huso at gns.cri.nz Thu Mar 17 17:46:07 2016 From: r.huso at gns.cri.nz (Rand Huso) Date: Fri, 18 Mar 2016 10:46:07 +1300 Subject: [CMake] Difficulty making MPI and OpenMP Fortran shared library with CMake Message-ID: I would like to use CMake for a personal project instead of make (which does work), but I can't seem to get CMake to work the way I think it should. The command "cmake ." runs fine, but the make produces this: Scanning dependencies of target MIFF Linking Fortran shared library libMIFF.so gfortran: fatal error: no input files; unwilling to write output files compilation terminated. make[2]: *** [src/libMIFF.so] Error 4 make[1]: *** [src/CMakeFiles/MIFF.dir/all] Error 2 make: *** [all] Error 2 This surprises me because I don't think I should see "gfortran" - I expected to see "mpif90". And that particular message seems to happen when there are insufficient arguments to "gfortran". (the wrapper "mpif90" is configured to use "gfortran", but all compilation should use the "mpif90" - which doesn't appear to be the case when looking through the generated makefiles.) Here's what my project looks like: Directory structure: MIFF - src/ - - CMakeLists.txt - - MIFFTest.f08 - - MIFFTestMessage.f08 - - MpiIocBaseMessage.f08 - - MpiIocControlMessage.f08 - - MpiIocFramework.f08 - - MpiIocLinkedListItem.f08 - CMakeLists.txt My system is: Ubuntu 14.04.4 LTS The mpif90 compiler is: GNU Fortran (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4 CMake reports: cmake version 2.8.12.2 Hopefully this is already fixed in newer versions of cmake - but this is the version currently installed - but that's difficult for me to test, as I'm working on a system that shouldn't deviate too far from our standard development platform. The CMakeLists.txt file in the MIFF directory is: cmake_minimum_required (VERSION 2.8.6) project( MIFF_Project ) add_subdirectory( src ) the CMakeLists.txt file in the MIFF/src directory is: cmake_minimum_required( VERSION 2.8.8 ) project( MIFF_Project ) enable_language( Fortran ) set( CMAKE_FORTRAN_COMPILER mpif90 ) file( GLOB MIFF_Code *.f* ) message( STATUS "MIFF_Code: ${MIFF_Code}" ) add_library( MIFF SHARED ${MIFF_Code} ) set_target_properties( MIFF PROPERTIES LINKER_LANGUAGE Fortran ) # OUTPUT_NAME MIFF ) I think I've exhausted Google looking for a solution, and I have a standard Makefile that seems to work fine: .PHONY : all clean run COMPILER = mpif90 FFLAGS = -shared -fPIC -g -I/usr/include LIBRARY = MIFF.so EXECUTABLE = MIFFTest EXESOURCES = src/MIFFTest.f08 \ src/MIFFTestMessage.f08 LIBSOURCES = src/MpiIocBaseMessage.f08 \ src/MpiIocControlMessage.f08 \ src/MpiIocLinkedListItem.f08 \ src/MpiIocFramework.f08 src/MIFFTest.o : src/MIFFTest.f08 src/MIFFTestMessage.f08 all : $(LIBRARY) $(EXECUTABLE) clean : - rm -f *.o *.so *.mod $(EXECUTABLE) run : export LD_LIBRARY_PATH=~/workspace/MIFF mpiexec -n 2 $(EXECUTABLE) $(LIBRARY) : $(LIBSOURCES) $(COMPILER) $(FFLAGS) $(LIBSOURCES) -o $(LIBRARY) $(EXECUTABLE) : $(EXESOURCES) $(LIBRARY) export LD_LIBRARY_PATH=~/workspace/MIFF $(COMPILER) -o $(EXECUTABLE) $(EXESOURCES) $(LIBRARY) Except for the problem of having to issue the "make all" twice because of a dependency problem I haven't worked out, this hand-crafted Makefile works. It's bad enough that I'm pushing the boundaries of polymorphism in MPI+OpenMP+Fortran. I'd appreciate any assistance getting cmake to work for my project. -------------- next part -------------- An HTML attachment was scrubbed... URL: From anton.yartsev at gmail.com Thu Mar 17 21:19:35 2016 From: anton.yartsev at gmail.com (Anton Yartsev) Date: Fri, 18 Mar 2016 04:19:35 +0300 Subject: [CMake] Problem using VS-compiled Clang as a C/C++ compiler. In-Reply-To: <56E1F8D9.4020602@Gmail.com> References: <56D8D710.1050107@Gmail.com> <56D96E79.7020004@Gmail.com> <56E099B3.1010206@Gmail.com> <56E0B65F.4060505@Gmail.com> <56E1F8D9.4020602@Gmail.com> Message-ID: <56EB57A7.30901@Gmail.com> Finally resolved the issue. The problem was that RC.exe was not in my %PATH%. Thanks all for assistance! > --------------------------------------------------- CMake output: > -- The C compiler identification is Clang 3.7.1 > -- The CXX compiler identification is Clang 3.7.1 > -- Check for working C compiler using: Ninja > -- Check for working C compiler using: Ninja -- broken > CMake Error at C:/Program > Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message): > The C compiler "D:/-Work-/LLVM_3.7.1_win64/msbuild-bin/cl.exe" is > not able > to compile a simple test program. > > It fails with the following output: > > Change Dir: > D:/-Work-/llvm-3.7.1.src/-CLANG-/ProjectDir/CMakeFiles/CMakeTmp > > > > Run Build Command:"C:/PROGRA~1/ninja/ninja.exe" "cmTC_6d431" > > [1/2] Building C object CMakeFiles\cmTC_6d431.dir\testCCompiler.c.obj > > [2/2] Linking C executable cmTC_6d431.exe > > FAILED: cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E > vs_link_exe --intdir=CMakeFiles\cmTC_6d431.dir --manifests -- > C:\PROGRA~1\MICROS~2.0\VC\bin\link.exe /nologo > CMakeFiles\cmTC_6d431.dir\testCCompiler.c.obj /out:cmTC_6d431.exe > /implib:cmTC_6d431.lib /pdb:cmTC_6d431.pdb /version:0.0 /machine:x64 > /debug > /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib > winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib > advapi32.lib && cd ." > > RC Pass 1 failed to run. -- Anton From petr.kmoch at gmail.com Fri Mar 18 03:17:23 2016 From: petr.kmoch at gmail.com (Petr Kmoch) Date: Fri, 18 Mar 2016 08:17:23 +0100 Subject: [CMake] File names with unbalanced square brackets In-Reply-To: References: Message-ID: Hi Allen. I'm not sure whether it's documented, but CMake interprets square brackets as escaping the semi-colon character (which means a semi-colon in square brackets will not work as a list item separator). You will probably have to translate the file names for CMake processing by replacing [ and ] with a different string, and replacing it back just before use outside of CMake. Petr On Thu, Mar 17, 2016 at 5:38 PM, Allen Barnett wrote: > I inherited a set of files with somewhat unusual file names. In > particular, there were a couple of files whose names included a single > square bracket character. I processed these files with the file( GLOB ...) > command and then iterated over the resulting list with foreach. However, > the foreach command does not seem to break the resulting list apart > correctly. To make this concrete, I have a directory with files named "a", > "b[", and "c". file( GLOB FILES "*" ) returns the list: > > /home/allen/test/b[;/home/allen/test/c;/home/allen/test/a > > However, > > foreach( FILE ${FILES} ) > message( ${FILE} ) > endforeach() > > just prints the same thing. That is, foreach does not split FILES into > separate pieces. If I rename "b[" to "b]" I see the same behavior. If I > rename "b[" to "b[]" (or even "b]["), then foreach successfully splits > FILES into the individual file names. > > I'm using CMake 3.3.2. I see the same thing on linux and windows. > > Thanks, > Allen > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.chevrier at sap.com Fri Mar 18 03:50:58 2016 From: marc.chevrier at sap.com (CHEVRIER, Marc) Date: Fri, 18 Mar 2016 07:50:58 +0000 Subject: [CMake] File names with unbalanced square brackets In-Reply-To: References: Message-ID: <332C7477-11F8-4124-805A-49824E0D1851@sap.com> I think you can resolve your problem with the following syntax for foreach command: Foreach (FILE IN LISTS FILES) In this case the list is not expanded in your source so square brackets is no longer interpreted? From: CMake > on behalf of Petr Kmoch > Date: Friday 18 March 2016 at 08:17 To: Allen Barnett > Cc: "cmake at cmake.org" > Subject: Re: [CMake] File names with unbalanced square brackets Hi Allen. I'm not sure whether it's documented, but CMake interprets square brackets as escaping the semi-colon character (which means a semi-colon in square brackets will not work as a list item separator). You will probably have to translate the file names for CMake processing by replacing [ and ] with a different string, and replacing it back just before use outside of CMake. Petr On Thu, Mar 17, 2016 at 5:38 PM, Allen Barnett > wrote: I inherited a set of files with somewhat unusual file names. In particular, there were a couple of files whose names included a single square bracket character. I processed these files with the file( GLOB ...) command and then iterated over the resulting list with foreach. However, the foreach command does not seem to break the resulting list apart correctly. To make this concrete, I have a directory with files named "a", "b[", and "c". file( GLOB FILES "*" ) returns the list: /home/allen/test/b[;/home/allen/test/c;/home/allen/test/a However, foreach( FILE ${FILES} ) message( ${FILE} ) endforeach() just prints the same thing. That is, foreach does not split FILES into separate pieces. If I rename "b[" to "b]" I see the same behavior. If I rename "b[" to "b[]" (or even "b]["), then foreach successfully splits FILES into the individual file names. I'm using CMake 3.3.2. I see the same thing on linux and windows. Thanks, Allen -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jim.Eliot at awe.co.uk Fri Mar 18 08:00:56 2016 From: Jim.Eliot at awe.co.uk (Jim.Eliot at awe.co.uk) Date: Fri, 18 Mar 2016 12:00:56 +0000 Subject: [CMake] EXTERNAL: Difficulty making MPI and OpenMP Fortran shared library with CMake In-Reply-To: References: Message-ID: <201603181201.u2IC10dS001876@msw1.awe.co.uk> Hi, I?m not an expert but maybe I can help anyway. I think that setting CMAKE_FORTRAN_COMPILER might be failing because it should be CMAKE_Fortran_COMPILER (case sensitive). However, I am not sure that it is the best way to handle MPI code. I think that it might be better to use the MPI package which interrogates the system mpi wrappers (mpif90 etc.) and then uses the flags that it finds with the normal compiler (e.g. gfortran). Here is what works for me: find_package(MPI REQUIRED) ? include_directories(${MPI_Fortran_INCLUDE_PATH}) ? target_link_libraries(MIFF ${MPI_Fortran_LIBRARIES}) Kind regards, Jim Jim Eliot High Performance Computing Group AWE, Aldermaston, Reading, RG7 4PR From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Rand Huso Sent: 17 March 2016 21:46 To: cmake at cmake.org Subject: EXTERNAL: [CMake] Difficulty making MPI and OpenMP Fortran shared library with CMake I would like to use CMake for a personal project instead of make (which does work), but I can't seem to get CMake to work the way I think it should. The command "cmake ." runs fine, but the make produces this: Scanning dependencies of target MIFF Linking Fortran shared library libMIFF.so gfortran: fatal error: no input files; unwilling to write output files compilation terminated. make[2]: *** [src/libMIFF.so] Error 4 make[1]: *** [src/CMakeFiles/MIFF.dir/all] Error 2 make: *** [all] Error 2 This surprises me because I don't think I should see "gfortran" - I expected to see "mpif90". And that particular message seems to happen when there are insufficient arguments to "gfortran". (the wrapper "mpif90" is configured to use "gfortran", but all compilation should use the "mpif90" - which doesn't appear to be the case when looking through the generated makefiles.) Here's what my project looks like: Directory structure: MIFF - src/ - - CMakeLists.txt - - MIFFTest.f08 - - MIFFTestMessage.f08 - - MpiIocBaseMessage.f08 - - MpiIocControlMessage.f08 - - MpiIocFramework.f08 - - MpiIocLinkedListItem.f08 - CMakeLists.txt My system is: Ubuntu 14.04.4 LTS The mpif90 compiler is: GNU Fortran (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4 CMake reports: cmake version 2.8.12.2 Hopefully this is already fixed in newer versions of cmake - but this is the version currently installed - but that's difficult for me to test, as I'm working on a system that shouldn't deviate too far from our standard development platform. The CMakeLists.txt file in the MIFF directory is: cmake_minimum_required (VERSION 2.8.6) project( MIFF_Project ) add_subdirectory( src ) the CMakeLists.txt file in the MIFF/src directory is: cmake_minimum_required( VERSION 2.8.8 ) project( MIFF_Project ) enable_language( Fortran ) set( CMAKE_FORTRAN_COMPILER mpif90 ) file( GLOB MIFF_Code *.f* ) message( STATUS "MIFF_Code: ${MIFF_Code}" ) add_library( MIFF SHARED ${MIFF_Code} ) set_target_properties( MIFF PROPERTIES LINKER_LANGUAGE Fortran ) # OUTPUT_NAME MIFF ) I think I've exhausted Google looking for a solution, and I have a standard Makefile that seems to work fine: .PHONY : all clean run COMPILER = mpif90 FFLAGS = -shared -fPIC -g -I/usr/include LIBRARY = MIFF.so EXECUTABLE = MIFFTest EXESOURCES = src/MIFFTest.f08 \ src/MIFFTestMessage.f08 LIBSOURCES = src/MpiIocBaseMessage.f08 \ src/MpiIocControlMessage.f08 \ src/MpiIocLinkedListItem.f08 \ src/MpiIocFramework.f08 src/MIFFTest.o : src/MIFFTest.f08 src/MIFFTestMessage.f08 all : $(LIBRARY) $(EXECUTABLE) clean : - rm -f *.o *.so *.mod $(EXECUTABLE) run : export LD_LIBRARY_PATH=~/workspace/MIFF mpiexec -n 2 $(EXECUTABLE) $(LIBRARY) : $(LIBSOURCES) $(COMPILER) $(FFLAGS) $(LIBSOURCES) -o $(LIBRARY) $(EXECUTABLE) : $(EXESOURCES) $(LIBRARY) export LD_LIBRARY_PATH=~/workspace/MIFF $(COMPILER) -o $(EXECUTABLE) $(EXESOURCES) $(LIBRARY) Except for the problem of having to issue the "make all" twice because of a dependency problem I haven't worked out, this hand-crafted Makefile works. It's bad enough that I'm pushing the boundaries of polymorphism in MPI+OpenMP+Fortran. I'd appreciate any assistance getting cmake to work for my project. The information in this email and in any attachment(s) is commercial in confidence. If you are not the named addressee(s) or if you receive this email in error then any distribution, copying or use of this communication or the information in it is strictly prohibited. Please notify us immediately by email at admin.internet(at)awe.co.uk, and then delete this message from your computer. While attachments are virus checked, AWE plc does not accept any liability in respect of any virus which is not detected. AWE Plc Registered in England and Wales Registration No 02763902 AWE, Aldermaston, Reading, RG7 4PR -------------- next part -------------- An HTML attachment was scrubbed... URL: From allenbarnett5 at gmail.com Fri Mar 18 08:21:10 2016 From: allenbarnett5 at gmail.com (Allen Barnett) Date: Fri, 18 Mar 2016 08:21:10 -0400 Subject: [CMake] File names with unbalanced square brackets In-Reply-To: References: Message-ID: Hi Petr: You're right! If I rename "c" to "c]", it treats the whole "/home/allen/test/b[;/home/allen/test/c]" as an element of the list. The other file names are correctly split apart. Thanks, Allen On Fri, Mar 18, 2016 at 3:17 AM, Petr Kmoch wrote: > Hi Allen. > > I'm not sure whether it's documented, but CMake interprets square brackets > as escaping the semi-colon character (which means a semi-colon in square > brackets will not work as a list item separator). You will probably have to > translate the file names for CMake processing by replacing [ and ] with a > different string, and replacing it back just before use outside of CMake. > > Petr > > On Thu, Mar 17, 2016 at 5:38 PM, Allen Barnett > wrote: > >> I inherited a set of files with somewhat unusual file names. In >> particular, there were a couple of files whose names included a single >> square bracket character. I processed these files with the file( GLOB ...) >> command and then iterated over the resulting list with foreach. However, >> the foreach command does not seem to break the resulting list apart >> correctly. To make this concrete, I have a directory with files named "a", >> "b[", and "c". file( GLOB FILES "*" ) returns the list: >> >> /home/allen/test/b[;/home/allen/test/c;/home/allen/test/a >> >> However, >> >> foreach( FILE ${FILES} ) >> message( ${FILE} ) >> endforeach() >> >> just prints the same thing. That is, foreach does not split FILES into >> separate pieces. If I rename "b[" to "b]" I see the same behavior. If I >> rename "b[" to "b[]" (or even "b]["), then foreach successfully splits >> FILES into the individual file names. >> >> I'm using CMake 3.3.2. I see the same thing on linux and windows. >> >> Thanks, >> Allen >> >> -- >> >> 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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From allenbarnett5 at gmail.com Fri Mar 18 08:29:54 2016 From: allenbarnett5 at gmail.com (Allen Barnett) Date: Fri, 18 Mar 2016 08:29:54 -0400 Subject: [CMake] File names with unbalanced square brackets In-Reply-To: <332C7477-11F8-4124-805A-49824E0D1851@sap.com> References: <332C7477-11F8-4124-805A-49824E0D1851@sap.com> Message-ID: Hi Marc: Thanks for the tip. I learned some new CMake syntax! But, it doesn't seem to solve the problem. It appears that the semi-colon quoting property of the bracket wins in this case, too. Thanks, Allen On Fri, Mar 18, 2016 at 3:50 AM, CHEVRIER, Marc wrote: > I think you can resolve your problem with the following syntax for foreach > command: > Foreach (FILE IN LISTS FILES) > > In this case the list is not expanded in your source so square brackets is > no longer interpreted? > > > From: CMake on behalf of Petr Kmoch < > petr.kmoch at gmail.com> > Date: Friday 18 March 2016 at 08:17 > To: Allen Barnett > Cc: "cmake at cmake.org" > Subject: Re: [CMake] File names with unbalanced square brackets > > Hi Allen. > > I'm not sure whether it's documented, but CMake interprets square brackets > as escaping the semi-colon character (which means a semi-colon in square > brackets will not work as a list item separator). You will probably have to > translate the file names for CMake processing by replacing [ and ] with a > different string, and replacing it back just before use outside of CMake. > > Petr > > On Thu, Mar 17, 2016 at 5:38 PM, Allen Barnett > wrote: > >> I inherited a set of files with somewhat unusual file names. In >> particular, there were a couple of files whose names included a single >> square bracket character. I processed these files with the file( GLOB ...) >> command and then iterated over the resulting list with foreach. However, >> the foreach command does not seem to break the resulting list apart >> correctly. To make this concrete, I have a directory with files named "a", >> "b[", and "c". file( GLOB FILES "*" ) returns the list: >> >> /home/allen/test/b[;/home/allen/test/c;/home/allen/test/a >> >> However, >> >> foreach( FILE ${FILES} ) >> message( ${FILE} ) >> endforeach() >> >> just prints the same thing. That is, foreach does not split FILES into >> separate pieces. If I rename "b[" to "b]" I see the same behavior. If I >> rename "b[" to "b[]" (or even "b]["), then foreach successfully splits >> FILES into the individual file names. >> >> I'm using CMake 3.3.2. I see the same thing on linux and windows. >> >> Thanks, >> Allen >> >> -- >> >> 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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Fri Mar 18 09:09:22 2016 From: DLRdave at aol.com (David Cole) Date: Fri, 18 Mar 2016 09:09:22 -0400 Subject: [CMake] File names with unbalanced square brackets In-Reply-To: References: Message-ID: "A single pair of square brackets with ; inside have also long been used to designate registry [key;value] pairs on Windows." http://stackoverflow.com/a/36085151/236192 HTH, David C. On Fri, Mar 18, 2016 at 8:21 AM, Allen Barnett wrote: > Hi Petr: You're right! If I rename "c" to "c]", it treats the whole > "/home/allen/test/b[;/home/allen/test/c]" as an element of the list. The > other file names are correctly split apart. > Thanks, > Allen > > On Fri, Mar 18, 2016 at 3:17 AM, Petr Kmoch wrote: >> >> Hi Allen. >> >> I'm not sure whether it's documented, but CMake interprets square brackets >> as escaping the semi-colon character (which means a semi-colon in square >> brackets will not work as a list item separator). You will probably have to >> translate the file names for CMake processing by replacing [ and ] with a >> different string, and replacing it back just before use outside of CMake. >> >> Petr >> >> On Thu, Mar 17, 2016 at 5:38 PM, Allen Barnett >> wrote: >>> >>> I inherited a set of files with somewhat unusual file names. In >>> particular, there were a couple of files whose names included a single >>> square bracket character. I processed these files with the file( GLOB ...) >>> command and then iterated over the resulting list with foreach. However, the >>> foreach command does not seem to break the resulting list apart correctly. >>> To make this concrete, I have a directory with files named "a", "b[", and >>> "c". file( GLOB FILES "*" ) returns the list: >>> >>> /home/allen/test/b[;/home/allen/test/c;/home/allen/test/a >>> >>> However, >>> >>> foreach( FILE ${FILES} ) >>> message( ${FILE} ) >>> endforeach() >>> >>> just prints the same thing. That is, foreach does not split FILES into >>> separate pieces. If I rename "b[" to "b]" I see the same behavior. If I >>> rename "b[" to "b[]" (or even "b]["), then foreach successfully splits FILES >>> into the individual file names. >>> >>> I'm using CMake 3.3.2. I see the same thing on linux and windows. >>> >>> Thanks, >>> Allen >>> >>> -- >>> >>> 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 From allenbarnett5 at gmail.com Fri Mar 18 09:53:22 2016 From: allenbarnett5 at gmail.com (Allen Barnett) Date: Fri, 18 Mar 2016 09:53:22 -0400 Subject: [CMake] File names with unbalanced square brackets In-Reply-To: References: Message-ID: Hi David: Per your comment on the SO thread about escaping the ['s with a backslash:You mean something like this: file( GLOB FILES "*" ) string( REPLACE "[" "\\[" FILES_UPD "${FILES}" ) That doesn't appear to work. I still get everything past the first [ run together in the foreach. Thanks, Allen On Fri, Mar 18, 2016 at 9:09 AM, David Cole wrote: > "A single pair of square brackets with ; inside have also long been > used to designate registry [key;value] pairs on Windows." > > http://stackoverflow.com/a/36085151/236192 > > > HTH, > David C. > > > On Fri, Mar 18, 2016 at 8:21 AM, Allen Barnett > wrote: > > Hi Petr: You're right! If I rename "c" to "c]", it treats the whole > > "/home/allen/test/b[;/home/allen/test/c]" as an element of the list. The > > other file names are correctly split apart. > > Thanks, > > Allen > > > > On Fri, Mar 18, 2016 at 3:17 AM, Petr Kmoch > wrote: > >> > >> Hi Allen. > >> > >> I'm not sure whether it's documented, but CMake interprets square > brackets > >> as escaping the semi-colon character (which means a semi-colon in square > >> brackets will not work as a list item separator). You will probably > have to > >> translate the file names for CMake processing by replacing [ and ] with > a > >> different string, and replacing it back just before use outside of > CMake. > >> > >> Petr > >> > >> On Thu, Mar 17, 2016 at 5:38 PM, Allen Barnett > > >> wrote: > >>> > >>> I inherited a set of files with somewhat unusual file names. In > >>> particular, there were a couple of files whose names included a single > >>> square bracket character. I processed these files with the file( GLOB > ...) > >>> command and then iterated over the resulting list with foreach. > However, the > >>> foreach command does not seem to break the resulting list apart > correctly. > >>> To make this concrete, I have a directory with files named "a", "b[", > and > >>> "c". file( GLOB FILES "*" ) returns the list: > >>> > >>> /home/allen/test/b[;/home/allen/test/c;/home/allen/test/a > >>> > >>> However, > >>> > >>> foreach( FILE ${FILES} ) > >>> message( ${FILE} ) > >>> endforeach() > >>> > >>> just prints the same thing. That is, foreach does not split FILES into > >>> separate pieces. If I rename "b[" to "b]" I see the same behavior. If I > >>> rename "b[" to "b[]" (or even "b]["), then foreach successfully splits > FILES > >>> into the individual file names. > >>> > >>> I'm using CMake 3.3.2. I see the same thing on linux and windows. > >>> > >>> Thanks, > >>> Allen > >>> > >>> -- > >>> > >>> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjvbertin at gmail.com Sat Mar 19 05:52:57 2016 From: rjvbertin at gmail.com (=?UTF-8?B?UmVuw6kgSi4gVi4=?= Bertin) Date: Sat, 19 Mar 2016 10:52:57 +0100 Subject: [CMake] why no cumulative variable operations via the commandline? Message-ID: <2375070.X13T9g03i4@patux.local> Hi, I've been wondering about something that is a real stumbling block in a build/distribution system like MacPorts where settings can be modified in any number of consecutive steps. For instance, depending on what dependencies a package ("port") requires and how those dependencies are installed, elements may be added to the module search path repeatedly. In cmake language one does cumulative operations like that explicitly, but I'm not aware of any way to do that on the command line. Is there a reason why one cannot do something like cmake -DCMAKE_FOO+=bar or CMAKE -ACMAKE_FOO=bar (-A for add instead of define) (or -DCMAKE_FOO-=bar, for that matter...) ? Thanks, Ren? From nicholas11braden at gmail.com Sat Mar 19 09:41:13 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Sat, 19 Mar 2016 08:41:13 -0500 Subject: [CMake] why no cumulative variable operations via the commandline? In-Reply-To: <2375070.X13T9g03i4@patux.local> References: <2375070.X13T9g03i4@patux.local> Message-ID: The command line is the first point where variables can be defined (all code runs after this), so I am not sure where you expect pre-existing values to come from in order for a += or -= to make sense. Could you give an example of when you would find them useful? I think maybe I am not understanding what you want. If you just want to pass a list of values to a variable on the command line, separate the values with semicolons: cmake "-DMY_LIST=example value 1;example value 2" On Sat, Mar 19, 2016 at 4:52 AM, Ren? J. V. wrote: > Hi, > > I've been wondering about something that is a real stumbling block in a > build/distribution system like MacPorts where settings can be modified in any > number of consecutive steps. For instance, depending on what dependencies a > package ("port") requires and how those dependencies are installed, elements may > be added to the module search path repeatedly. > > In cmake language one does cumulative operations like that explicitly, but I'm > not aware of any way to do that on the command line. > > Is there a reason why one cannot do something like > > cmake -DCMAKE_FOO+=bar > > or > > CMAKE -ACMAKE_FOO=bar (-A for add instead of define) > > (or -DCMAKE_FOO-=bar, for that matter...) ? > > Thanks, > Ren? > > -- > > 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 From neil.n.carlson at gmail.com Sat Mar 19 10:13:10 2016 From: neil.n.carlson at gmail.com (Neil Carlson) Date: Sat, 19 Mar 2016 08:13:10 -0600 Subject: [CMake] Proper way to redefine build type compiler options Message-ID: What is considered best practice for (re)defining build-type compiler options for a project, especially one that may find itself as a subproject of something larger? To be concrete, say for Debug I want the project to use a set of warn/check options. Should I set (or add to) CMAKE_C_FLAGS_DEBUG, and if so should I use the CACHE FORCE options to get it into the cache? (I don't have a good feel for the implications.) Or is it better to append to CMAKE_C_FLAGS? I observe that the value of the latter precedes the value of the build-type variables on the compile line, and so it can't override those defaults. Or is some other way best? Also, say there was a compiler flag that was absolutely required. Where to add it so that it didn't get overridden by anything coming in through either CMAKE_C_FLAGS or the build-type specific variables? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjvbertin at gmail.com Sat Mar 19 13:03:23 2016 From: rjvbertin at gmail.com (=?UTF-8?B?UmVuw6kgSi4gVi4=?= Bertin) Date: Sat, 19 Mar 2016 18:03:23 +0100 Subject: [CMake] why no cumulative variable operations via the commandline? References: <2375070.X13T9g03i4@patux.local> Message-ID: <8412051.ZftflLMyzi@patux.local> Nicholas Braden wrote: > sense. Could you give an example of when you would find them useful? I > think maybe I am not understanding what you want. Yeah, I realise my explanation may not have been very clear. > If you just want to pass a list of values to a variable on the command > line, separate the values with semicolons: > cmake "-DMY_LIST=example value 1;example value 2" Now take an example where you are in fact assembling the commandline in subsequent steps. A good example would be a build system like MacPorts that uses a kind of header files (so-called PortGroups) that can be included by the build scripts for packages of dependent software (say, the Kate5 editor). There's a PortGroup for cmake itself, and there's a PortGroup for Qt5 and one for the KF5 frameworks. Each of those PortGroups can provide an element for MY_LIST (think of the module path, or preprocessor tokens), but evidently they cannot make assumptions about the contents of the variable. In other words, it would make sense for certain types of programmatically generated commandlines to do things like cmake -DMY_LIST+=val1 -DMY_LIST+=val3 -DMY_LIST+=val2 At the moment we can do this reliably by using our own registers, one for each CMake variable that might be used this way, splicing them into the commandline just before invoking cmake. Not impossible, but somewhat of a hassle and a pity for a feature that seems useful and probablye rather trivial to implement. CMake commandline can get quite long, so this might even make sense as a convenience for composing one manually. Of course it would be convenient to have a concatenation operator in the cmake language too ;) R From nicholas11braden at gmail.com Sat Mar 19 13:07:10 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Sat, 19 Mar 2016 12:07:10 -0500 Subject: [CMake] why no cumulative variable operations via the commandline? In-Reply-To: <8412051.ZftflLMyzi@patux.local> References: <2375070.X13T9g03i4@patux.local> <8412051.ZftflLMyzi@patux.local> Message-ID: Ah, I understand now - I have a habit of forgetting that you can configure existing CMake builds by repeatedly invoking cmake. I don't know if such a feature exists but it definitely sounds useful. On Sat, Mar 19, 2016 at 12:03 PM, Ren? J. V. wrote: > Nicholas Braden wrote: > > >> sense. Could you give an example of when you would find them useful? I >> think maybe I am not understanding what you want. > > Yeah, I realise my explanation may not have been very clear. > >> If you just want to pass a list of values to a variable on the command >> line, separate the values with semicolons: >> cmake "-DMY_LIST=example value 1;example value 2" > > > Now take an example where you are in fact assembling the commandline in > subsequent steps. A good example would be a build system like MacPorts that uses > a kind of header files (so-called PortGroups) that can be included by the build > scripts for packages of dependent software (say, the Kate5 editor). There's a > PortGroup for cmake itself, and there's a PortGroup for Qt5 and one for the KF5 > frameworks. Each of those PortGroups can provide an element for MY_LIST (think > of the module path, or preprocessor tokens), but evidently they cannot make > assumptions about the contents of the variable. > > In other words, it would make sense for certain types of programmatically > generated commandlines to do things like > > cmake -DMY_LIST+=val1 -DMY_LIST+=val3 -DMY_LIST+=val2 > > At the moment we can do this reliably by using our own registers, one for each > CMake variable that might be used this way, splicing them into the commandline > just before invoking cmake. Not impossible, but somewhat of a hassle and a pity > for a feature that seems useful and probablye rather trivial to implement. > > CMake commandline can get quite long, so this might even make sense as a > convenience for composing one manually. > > Of course it would be convenient to have a concatenation operator in the cmake > language too ;) > > R > > > -- > > 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 From rjvbertin at gmail.com Sat Mar 19 13:12:21 2016 From: rjvbertin at gmail.com (=?UTF-8?B?UmVuw6kgSi4gVi4=?= Bertin) Date: Sat, 19 Mar 2016 18:12:21 +0100 Subject: [CMake] why no cumulative variable operations via the commandline? References: <2375070.X13T9g03i4@patux.local> <8412051.ZftflLMyzi@patux.local> Message-ID: <1804626.bmu2o3UZ48@patux.local> Nicholas Braden wrote: > Ah, I understand now - I have a habit of forgetting that you can > configure existing CMake builds by repeatedly invoking cmake. I don't > know if such a feature exists but it definitely sounds useful. Yes, that would be another use case! R. From gedemagt at gmail.com Sat Mar 19 14:05:42 2016 From: gedemagt at gmail.com (gedemagt) Date: Sat, 19 Mar 2016 11:05:42 -0700 (MST) Subject: [CMake] Recompiling before when installing target Message-ID: <1458410742123-7593070.post@n2.nabble.com> Is it possible recompile and link a single file before installing a target? I have some string I want to hardcode into the source, so I use configure_file() to add it to a .cpp file and compile it. However, these values are different if the project is installed using 'make install'. Is it possible to recompile that single file and relink it and then copy to the install destination? -- View this message in context: http://cmake.3232098.n2.nabble.com/Recompiling-before-when-installing-target-tp7593070.html Sent from the CMake mailing list archive at Nabble.com. From boxerab at gmail.com Sun Mar 20 08:46:14 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Sun, 20 Mar 2016 08:46:14 -0400 Subject: [CMake] CMAKE_USE_PTHREADS_INIT cleanup Message-ID: I recently added pthreads to my cmake program. When I run valgrind, I get a "blocks still reachable" warning, coming from dl_init. I suspect that pthreads is not cleaning up properly. Is there a way of ensuring that the shared library for pthreads gets cleaned up correctly via cmake? i.e. a matching CLEANUP to got with the INIT call ? Thanks, Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Sun Mar 20 13:02:53 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Sun, 20 Mar 2016 13:02:53 -0400 Subject: [CMake] CMAKE_USE_PTHREADS_INIT cleanup In-Reply-To: References: Message-ID: On Sun, Mar 20, 2016 at 8:46 AM, Aaron Boxer wrote: > I recently added pthreads to my cmake program. > When I run valgrind, I get a "blocks still reachable" warning, > coming from dl_init. > > I suspect that pthreads is not cleaning up properly. Is there a way > of ensuring that the shared library for pthreads gets cleaned up correctly > via cmake? > > i.e. a matching CLEANUP to got with the INIT call ? > Turns out it isn't pthreads library. -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Sun Mar 20 13:14:06 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Sun, 20 Mar 2016 13:14:06 -0400 Subject: [CMake] How to suppress valgrind errors reported by NightlyMemCheck ? Message-ID: My program links to libstdc++. It turns out there is a well-known false positive from valgrind regarding libstdc++ memory pools. http://valgrind.org/docs/manual/faq.html#faq.reports How may I suppress this error when running ctest -D NightlyMemCheck ? Thanks, Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From xavier.besseron at uni.lu Sun Mar 20 13:50:57 2016 From: xavier.besseron at uni.lu (Xavier Besseron) Date: Sun, 20 Mar 2016 18:50:57 +0100 Subject: [CMake] How to suppress valgrind errors reported by NightlyMemCheck ? In-Reply-To: <839c6260d5884b5790f9ac42fcc93467@REED.uni.lux> References: <839c6260d5884b5790f9ac42fcc93467@REED.uni.lux> Message-ID: Hi Aaron, I don't know if that's what you're looking for, but you can try to set Valgrind options using an environment variable or a cmake variable set(VALGRIND_OPTS "--suppressions=/path/to/your_suppression_file.supp") or export VALGRIND_OPTS="--suppressions=/path/to/your_suppression_file.supp" Best regards, Xavier On Sun, Mar 20, 2016 at 6:14 PM, Aaron Boxer wrote: > My program links to libstdc++. It turns out there is a well-known false > positive > from valgrind regarding libstdc++ memory pools. > > http://valgrind.org/docs/manual/faq.html#faq.reports > > How may I suppress this error when running ctest -D NightlyMemCheck ? > > Thanks, > Aaron > -- Dr Xavier BESSERON Research associate FSTC, University of Luxembourg Campus Kirchberg, Office E-007 Phone: +352 46 66 44 5418 http://luxdem.uni.lu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.stein+cmake at mailbox.org Sun Mar 20 15:37:58 2016 From: alexander.stein+cmake at mailbox.org (Alexander Stein) Date: Sun, 20 Mar 2016 20:37:58 +0100 Subject: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS In-Reply-To: References: <6841933.oyp1NgLfeI@kongar> Message-ID: <1634714.lyjH4DigmD@kongar> On Tuesday 08 March 2016, 10:00:00 wrote Nicholas Braden: > Jakob, I don't think there is any confusion about what REQUIRED means. > Whether or not REQUIRED is provided, the list of OPTIONAL_COMPONENTS > should not be required under any circumstances. The example error > message seems pretty clear to me that the expected behavior and actual > behavior are different. I went and looked at the source code of the > find module: > > https://github.com/Kitware/CMake/blob/master/Modules/FindQt4.cmake > > It seems that there is no check whatsoever for > Qt4_FIND_REQUIRED_, so the find module just blindly assumes > that all components are required. > > More info: https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#find-modules > > To me this seems like a bug in the find module. Yep, FindQt4.cmake doesn't support OPTIONAL_COMPONENTS which seems only to work if FIND_PACKAGE_HANDLE_STANDARD_ARGS is called with HANDLE_COMPONENTS passed. This is not the case and does not work. I guess due to different naming scheme used for components. AFAICS they have to be e.g. Qt4_QtCore_FOUND, but not QT_QTCORE_FOUND. Best regards, Alexander From boxerab at gmail.com Sun Mar 20 18:21:41 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Sun, 20 Mar 2016 18:21:41 -0400 Subject: [CMake] How to suppress valgrind errors reported by NightlyMemCheck ? In-Reply-To: References: <839c6260d5884b5790f9ac42fcc93467@REED.uni.lux> Message-ID: Hi Xavier, On Sun, Mar 20, 2016 at 1:50 PM, Xavier Besseron wrote: > Hi Aaron, > > I don't know if that's what you're looking for, > but you can try to set Valgrind options using an environment variable or > a cmake variable > > set(VALGRIND_OPTS "--suppressions=/path/to/your_suppression_file.supp") > > > or > > > export VALGRIND_OPTS="--suppressions=/path/to/your_suppression_file.supp" > > Excellent, thanks for your help. This worked for me. Aaron > > > Best regards, > > Xavier > > On Sun, Mar 20, 2016 at 6:14 PM, Aaron Boxer wrote: > >> My program links to libstdc++. It turns out there is a well-known false >> positive >> from valgrind regarding libstdc++ memory pools. >> >> http://valgrind.org/docs/manual/faq.html#faq.reports >> >> How may I suppress this error when running ctest -D NightlyMemCheck ? >> >> Thanks, >> Aaron >> > > > > -- > Dr Xavier BESSERON > Research associate > FSTC, University of Luxembourg > Campus Kirchberg, Office E-007 > Phone: +352 46 66 44 5418 > http://luxdem.uni.lu/ > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mosra at centrum.cz Mon Mar 21 08:42:35 2016 From: mosra at centrum.cz (=?utf-8?q?Vladim=C3=ADr_Vondru=C5=A1?=) Date: Mon, 21 Mar 2016 13:42:35 +0100 Subject: [CMake] =?utf-8?q?EFFECTIVE=5FPLATFORM=5FNAME_not_expanded_in_TAR?= =?utf-8?q?GET=5F*_generator_expressions_on_iOS?= Message-ID: <20160321134235.25B57D72@centrum.cz> Hello, I came across this problem when trying to use XCTest macros ( https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When compiling for OSX, ctest properly executes all test cases, but when targeting iOS or iOS simulator, all the test cases fail similarly to the following: 25: Test command: /Applications/Xcode.app/Contents/Developer/usr/bin/xctest "/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTestRunner.xctest/../.." 25: Environment variables: 25: DYLD_FRAMEWORK_PATH=/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTest.framework/.. 25: Test timeout computed to be: 9.99988e+06 25: 2016-03-21 12:41:38.799 xctest[31113:31078264] The bundle ?Test? couldn?t be loaded because its executable couldn?t be located. Try reinstalling the bundle. 25/28 Test #25: UtilityTypeTraitsTest ...............***Failed 0.04 sec As you can see, the `${EFFECTIVE_PLATFORM_NAME}` is not being expanded to `-iphonesimulator` and thus the file is not found. The problem is that the `$` generator expression does not expand the variable. On the other hand, installation works without an issue, because the `cmake_install.cmake` scripts do additional round of variable expansion that (accidentally?) fixes this. The relevant part of the CMake source is here: https://github.com/Kitware/CMake/blob/cd569b962dbeaa7ea718021c16582cddd158df3a/Source/cmGeneratorTarget.cxx#L5063 >From the source it looks like the generator is just putting the "${EFFECTIVE_PLATFORM_NAME}" output and hopes that someone later expands it. That's the case with install scripts (so they work), but not with generator expressions. The `TARGET_LINKER_FILE_DIR` is not the only affected, the problem is the same for all `TARGET_*` generator expressions. Currently I'm working around this by partially hardcoding the path, but that's far from ideal and I would like to avoid that: if(CMAKE_OSX_SYSROOT MATCHES "iPhoneOS") set(platform_name "-iphoneos") elseif(CMAKE_OSX_SYSROOT MATCHES "iPhoneSimulator") set(platform_name "-iphonesimulator") endif() set(target_linker_file_dir ${CMAKE_CURRENT_BINARY_DIR}/$${platform_name}/${target}.xctest) Is there any way to fix this directly in CMake? Also the above workaround works only when targeting single SDK and not when having single generated project for both the device and the simulator. Thank you a lot for your help. mosra From ruslan_baratov at yahoo.com Mon Mar 21 09:56:40 2016 From: ruslan_baratov at yahoo.com (Ruslan Baratov) Date: Mon, 21 Mar 2016 20:56:40 +0700 Subject: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS In-Reply-To: <20160321134235.25B57D72@centrum.cz> References: <20160321134235.25B57D72@centrum.cz> Message-ID: <56EFFD98.8040208@yahoo.com> On 21-Mar-16 19:42, Vladim?r Vondru? wrote: > Hello, > > I came across this problem when trying to use XCTest macros ( https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When compiling for OSX, ctest properly executes all test cases, but when targeting iOS or iOS simulator, all the test cases fail similarly to the following: > > 25: Test command: /Applications/Xcode.app/Contents/Developer/usr/bin/xctest "/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTestRunner.xctest/../.." > 25: Environment variables: > 25: DYLD_FRAMEWORK_PATH=/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTest.framework/.. > 25: Test timeout computed to be: 9.99988e+06 > 25: 2016-03-21 12:41:38.799 xctest[31113:31078264] The bundle ?Test? couldn?t be loaded because its executable couldn?t be located. Try reinstalling the bundle. > 25/28 Test #25: UtilityTypeTraitsTest ...............***Failed 0.04 sec > > As you can see, the `${EFFECTIVE_PLATFORM_NAME}` is not being expanded to `-iphonesimulator` and thus the file is not found. The problem is that the `$` generator expression does not expand the variable. On the other hand, installation works without an issue, because the `cmake_install.cmake` scripts do additional round of variable expansion that (accidentally?) fixes this. The relevant part of the CMake source is here: https://github.com/Kitware/CMake/blob/cd569b962dbeaa7ea718021c16582cddd158df3a/Source/cmGeneratorTarget.cxx#L5063 > > From the source it looks like the generator is just putting the "${EFFECTIVE_PLATFORM_NAME}" output and hopes that someone later expands it. That's the case with install scripts (so they work), but not with generator expressions. The `TARGET_LINKER_FILE_DIR` is not the only affected, the problem is the same for all `TARGET_*` generator expressions. > > Currently I'm working around this by partially hardcoding the path, but that's far from ideal and I would like to avoid that: > > if(CMAKE_OSX_SYSROOT MATCHES "iPhoneOS") > set(platform_name "-iphoneos") > elseif(CMAKE_OSX_SYSROOT MATCHES "iPhoneSimulator") > set(platform_name "-iphonesimulator") > endif() > set(target_linker_file_dir ${CMAKE_CURRENT_BINARY_DIR}/$${platform_name}/${target}.xctest) > > Is there any way to fix this directly in CMake? Also the above workaround works only when targeting single SDK and not when having single generated project for both the device and the simulator. > > Thank you a lot for your help. > > mosra I doubt I can help with the problem but just for your information: * it wasn't fixed "accidentally", it was a fix for #12506: https://github.com/Kitware/CMake/commit/48fe617e667d2e6b1e471cfb56346de51f984ba5 * there is no "additional round" of variable expansion, EFFECTIVE_PLATFORM_NAME initialized from Xcode's environment variable EFFECTIVE_PLATFORM_NAME on installation As far as I understand the main general problem with iOS device/simulator support is that CMake doesn't have multi-toolchain feature from the box. So for now all this stuff worked by generating some "universal" code that do work for both SDKs. The real SDK can be triggered by additional explicit option, i.e.: * cmake --build _builds -- -sdk iphoneos # trigger iphoneos SDK * cmake --build _builds -- -sdk iphonesimulator # trigger iphonesimulator SDK Ruslo From rjvbertin at gmail.com Mon Mar 21 11:35:13 2016 From: rjvbertin at gmail.com (=?UTF-8?B?UmVuw6kgSi4gVi4=?= Bertin) Date: Mon, 21 Mar 2016 16:35:13 +0100 Subject: [CMake] supporting cumulative variable operations via the commandline? References: <2375070.X13T9g03i4@patux.local> Message-ID: <2701597.bbK9OJK3ma@patux.local> Hi, So how hard would it be to support syntax like -DFOO+=bar or even -DFOO-=bar on cmake's command line? Where would I have to start poking around if I wanted to make a draft/PoC implementation? Thanks, Ren? From jsvanbethlehem at gmail.com Tue Mar 22 03:48:09 2016 From: jsvanbethlehem at gmail.com (Jakob van Bethlehem) Date: Tue, 22 Mar 2016 08:48:09 +0100 Subject: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS In-Reply-To: <1634714.lyjH4DigmD@kongar> References: <6841933.oyp1NgLfeI@kongar> <1634714.lyjH4DigmD@kongar> Message-ID: Hm, interesting. I wonder then if Qt-devs are maintaining this, or the CMake-devs? If the same bug is still present in Qt5, it should be fixed. Sincerely, Jakob On Sun, Mar 20, 2016 at 8:37 PM, Alexander Stein < alexander.stein+cmake at mailbox.org> wrote: > On Tuesday 08 March 2016, 10:00:00 wrote Nicholas Braden: > > Jakob, I don't think there is any confusion about what REQUIRED means. > > Whether or not REQUIRED is provided, the list of OPTIONAL_COMPONENTS > > should not be required under any circumstances. The example error > > message seems pretty clear to me that the expected behavior and actual > > behavior are different. I went and looked at the source code of the > > find module: > > > > https://github.com/Kitware/CMake/blob/master/Modules/FindQt4.cmake > > > > It seems that there is no check whatsoever for > > Qt4_FIND_REQUIRED_, so the find module just blindly assumes > > that all components are required. > > > > More info: > https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#find-modules > > > > To me this seems like a bug in the find module. > > Yep, FindQt4.cmake doesn't support OPTIONAL_COMPONENTS which seems only to > work if FIND_PACKAGE_HANDLE_STANDARD_ARGS is called with HANDLE_COMPONENTS > passed. This is not the case and does not work. I guess due to different > naming scheme used for components. AFAICS they have to be e.g. > Qt4_QtCore_FOUND, but not QT_QTCORE_FOUND. > > Best regards, > Alexander > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas at junovagen.se Wed Mar 23 02:42:05 2016 From: thomas at junovagen.se (Thomas Nilsson) Date: Wed, 23 Mar 2016 07:42:05 +0100 Subject: [CMake] Clang on Cygwin don't build 'dll.a' Message-ID: <56F23ABD.9010306@junovagen.se> I'm trying to build a CMake project using clang instead of gcc. The project is cross-platform and builds cleanly on Cygwin with gcc. With Clang it says: [ 33%] Built target X make[4]: *** No rule to make target 'X.dll.a', needed by 'X.exe'. Stop. CMakeFiles/Makefile2:1140: recipe for target 'tools/CMakeFiles/X/all' failed I don't know how to fix this, but I'm not completely sure that it's not my project that instructs CMake to do this (how would I know?). If not, is there a way to make CMake link directly against the .dll? /Thomas Cygwin64 on Windows 10 with CMake 3.3.2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.wagner at intel.com Wed Mar 23 08:43:31 2016 From: david.wagner at intel.com (Wagner, David) Date: Wed, 23 Mar 2016 13:43:31 +0100 Subject: [CMake] Issues using CPack for making a debian package Message-ID: <56F28F73.5070108@intel.com> Hi, (I'm using CMake 3.2) I have a project which is using CMake and CPack to create a debian package. It currently seems to be working fine but when I set CPACK_DEBIAN_PACKAGE_DEBUG to ON and dig in the logs, I see this: > dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory > dpkg-shlibdeps: warning: couldn't find library libparameter.so needed by ./usr/bin/domainGeneratorConnector (ELF format: 'elf64-x86-64'; RPATH: '') > dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory > dpkg-shlibdeps: warning: couldn't find library libparameter.so needed by ./usr/lib/libcparameter.so (ELF format: 'elf64-x86-64'; RPATH: '') > [...] Despite these warnings, the "Depends:" field is correctly filled. Now, I would like to add version information to my shared libraries like so: > set_target_properties(parameter PROPERTIES VERSION 3.2.4) After that, when I run cpack again, I get this: > dpkg-shlibdeps: error: couldn't find library libparameter.so.3.2.4 needed by ./usr/bin/test-platform (ELF format: 'elf64-x86-64'; RPATH: '') > dpkg-shlibdeps: warning: couldn't find library libremote-processor.so needed by ./usr/bin/test-platform (ELF format: 'elf64-x86-64'; RPATH: '') > dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory > dpkg-shlibdeps: error: couldn't find library libparameter.so.3.2.4 needed by ./usr/lib/python2.7/dist-packages/_PyPfw.so (ELF format: 'elf64-x86-64'; RPATH: '') > dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory > [...] I don't know why but dpkg-shlibeps has a special treatment for libraries that have a version number in their name, turning warnings into errors. So, I've done some research and I found two things: - There's a closed bug entry and a very recent patch (https://cmake.org/Bug/view.php?id=12431; https://cmake.org/gitweb?p=cmake.git;a=log) that will help fixing this; - The documentation advises setting the CMAKE_INSTALL_RPATH variable (but doesn't give any clue as to what value it should be set to). However, I don't want to do that because: a) it impacts the other use-cases; b) the rpath will stay in the binaries delivered through the debian package. I'd like to point out that dpkg-shlibdeps has a `-l` option that looks to me like the best tool for the job (compared to the rpath solution); this option is used in actual debian packages. > -ldirectory > Add directory to the list of directories to search for private shared libraries (since dpkg 1.17.0). This option can be used multiple times. I'm considering working my problem around by shipping a patched copy of CPackDeb.cmake, using this `-l` option. Has anyone another solution? Thanks David -- David Wagner complex != complicated --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. From domen.vrankar at gmail.com Wed Mar 23 11:15:18 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Wed, 23 Mar 2016 16:15:18 +0100 Subject: [CMake] Issues using CPack for making a debian package In-Reply-To: <56F28F73.5070108@intel.com> References: <56F28F73.5070108@intel.com> Message-ID: > So, I've done some research and I found two things: > - There's a closed bug entry and a very recent patch > (https://cmake.org/Bug/view.php?id=12431; > https://cmake.org/gitweb?p=cmake.git;a=log) that will help fixing this; > - The documentation advises setting the CMAKE_INSTALL_RPATH variable (but > doesn't give any clue as to what value it should be set to). > > However, I don't want to do that because: > a) it impacts the other use-cases; > b) the rpath will stay in the binaries delivered through the debian > package. > > I'd like to point out that dpkg-shlibdeps has a `-l` option that looks to me > like the best tool for the job (compared to the rpath solution); this option > is used in actual debian packages. > >> -ldirectory >> Add directory to the list of directories to search for private >> shared libraries (since dpkg 1.17.0). This option can be used multiple >> times. > > > 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 be willing to provide the patch with `-l` option for inclusion into CPack and a minimal test CMakeLists.txt showing its usage? Thanks, Domen From pogos77 at hotmail.com Wed Mar 23 11:33:26 2016 From: pogos77 at hotmail.com (olusegun ogunbade) Date: Wed, 23 Mar 2016 15:33:26 +0000 Subject: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built In-Reply-To: References: Message-ID: ________________________________________ From: olusegun ogunbade Sent: Wednesday, March 23, 2016 2:59:07 PM To: cmake at cmake.org Subject: Cmake 3.5.0 and Fortran submodule cannot be built I was trying to build a Fortran project using Cmake-3.5.0. The project was written with the fortran 08 submodule. The error I got is Error copying Fortran module "mod/function". Tried "mod/FUNCTION.mod" and "mod/function.mod". Does recent cmake support Fortran submodule? From Arjen.Markus at deltares.nl Wed Mar 23 11:41:01 2016 From: Arjen.Markus at deltares.nl (Arjen Markus) Date: Wed, 23 Mar 2016 15:41:01 +0000 Subject: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built In-Reply-To: References: Message-ID: <8CF085736108634681FD03EC36E6A0724C24D4F7@V-EXC-C02.DIRECTORY.INTRA> Hi, Fortran submodules are contained in a file with the extension .smod instead of .mod. At least for Intel Fortran. It may very well be that this feature is not yet supported by CMake. Unfortunately I have not yet had the opportunity to run into this problem ;). Regards, Arjen > -----Original Message----- > From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of olusegun > ogunbade > Sent: Wednesday, March 23, 2016 4:33 PM > To: cmake at cmake.org > Subject: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built > > > ________________________________________ > From: olusegun ogunbade > Sent: Wednesday, March 23, 2016 2:59:07 PM > To: cmake at cmake.org > Subject: Cmake 3.5.0 and Fortran submodule cannot be built > > I was trying to build a Fortran project using Cmake-3.5.0. The project was written > with the fortran 08 submodule. The error I got is > > Error copying Fortran module "mod/function". Tried "mod/FUNCTION.mod" and > "mod/function.mod". > > Does recent cmake support Fortran submodule? > -- > > 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 > DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.wagner at intel.com Wed Mar 23 14:14:58 2016 From: david.wagner at intel.com (Wagner, David) Date: Wed, 23 Mar 2016 19:14:58 +0100 Subject: [CMake] Issues using CPack for making a debian package In-Reply-To: References: <56F28F73.5070108@intel.com> Message-ID: <56F2DD22.1010302@intel.com> On 23/03/2016 16:15, Domen Vrankar wrote: >> >> I'd like to point out that dpkg-shlibdeps has a `-l` option that looks to me >> like the best tool for the job (compared to the rpath solution); this option >> is used in actual debian packages. >> >>> -ldirectory >>> Add directory to the list of directories to search for private >>> shared libraries (since dpkg 1.17.0). This option can be used multiple >>> times. >> >> >> 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 be willing to provide the patch with `-l` option for > inclusion into CPack and a minimal test CMakeLists.txt showing its > usage? I'll try and do that. David -- David Wagner PEG->IPG->EIG->cAVS (Audio CoE)->FDK MiddleWare Core complex != complicated --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. From brad.king at kitware.com Wed Mar 23 16:12:22 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 23 Mar 2016 16:12:22 -0400 Subject: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built In-Reply-To: <8CF085736108634681FD03EC36E6A0724C24D4F7@V-EXC-C02.DIRECTORY.INTRA> References: <8CF085736108634681FD03EC36E6A0724C24D4F7@V-EXC-C02.DIRECTORY.INTRA> Message-ID: <56F2F8A6.4070309@kitware.com> On 03/23/2016 11:41 AM, Arjen Markus wrote: > Fortran submodules are contained in a file with the extension > .smod instead of .mod. At least for Intel Fortran. It may very > well be that this feature is not yet supported by CMake. [snip] >> Error copying Fortran module "mod/function". >> Tried "mod/FUNCTION.mod" and "mod/function.mod". >> >> Does recent cmake support Fortran submodule? CMake has not been taught about Fortran submodules. I'm not very familiar with them either. Do submodules affect the order in which sources need to be compiled as modules do? Please provide a small example project demonstrating use of submodules and showing the error above. Thanks, -Brad From scott at towel42.com Wed Mar 23 16:25:59 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Wed, 23 Mar 2016 20:25:59 +0000 Subject: [CMake] Two phase install? Message-ID: Here is my problem. The project I have creates an application, that is needed to build the rest of the project. To imagine it, imagine the application is a custom yacc/lex based parser that reads in a file and generates an output file. In order for the application to run correctly, it needs an install step. However, the results of the application, are part of the final install. Is there anyway to say "build this, and create its install area" and afterwards run the rest of the requirements for install? Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: From irwin at beluga.phys.uvic.ca Wed Mar 23 17:47:57 2016 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Wed, 23 Mar 2016 14:47:57 -0700 (PDT) Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: On 2016-03-23 20:25-0000 Scott Aron Bloom wrote: > Here is my problem. > > The project I have creates an application, that is needed to build the rest of the project. > > To imagine it, imagine the application is a custom yacc/lex based parser that reads in a file and generates an output file. > > In order for the application to run correctly, it needs an install step. However, the results of the application, are part of the final install. > > Is there anyway to say "build this, and create its install area" and afterwards run the rest of the requirements for install? Yes. I suggest you build and install your application and the rest of your project as two separate CMake projects with a common install-tree prefix. Of course, you could stop there with two completely independent projects that you (and your users) learn to build and install in the correct order. However, CMake allows you to organize such multiple builds and installs with ExternalProject_Add. I like and use that a lot for large numbers of different projects that depend on each other, and you might also find it useful for your case of just two independent projects. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ From scott at towel42.com Wed Mar 23 17:49:45 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Wed, 23 Mar 2016 21:49:45 +0000 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: -----Original Message----- From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca] Sent: Wednesday, March 23, 2016 2:48 PM To: Scott Aron Bloom Cc: cmake at cmake.org Subject: Re: [CMake] Two phase install? On 2016-03-23 20:25-0000 Scott Aron Bloom wrote: > Here is my problem. > > The project I have creates an application, that is needed to build the rest of the project. > > To imagine it, imagine the application is a custom yacc/lex based parser that reads in a file and generates an output file. > > In order for the application to run correctly, it needs an install step. However, the results of the application, are part of the final install. > > Is there anyway to say "build this, and create its install area" and afterwards run the rest of the requirements for install? Yes. I suggest you build and install your application and the rest of your project as two separate CMake projects with a common install-tree prefix. Of course, you could stop there with two completely independent projects that you (and your users) learn to build and install in the correct order. However, CMake allows you to organize such multiple builds and installs with ExternalProject_Add. I like and use that a lot for large numbers of different projects that depend on each other, and you might also find it useful for your case of just two independent projects. Alan ============ Thanks, the ExternalProject_Add is exactly what I needed a hint towards!!! From scott at towel42.com Wed Mar 23 21:08:29 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 24 Mar 2016 01:08:29 +0000 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: Do you have apointer to an example of using the external_project. I have split the projects up, and install the first one.. But I cant seem to get the external project on the downstream cmake run to properly depend that the previous one was run Scott -----Original Message----- From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Scott Aron Bloom Sent: Wednesday, March 23, 2016 2:50 PM To: Alan W. Irwin Cc: cmake at cmake.org Subject: Re: [CMake] Two phase install? -----Original Message----- From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca] Sent: Wednesday, March 23, 2016 2:48 PM To: Scott Aron Bloom Cc: cmake at cmake.org Subject: Re: [CMake] Two phase install? On 2016-03-23 20:25-0000 Scott Aron Bloom wrote: > Here is my problem. > > The project I have creates an application, that is needed to build the rest of the project. > > To imagine it, imagine the application is a custom yacc/lex based parser that reads in a file and generates an output file. > > In order for the application to run correctly, it needs an install step. However, the results of the application, are part of the final install. > > Is there anyway to say "build this, and create its install area" and afterwards run the rest of the requirements for install? Yes. I suggest you build and install your application and the rest of your project as two separate CMake projects with a common install-tree prefix. Of course, you could stop there with two completely independent projects that you (and your users) learn to build and install in the correct order. However, CMake allows you to organize such multiple builds and installs with ExternalProject_Add. I like and use that a lot for large numbers of different projects that depend on each other, and you might also find it useful for your case of just two independent projects. Alan ============ Thanks, the ExternalProject_Add is exactly what I needed a hint towards!!! -- 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 From nicholas11braden at gmail.com Wed Mar 23 21:10:50 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Wed, 23 Mar 2016 20:10:50 -0500 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: Both projects should be built via ExternalProject within a superproject, this way you can use the DEPENDS arguments to guarantee build order. On Wed, Mar 23, 2016 at 8:08 PM, Scott Aron Bloom wrote: > Do you have apointer to an example of using the external_project. > > I have split the projects up, and install the first one.. But I cant seem to get the external project on the downstream cmake run to properly depend that the previous one was run > > Scott > > -----Original Message----- > From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Scott Aron Bloom > Sent: Wednesday, March 23, 2016 2:50 PM > To: Alan W. Irwin > Cc: cmake at cmake.org > Subject: Re: [CMake] Two phase install? > > -----Original Message----- > From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca] > Sent: Wednesday, March 23, 2016 2:48 PM > To: Scott Aron Bloom > Cc: cmake at cmake.org > Subject: Re: [CMake] Two phase install? > > On 2016-03-23 20:25-0000 Scott Aron Bloom wrote: > >> Here is my problem. >> >> The project I have creates an application, that is needed to build the rest of the project. >> >> To imagine it, imagine the application is a custom yacc/lex based parser that reads in a file and generates an output file. >> >> In order for the application to run correctly, it needs an install step. However, the results of the application, are part of the final install. >> >> Is there anyway to say "build this, and create its install area" and afterwards run the rest of the requirements for install? > > Yes. I suggest you build and install your application and the rest of your project as two separate CMake projects with a common install-tree prefix. > > Of course, you could stop there with two completely independent projects that you (and your users) learn to build and install in the correct order. However, CMake allows you to organize such multiple builds and installs with ExternalProject_Add. I like and use that a lot for large numbers of different projects that depend on each other, and you might also find it useful for your case of just two independent projects. > > Alan > ============ > > Thanks, the ExternalProject_Add is exactly what I needed a hint towards!!! > > > > -- > > 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 From scott at towel42.com Wed Mar 23 21:11:55 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 24 Mar 2016 01:11:55 +0000 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: Ok.. Do you have an example somewhere ? -----Original Message----- From: Nicholas Braden [mailto:nicholas11braden at gmail.com] Sent: Wednesday, March 23, 2016 6:11 PM To: Scott Aron Bloom Cc: Alan W. Irwin; cmake at cmake.org Subject: Re: [CMake] Two phase install? Both projects should be built via ExternalProject within a superproject, this way you can use the DEPENDS arguments to guarantee build order. On Wed, Mar 23, 2016 at 8:08 PM, Scott Aron Bloom wrote: > Do you have apointer to an example of using the external_project. > > I have split the projects up, and install the first one.. But I cant > seem to get the external project on the downstream cmake run to > properly depend that the previous one was run > > Scott > > -----Original Message----- > From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Scott Aron > Bloom > Sent: Wednesday, March 23, 2016 2:50 PM > To: Alan W. Irwin > Cc: cmake at cmake.org > Subject: Re: [CMake] Two phase install? > > -----Original Message----- > From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca] > Sent: Wednesday, March 23, 2016 2:48 PM > To: Scott Aron Bloom > Cc: cmake at cmake.org > Subject: Re: [CMake] Two phase install? > > On 2016-03-23 20:25-0000 Scott Aron Bloom wrote: > >> Here is my problem. >> >> The project I have creates an application, that is needed to build the rest of the project. >> >> To imagine it, imagine the application is a custom yacc/lex based parser that reads in a file and generates an output file. >> >> In order for the application to run correctly, it needs an install step. However, the results of the application, are part of the final install. >> >> Is there anyway to say "build this, and create its install area" and afterwards run the rest of the requirements for install? > > Yes. I suggest you build and install your application and the rest of your project as two separate CMake projects with a common install-tree prefix. > > Of course, you could stop there with two completely independent projects that you (and your users) learn to build and install in the correct order. However, CMake allows you to organize such multiple builds and installs with ExternalProject_Add. I like and use that a lot for large numbers of different projects that depend on each other, and you might also find it useful for your case of just two independent projects. > > Alan > ============ > > Thanks, the ExternalProject_Add is exactly what I needed a hint towards!!! > > > > -- > > 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 From nicholas11braden at gmail.com Wed Mar 23 21:14:03 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Wed, 23 Mar 2016 20:14:03 -0500 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: Sure, here are a couple of my own projects: https://github.com/LB--/events/blob/e3215d84644c67848b6d716d308e66c6f186b84e/CMakeLists.txt#L26-L29 https://github.com/LB--/simple-platformer/blob/5b8541354109137798d648bc9d8fe164137de9ab/CMakeLists.txt#L63-L67 On Wed, Mar 23, 2016 at 8:11 PM, Scott Aron Bloom wrote: > Ok.. Do you have an example somewhere ? > > -----Original Message----- > From: Nicholas Braden [mailto:nicholas11braden at gmail.com] > Sent: Wednesday, March 23, 2016 6:11 PM > To: Scott Aron Bloom > Cc: Alan W. Irwin; cmake at cmake.org > Subject: Re: [CMake] Two phase install? > > Both projects should be built via ExternalProject within a superproject, this way you can use the DEPENDS arguments to guarantee build order. > > On Wed, Mar 23, 2016 at 8:08 PM, Scott Aron Bloom wrote: >> Do you have apointer to an example of using the external_project. >> >> I have split the projects up, and install the first one.. But I cant >> seem to get the external project on the downstream cmake run to >> properly depend that the previous one was run >> >> Scott >> >> -----Original Message----- >> From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Scott Aron >> Bloom >> Sent: Wednesday, March 23, 2016 2:50 PM >> To: Alan W. Irwin >> Cc: cmake at cmake.org >> Subject: Re: [CMake] Two phase install? >> >> -----Original Message----- >> From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca] >> Sent: Wednesday, March 23, 2016 2:48 PM >> To: Scott Aron Bloom >> Cc: cmake at cmake.org >> Subject: Re: [CMake] Two phase install? >> >> On 2016-03-23 20:25-0000 Scott Aron Bloom wrote: >> >>> Here is my problem. >>> >>> The project I have creates an application, that is needed to build the rest of the project. >>> >>> To imagine it, imagine the application is a custom yacc/lex based parser that reads in a file and generates an output file. >>> >>> In order for the application to run correctly, it needs an install step. However, the results of the application, are part of the final install. >>> >>> Is there anyway to say "build this, and create its install area" and afterwards run the rest of the requirements for install? >> >> Yes. I suggest you build and install your application and the rest of your project as two separate CMake projects with a common install-tree prefix. >> >> Of course, you could stop there with two completely independent projects that you (and your users) learn to build and install in the correct order. However, CMake allows you to organize such multiple builds and installs with ExternalProject_Add. I like and use that a lot for large numbers of different projects that depend on each other, and you might also find it useful for your case of just two independent projects. >> >> Alan >> ============ >> >> Thanks, the ExternalProject_Add is exactly what I needed a hint towards!!! >> >> >> >> -- >> >> 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 From scott at towel42.com Wed Mar 23 22:02:16 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 24 Mar 2016 02:02:16 +0000 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: Thanks I'm getting close now. However, for the two sub projects, there doesn?t seem to be a way to run the make stage with -j 6 or any make options. Am I missing something? I see how to set CMAKE_ARGS but no MAKE_ARGS Scott -----Original Message----- From: Nicholas Braden [mailto:nicholas11braden at gmail.com] Sent: Wednesday, March 23, 2016 6:14 PM To: Scott Aron Bloom Cc: cmake at cmake.org Subject: Re: [CMake] Two phase install? Sure, here are a couple of my own projects: https://github.com/LB--/events/blob/e3215d84644c67848b6d716d308e66c6f186b84e/CMakeLists.txt#L26-L29 https://github.com/LB--/simple-platformer/blob/5b8541354109137798d648bc9d8fe164137de9ab/CMakeLists.txt#L63-L67 On Wed, Mar 23, 2016 at 8:11 PM, Scott Aron Bloom wrote: > Ok.. Do you have an example somewhere ? > > -----Original Message----- > From: Nicholas Braden [mailto:nicholas11braden at gmail.com] > Sent: Wednesday, March 23, 2016 6:11 PM > To: Scott Aron Bloom > Cc: Alan W. Irwin; cmake at cmake.org > Subject: Re: [CMake] Two phase install? > > Both projects should be built via ExternalProject within a superproject, this way you can use the DEPENDS arguments to guarantee build order. > > On Wed, Mar 23, 2016 at 8:08 PM, Scott Aron Bloom wrote: >> Do you have apointer to an example of using the external_project. >> >> I have split the projects up, and install the first one.. But I cant >> seem to get the external project on the downstream cmake run to >> properly depend that the previous one was run >> >> Scott >> >> -----Original Message----- >> From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Scott Aron >> Bloom >> Sent: Wednesday, March 23, 2016 2:50 PM >> To: Alan W. Irwin >> Cc: cmake at cmake.org >> Subject: Re: [CMake] Two phase install? >> >> -----Original Message----- >> From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca] >> Sent: Wednesday, March 23, 2016 2:48 PM >> To: Scott Aron Bloom >> Cc: cmake at cmake.org >> Subject: Re: [CMake] Two phase install? >> >> On 2016-03-23 20:25-0000 Scott Aron Bloom wrote: >> >>> Here is my problem. >>> >>> The project I have creates an application, that is needed to build the rest of the project. >>> >>> To imagine it, imagine the application is a custom yacc/lex based parser that reads in a file and generates an output file. >>> >>> In order for the application to run correctly, it needs an install step. However, the results of the application, are part of the final install. >>> >>> Is there anyway to say "build this, and create its install area" and afterwards run the rest of the requirements for install? >> >> Yes. I suggest you build and install your application and the rest of your project as two separate CMake projects with a common install-tree prefix. >> >> Of course, you could stop there with two completely independent projects that you (and your users) learn to build and install in the correct order. However, CMake allows you to organize such multiple builds and installs with ExternalProject_Add. I like and use that a lot for large numbers of different projects that depend on each other, and you might also find it useful for your case of just two independent projects. >> >> Alan >> ============ >> >> Thanks, the ExternalProject_Add is exactly what I needed a hint towards!!! >> >> >> >> -- >> >> 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 From irwin at beluga.phys.uvic.ca Wed Mar 23 22:58:30 2016 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Wed, 23 Mar 2016 19:58:30 -0700 (PDT) Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: On 2016-03-24 01:08-0000 Scott Aron Bloom wrote: > Do you have apointer to an example of using the external_project. > > I have split the projects up, and install the first one.. But I cant seem to get the external project on the downstream cmake run to properly depend that the previous one was run Hi Scott: I suspect Nicholas has already given you better (simpler) examples that are more suitable for your two-project needs, but if you are interested in a more complex case, then you may want to look at my epa_build project (which builds ~60 PLplot dependencies as well as PLplot itself with all dependencies between those projects handled correctly with one simple function call per project). See the cmake/epa_build subdirectory of the PLplot-5.11.1 release that you can download from SourceForge following links at . There are also instructions at the URL (click on the Code link) for accessing our git version of PLplot which contains the epa_build project in the same cmake/epa_build location. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ From irwin at beluga.phys.uvic.ca Wed Mar 23 23:41:55 2016 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Wed, 23 Mar 2016 20:41:55 -0700 (PDT) Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: On 2016-03-24 02:02-0000 Scott Aron Bloom wrote: > Thanks I'm getting close now. > > However, for the two sub projects, there doesn?t seem to be a way to run the make stage with -j 6 or any make options. > > Am I missing something? I see how to set CMAKE_ARGS but no MAKE_ARGS Hi Scott: Some of my further comments are somewhat off your original topic since I discuss parallel build issues for the case of larger numbers of projects in the superproject, but I thought you might be interested in that case even though you just have two projects in your superproject. For the superproject (epa_build in my case) I configure the EPA_PARALLEL_BUILD_COMMAND variable to create the build command that I use for all individual projects. That can be anything accessible from the command-line such as nmake in the Windows case and make in the Unix case. So in your case, your overall superproject could specify set(SUPERPROJECT_BUILD_COMMAND make -j4) (say), and then each of your two projects could be configured via ExternalProject_Add to use ${SUPERPROJECT_BUILD_COMMAND} as the build command for each individual project. But getting back to the more complex case, for Unix on Windows (e.g. Cygwin, MinGW-w64/MSYS2, MinGW/MSYS) I find parallel build options are not reliable (presumably because of make bugs in all those platforms) so to work around that issue, epa_build deliberately drops any -j options that might be specified in EPA_PARALLEL_BUILD_COMMAND for those platforms. But for the Linux case (and I assume Mac OS X, also although I haven't tried it yet), the -j option for make does work reliably so I allow that option to be part of the EPA_PARALLEL_BUILD_COMMAND for that platform. N.B. with 60 projects being built (each one using a parallel build on Linux) with one overall make command, I am currently careful to build each of those projects one at a time (i.e., avoid any parallel options on the overall build or just use -j1) to avoid overwhelming my computer with parallel builds. However, come to think of it I have always used that combination of -j options (-j4 for individual project builds and -j1 for overall build) out of inertia, and there are many other ways that avoidance can be done (e.g., -j4 on the overall build and -j1 on the individual builds) so long as the product of the two integers specified by the -j options does not get too excessive. So I may do some experimentation concerning the most efficient combination of individual and overall -j options the next time I do an epa_build on Linux. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ From scott at towel42.com Wed Mar 23 23:53:01 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 24 Mar 2016 03:53:01 +0000 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: > Thanks I'm getting close now. > > However, for the two sub projects, there doesn?t seem to be a way to run the make stage with -j 6 or any make options. > > Am I missing something? I see how to set CMAKE_ARGS but no MAKE_ARGS Hi Scott: Some of my further comments are somewhat off your original topic since I discuss parallel build issues for the case of larger numbers of projects in the superproject, but I thought you might be interested in that case even though you just have two projects in your superproject. For the superproject (epa_build in my case) I configure the EPA_PARALLEL_BUILD_COMMAND variable to create the build command that I use for all individual projects. That can be anything accessible from the command-line such as nmake in the Windows case and make in the Unix case. So in your case, your overall superproject could specify set(SUPERPROJECT_BUILD_COMMAND make -j4) (say), and then each of your two projects could be configured via ExternalProject_Add to use ${SUPERPROJECT_BUILD_COMMAND} as the build command for each individual project. But getting back to the more complex case, for Unix on Windows (e.g. Cygwin, MinGW-w64/MSYS2, MinGW/MSYS) I find parallel build options are not reliable (presumably because of make bugs in all those platforms) so to work around that issue, epa_build deliberately drops any -j options that might be specified in EPA_PARALLEL_BUILD_COMMAND for those platforms. But for the Linux case (and I assume Mac OS X, also although I haven't tried it yet), the -j option for make does work reliably so I allow that option to be part of the EPA_PARALLEL_BUILD_COMMAND for that platform. N.B. with 60 projects being built (each one using a parallel build on Linux) with one overall make command, I am currently careful to build each of those projects one at a time (i.e., avoid any parallel options on the overall build or just use -j1) to avoid overwhelming my computer with parallel builds. However, come to think of it I have always used that combination of -j options (-j4 for individual project builds and -j1 for overall build) out of inertia, and there are many other ways that avoidance can be done (e.g., -j4 on the overall build and -j1 on the individual builds) so long as the product of the two integers specified by the -j options does not get too excessive. So I may do some experimentation concerning the most efficient combination of individual and overall -j options the next time I do an epa_build on Linux. Alan ========== Thanks that is what I was planning. I was just hoping, there was a variable I was missing in the docs I have it working now on linux, off to try and see how it works with windows Scott From scott at towel42.com Wed Mar 23 23:59:15 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 24 Mar 2016 03:59:15 +0000 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: Just a note.. . That method does NOT work with windows... And since the visual studio project has the external as a single command, (not sure if its calling nmake or the new build cmd) the proeject is not run in parallel. Scott -----Original Message----- From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Scott Aron Bloom Sent: Wednesday, March 23, 2016 8:53 PM To: Alan W. Irwin Cc: cmake at cmake.org Subject: Re: [CMake] Two phase install? > Thanks I'm getting close now. > > However, for the two sub projects, there doesn?t seem to be a way to run the make stage with -j 6 or any make options. > > Am I missing something? I see how to set CMAKE_ARGS but no MAKE_ARGS Hi Scott: Some of my further comments are somewhat off your original topic since I discuss parallel build issues for the case of larger numbers of projects in the superproject, but I thought you might be interested in that case even though you just have two projects in your superproject. For the superproject (epa_build in my case) I configure the EPA_PARALLEL_BUILD_COMMAND variable to create the build command that I use for all individual projects. That can be anything accessible from the command-line such as nmake in the Windows case and make in the Unix case. So in your case, your overall superproject could specify set(SUPERPROJECT_BUILD_COMMAND make -j4) (say), and then each of your two projects could be configured via ExternalProject_Add to use ${SUPERPROJECT_BUILD_COMMAND} as the build command for each individual project. But getting back to the more complex case, for Unix on Windows (e.g. Cygwin, MinGW-w64/MSYS2, MinGW/MSYS) I find parallel build options are not reliable (presumably because of make bugs in all those platforms) so to work around that issue, epa_build deliberately drops any -j options that might be specified in EPA_PARALLEL_BUILD_COMMAND for those platforms. But for the Linux case (and I assume Mac OS X, also although I haven't tried it yet), the -j option for make does work reliably so I allow that option to be part of the EPA_PARALLEL_BUILD_COMMAND for that platform. N.B. with 60 projects being built (each one using a parallel build on Linux) with one overall make command, I am currently careful to build each of those projects one at a time (i.e., avoid any parallel options on the overall build or just use -j1) to avoid overwhelming my computer with parallel builds. However, come to think of it I have always used that combination of -j options (-j4 for individual project builds and -j1 for overall build) out of inertia, and there are many other ways that avoidance can be done (e.g., -j4 on the overall build and -j1 on the individual builds) so long as the product of the two integers specified by the -j options does not get too excessive. So I may do some experimentation concerning the most efficient combination of individual and overall -j options the next time I do an epa_build on Linux. Alan ========== Thanks that is what I was planning. I was just hoping, there was a variable I was missing in the docs I have it working now on linux, off to try and see how it works with windows Scott -- 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 From irwin at beluga.phys.uvic.ca Thu Mar 24 05:14:40 2016 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Thu, 24 Mar 2016 02:14:40 -0700 (PDT) Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: On 2016-03-24 03:59-0000 Scott Aron Bloom wrote: > That method does NOT work with windows... And since the visual studio project has the external as a single command, (not sure if its calling nmake or the new build cmd) the proeject is not run in parallel. I am pretty sure ExternalProject_Add only works with generators associated with build commands you can run from the command line such as make, nmake, jom, ninja, etc.. So, for MSVC the way you arrange that is avoid all the visual studio generators, and instead use one of "NMake Makefiles", "NMake Makefiles JOM", or "Ninja". Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ From post at hendrik-sattler.de Thu Mar 24 06:54:28 2016 From: post at hendrik-sattler.de (Hendrik Sattler) Date: Thu, 24 Mar 2016 11:54:28 +0100 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: Am 24. M?rz 2016 10:14:40 MEZ, schrieb "Alan W. Irwin" : >On 2016-03-24 03:59-0000 Scott Aron Bloom wrote: > >> That method does NOT work with windows... And since the visual >studio project has the external as a single command, (not sure if its >calling nmake or the new build cmd) the proeject is not run in >parallel. > >I am pretty sure ExternalProject_Add only works with generators >associated with build commands you can run from the command line such >as make, nmake, jom, ninja, etc.. So, for MSVC the way you arrange >that is >avoid all the visual studio generators, and instead use one of >"NMake Makefiles", "NMake Makefiles JOM", or "Ninja". No. Just as with cmake-generated solutions, you can build those on the command line using msbuild or devenv, the one used by cmake depends on the cmake version. You can even use cmake itself to trigger the right build command for those. Parallel building must be enabled by hand when using msbuild. For devenv, the setting from the IDE is used. HS From xyzdragon at fastmail.fm Thu Mar 24 07:58:52 2016 From: xyzdragon at fastmail.fm (xyzdragon at fastmail.fm) Date: Thu, 24 Mar 2016 04:58:52 -0700 Subject: [CMake] execute_process seems to execute in parallel and also only shows output of last command Message-ID: <1458820732.627317.558492714.3313D24F@webmail.messagingengine.com> I'm using cmake --version cmake version 3.5.0 # First let me tell you, what I wanted to achieve: I wanted to recursively build some submodule, if that makes sense or not should be the matter here: execute_process( COMMAND cmake .. COMMAND make WORKING_DIRECTORY ./submodule ) What I found is that a folder CMakeFiles was created in ./submodule, but there were no other files in ./submodule, especially no Makefile, which made the second command quit with an error message: make: *** No targets specified and no makefile found. Stop. # What I expected it to do The CMake 3.5.0 documentation specifies the execute_process command like this: execute_process(COMMAND [args1...]] [COMMAND [args2...] [...]] [WORKING_DIRECTORY ] [...] ) This mail here clarifies that all commands should be run sequentially: https://cmake.org/pipermail/cmake/2009-June/030158.html # Here is a minimal non-working example ./CMakeLists.txt: cmake_minimum_required(VERSION 3.5) execute_process( COMMAND echo "test1" COMMAND touch "test1" COMMAND sleep 4s COMMAND echo "test2" COMMAND touch "test2" COMMAND sleep 4s COMMAND echo "test4" ) execute_process( COMMAND mkdir -p build ) execute_process( COMMAND cmake . COMMAND make WORKING_DIRECTORY "./build" ) ./build/CMakeLists.txt cmake_minimum_required(VERSION 3.5) execute_process( COMMAND echo "build/test1" COMMAND touch "test1" COMMAND sleep 4s COMMAND echo "build/test2" COMMAND touch "test2" COMMAND sleep 4s COMMAND echo "build/test4" ) Now make a testrun with `time cmake .`: test4 make: *** No targets specified and no makefile found. Stop. -- Configuring done -- Generating done -- Build files have been written to: ~/cmakeExecuteProcessTest real 0m4.141s user 0m0.104s sys 0m0.016s After this run the directory structure is as follows (`find . -type f -exec bash -c 'ls --full-time {}' \;`): 16:40:37.673199038 ./CMakeFiles/feature_tests.bin 17:16:51.452163375 ./CMakeFiles/TargetDirectories.txt 17:16:51.452163375 ./CMakeFiles/Makefile.cmake 16:40:36.757185936 ./CMakeFiles/3.5.0/CMakeDetermineCompilerABI_C.bin 16:40:36.429181244 ./CMakeFiles/3.5.0/CMakeSystem.cmake 16:40:37.233192745 ./CMakeFiles/3.5.0/CMakeDetermineCompilerABI_CXX.bin 16:40:37.681199152 ./CMakeFiles/3.5.0/CMakeCXXCompiler.cmake 16:40:36.449181531 ./CMakeFiles/3.5.0/CompilerIdC/CMakeCCompilerId.c 16:40:36.485182046 ./CMakeFiles/3.5.0/CompilerIdC/a.out 16:40:36.997189369 ./CMakeFiles/3.5.0/CMakeCCompiler.cmake 16:40:36.517182503 ./CMakeFiles/3.5.0/CompilerIdCXX/CMakeCXXCompilerId.cpp 16:40:36.589183533 ./CMakeFiles/3.5.0/CompilerIdCXX/a.out 17:16:51.452163375 ./CMakeFiles/progress.marks 17:16:51.452163375 ./CMakeFiles/cmake.check_cache 16:40:37.677199094 ./CMakeFiles/CMakeOutput.log 17:16:51.452163375 ./CMakeFiles/Makefile2 16:40:36.921188282 ./CMakeFiles/feature_tests.c 16:40:37.537197092 ./CMakeFiles/feature_tests.cxx 16:41:16.213750307 ./CMakeFiles/CMakeDirectoryInformation.cmake 17:16:09.227562260 ./build/CMakeLists.txt 17:16:51.368162180 ./build/CMakeFiles/3.5.0/CMakeSystem.cmake 17:16:51.396162579 ./build/CMakeFiles/3.5.0/CompilerIdC/CMakeCCompilerId.c 17:16:51.440163206 ./build/CMakeFiles/3.5.0/CompilerIdC/a.out 17:16:51.452163375 ./build/CMakeFiles/CMakeOutput.log 17:16:45.900084334 ./CMakeLists.txt 16:40:37.685199210 ./CMakeCache.txt 16:41:16.213750307 ./cmake_install.cmake 17:16:47.328104663 ./test1 17:16:47.332104722 ./test2 17:16:51.452163375 ./Makefile First things to note: - ./test1, ./test2 do exist, meaning all commands seem to have run - ./build/test1 and ./build/test2 don't exist, meaning `cmake ..` didn't run completely - only build/CMakeFiles/ exists, but not other files, especially not build/Makefile - the timestamps of test1 and test2 are definitely not 4s apart, meaning it looks like all commands did run in parallel - the time needed by CMake is 4s not 8s like it should be if both `sleep 4s` commands would have been executed sequentially - only "test4" will be printed, meaning the output of all commands except the last specified in `execute_process` is ignored # Further Test: Changing the order in: execute_process( COMMAND cmake . COMMAND make WORKING_DIRECTORY "./build" ) to: execute_process( COMMAND make COMMAND cmake . WORKING_DIRECTORY "./build" ) Will make result in a Makefile being created and no error message being produced by Makefile. This suggests, that the last command is spawned before the command before it, meaning the other way around like intuitively suggested. Although I find it a bit weird, that there seems to be an order, even though the results above suggest all commands are executed in parallel. It seems the short latency between spawning is enough for `cmake .` to finish before `make` is begin spawned. # Workarounds Don't group multiple commands execute_process( COMMAND cmake .. WORKING_DIRECTORY ./submodule ) execute_process( COMMAND make WORKING_DIRECTORY ./submodule ) For many commands using the same WORKING_DIRECTORY this leads to extreme code bloat though. -- http://www.fastmail.com - The professional email service From xyzdragon at fastmail.fm Thu Mar 24 07:59:48 2016 From: xyzdragon at fastmail.fm (xyzdragon at fastmail.fm) Date: Thu, 24 Mar 2016 04:59:48 -0700 Subject: [CMake] add_definitions: if option contains space and using FindCUDA, it won't get added to compiler call Message-ID: <1458820788.627381.558493266.5EDA0808@webmail.messagingengine.com> Here is a minimal working-example without FindCUDA: main.cpp: int main(void){ return 0; } CMakeLists.txt: cmake_minimum_required(VERSION 3.5) add_definitions( "-D USE_FEATURE" ) add_library( mimi main.cpp ) target_link_libraries( mimi ) the output will be: /usr/bin/g++-4.9 -D USE_FEATURE -o CMakeFiles/mimi.dir/main.cpp.o -c ~/cmakeBug/main.cpp Meaning the option has been correctly added. Note that the space after `-D` is allowed and completely fine. Now the CMakeLists.txt with FindCUDA: cmake_minimum_required(VERSION 3.5) find_package( CUDA ) add_definitions( "-D USE_FEATURE" ) add_definitions( "-DUSE_FEATURE2" ) SET_SOURCE_FILES_PROPERTIES( main.cpp PROPERTIES CUDA_SOURCE_PROPERTY_FORMAT OBJ ) cuda_add_library( mimi main.cpp ) target_link_libraries( mimi ) The compile command produced now is: /usr/bin/nvcc ~/cmakeBug/main.cpp -x=cu -c -o ~/cmakeBug/build/CMakeFiles/mimi.dir//./mimi_generated_main.cpp.o -ccbin /usr/bin/gcc-4.9 -m64 -DUSE_FEATURE2 -Xcompiler ,\"-g\" -DNVCC -I/usr/include -I/usr/include Meaning `-D USE_FEATURE` was silently ignored (resulting in me wondering for many hours why it just won't work), but `-DUSE_FEATURE2` has been added correctly. Note that I also had a similar problem when trying to (admittedly rather clumsily) adding multiple options: add_definitions( "-DUSE_FEATURE ${FFTW_DEFINITIONS}" ) add_definitions( "-DUSE_FEATURE" ${FFTW_DEFINITIONS} ) The first version will be completely ignored, but the second version works fine. I highly think that this is because of the space in the middle. I found this bug, because I want to do `add_definitions( "-isystem /user_system_library" )` in order to implement a workaround for this bug: https://cmake.org/Bug/view.php?id=14415 Another problem is, that findCUDA ignores all definitions which don't begin with `-D` I think. at least `add_definition("-isystem/mimi")` will be ignored. This means I can't test, what happens with paths containing spaces. -- http://www.fastmail.com - Or how I learned to stop worrying and love email again From nilsgladitz at gmail.com Thu Mar 24 09:28:21 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 24 Mar 2016 14:28:21 +0100 Subject: [CMake] execute_process seems to execute in parallel and also only shows output of last command In-Reply-To: <1458820732.627317.558492714.3313D24F@webmail.messagingengine.com> References: <1458820732.627317.558492714.3313D24F@webmail.messagingengine.com> Message-ID: <56F3EB75.4070904@gmail.com> On 03/24/2016 12:58 PM, xyzdragon at fastmail.fm wrote: > The CMake 3.5.0 documentation specifies the execute_process command like > this: > > execute_process(COMMAND [args1...]] > [COMMAND [args2...] [...]] > [WORKING_DIRECTORY ] > [...] ) > > This mail here clarifies that all commands should be run sequentially: > https://cmake.org/pipermail/cmake/2009-June/030158.html TLDR; what that mail states is that add_custom_command/add_custom_target COMMANDs run in sequence. You use neither of those. As stated by the quote from the execute_process() documentation it runs the commands in parallel by design so that each process's output can be fed to the next process's input. Nils From sschuberth at gmail.com Thu Mar 24 11:28:29 2016 From: sschuberth at gmail.com (Sebastian Schuberth) Date: Thu, 24 Mar 2016 16:28:29 +0100 Subject: [CMake] CMAKE_SIZEOF_VOID_P is unset when building libgit2 on Windows Message-ID: Hi, I'm having a similar problem as mention in the old thread at [1]. In my case, I'm on Windows 8.1 64-bit trying to build the rugged [2] gem, which depends on libgit2, which uses CMake. Configuring libgit2 fails as CMake does not set CMAKE_SIZEOF_VOID_P (nor CMAKE_C_SIZEOF_DATA_PTR), see the attached CMakeCCompiler.cmake file. I tried to search CMake's source code to find out how the value of @CMAKE_C_SIZEOF_DATA_PTR@ is determined in CMakeCCompiler.cmake.in, but I failed. Does anyone have suggestions on how to debug this further, or what the possible root causes might be? Versions I'm using: cmake version 3.5.0 ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32] rugged-0.24.0 Ruby-DevKit [1] http://cmake.3232098.n2.nabble.com/Properly-Detecting-Win64-tp5932689p6288785.html [2] https://github.com/libgit2/rugged [3] https://github.com/libgit2/libgit2 Regards, Sebastian -------------- next part -------------- set(CMAKE_C_COMPILER "C:/Ruby-DevKit/mingw/bin/gcc.exe") set(CMAKE_C_COMPILER_ARG1 "") set(CMAKE_C_COMPILER_ID "GNU") set(CMAKE_C_COMPILER_VERSION "4.7.2") set(CMAKE_C_COMPILER_WRAPPER "") set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "90") set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") set(CMAKE_C_PLATFORM_ID "MinGW") set(CMAKE_C_SIMULATE_ID "") set(CMAKE_C_SIMULATE_VERSION "") set(CMAKE_AR "C:/Ruby-DevKit/mingw/bin/ar.exe") set(CMAKE_RANLIB "C:/Ruby-DevKit/mingw/bin/ranlib.exe") set(CMAKE_LINKER "C:/Ruby-DevKit/mingw/bin/ld.exe") set(CMAKE_COMPILER_IS_GNUCC 1) set(CMAKE_C_COMPILER_LOADED 1) set(CMAKE_C_COMPILER_WORKS TRUE) set(CMAKE_C_ABI_COMPILED FALSE) set(CMAKE_COMPILER_IS_MINGW 1) set(CMAKE_COMPILER_IS_CYGWIN ) if(CMAKE_COMPILER_IS_CYGWIN) set(CYGWIN 1) set(UNIX 1) endif() set(CMAKE_C_COMPILER_ENV_VAR "CC") if(CMAKE_COMPILER_IS_MINGW) set(MINGW 1) endif() set(CMAKE_C_COMPILER_ID_RUN 1) set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) set(CMAKE_C_LINKER_PREFERENCE 10) # Save compiler ABI information. set(CMAKE_C_SIZEOF_DATA_PTR "") set(CMAKE_C_COMPILER_ABI "") set(CMAKE_C_LIBRARY_ARCHITECTURE "") if(CMAKE_C_SIZEOF_DATA_PTR) set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") endif() if(CMAKE_C_COMPILER_ABI) set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") endif() if(CMAKE_C_LIBRARY_ARCHITECTURE) set(CMAKE_LIBRARY_ARCHITECTURE "") endif() set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") endif() set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "") set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "") set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") From brad.king at kitware.com Thu Mar 24 11:53:04 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 24 Mar 2016 11:53:04 -0400 Subject: [CMake] CMAKE_SIZEOF_VOID_P is unset when building libgit2 on Windows In-Reply-To: References: Message-ID: <56F40D60.7020407@kitware.com> On 03/24/2016 11:28 AM, Sebastian Schuberth wrote: > Configuring libgit2 fails as CMake does not set CMAKE_SIZEOF_VOID_P > (nor CMAKE_C_SIZEOF_DATA_PTR), see the attached CMakeCCompiler.cmake file. > > I tried to search CMake's source code to find out how the value of > @CMAKE_C_SIZEOF_DATA_PTR@ is determined in CMakeCCompiler.cmake.in, > but I failed. Does anyone have suggestions on how to debug this further, > or what the possible root causes might be? It is supposed to be done here: https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCompilerABI.cmake;hb=v3.5.0#l23 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeCCompilerABI.c;hb=v3.5.0 The try_compile produces a binary file that encodes strings with the information. Then we use file(STRINGS) to parse the strings right out of the binary. The INFO:sizeof_dptr[...] string contains the size of data pointer types. Check CMakeFiles/CMake{Output,Error}.log to see if anything went wrong with that step that was logged. Otherwise you can add debugging code. -Brad From damian at sourceryinstitute.org Thu Mar 24 12:50:58 2016 From: damian at sourceryinstitute.org (Damian Rouson) Date: Thu, 24 Mar 2016 09:50:58 -0700 Subject: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built In-Reply-To: <56F2F8A6.4070309@kitware.com> References: <8CF085736108634681FD03EC36E6A0724C24D4F7@V-EXC-C02.DIRECTORY.INTRA> <56F2F8A6.4070309@kitware.com> Message-ID: I hope we?ll see CMake support for submodules soon. Submodules are now supported by released versions of the Cray, IBM, and Intel compilers and by the pre-release GNU Fortran compiler version 6.0.0, which is expected to release in mid-April. Damian On Mar 23, 2016, at 1:12 PM, Brad King wrote: > > On 03/23/2016 11:41 AM, Arjen Markus wrote: >> Fortran submodules are contained in a file with the extension >> .smod instead of .mod. At least for Intel Fortran. It may very >> well be that this feature is not yet supported by CMake. > [snip] >>> Error copying Fortran module "mod/function". >>> Tried "mod/FUNCTION.mod" and "mod/function.mod". >>> >>> Does recent cmake support Fortran submodule? > > CMake has not been taught about Fortran submodules. I'm not > very familiar with them either. > > Do submodules affect the order in which sources need to be > compiled as modules do? > > Please provide a small example project demonstrating use of > submodules and showing the error above. > > Thanks, > -Brad > > -- > > 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 ________________________________ Damian Rouson, Ph.D., P.E. President, Sourcery Institute http://www.sourceryinstitute.org +1-510-600-2992 (mobile) -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott at towel42.com Thu Mar 24 14:09:08 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 24 Mar 2016 18:09:08 +0000 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: -----Original Message----- From: Hendrik Sattler [mailto:post at hendrik-sattler.de] Sent: Thursday, March 24, 2016 3:54 AM To: Alan W. Irwin; Scott Aron Bloom Cc: cmake at cmake.org Subject: Re: [CMake] Two phase install? Am 24. M?rz 2016 10:14:40 MEZ, schrieb "Alan W. Irwin" : >On 2016-03-24 03:59-0000 Scott Aron Bloom wrote: > >> That method does NOT work with windows... And since the visual >studio project has the external as a single command, (not sure if its >calling nmake or the new build cmd) the proeject is not run in >parallel. > >I am pretty sure ExternalProject_Add only works with generators >associated with build commands you can run from the command line such >as make, nmake, jom, ninja, etc.. So, for MSVC the way you arrange >that is avoid all the visual studio generators, and instead use one of >"NMake Makefiles", "NMake Makefiles JOM", or "Ninja". No. Just as with cmake-generated solutions, you can build those on the command line using msbuild or devenv, the one used by cmake depends on the cmake version. You can even use cmake itself to trigger the right build command for those. Parallel building must be enabled by hand when using msbuild. For devenv, the setting from the IDE is used. HS ============ The final hurdle Im hitting. When ctest is run, on windows I get the complaint that the configuration is not set. Is there any way to set the -C option to ctest? Scott From pogos77 at hotmail.com Thu Mar 24 15:29:18 2016 From: pogos77 at hotmail.com (olusegun ogunbade) Date: Thu, 24 Mar 2016 19:29:18 +0000 Subject: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built In-Reply-To: <56F2F8A6.4070309@kitware.com> References: <8CF085736108634681FD03EC36E6A0724C24D4F7@V-EXC-C02.DIRECTORY.INTRA>, <56F2F8A6.4070309@kitware.com> Message-ID: Hi All Please find attached a tar file containing the source code. The build process and encountered error are: ogunbog at JesusIsLord:~/work/fortran/point/build$ cmake .. -- The Fortran compiler identification is GNU 6.0.0 -- Check for working Fortran compiler: /home/ogunbog/bin/gfc6u4 -- Check for working Fortran compiler: /home/ogunbog/bin/gfc6u4 -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether /home/ogunbog/bin/gfc6u4 supports Fortran 90 -- Checking whether /home/ogunbog/bin/gfc6u4 supports Fortran 90 -- yes -- Configuring done -- Generating done -- Build files have been written to: /home/ogunbog/work/fortran/point/build ogunbog at JesusIsLord:~/work/fortran/point/build$ l CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile mod/ src/ ogunbog at JesusIsLord:~/work/fortran/point/build$ l mod/ ogunbog at JesusIsLord:~/work/fortran/point/build$ make Scanning dependencies of target foo [ 33%] Building Fortran object src/CMakeFiles/foo.dir/m_point.f90.o Error copying Fortran module "mod/procedure". Tried "mod/PROCEDURE.mod" and "mod/procedure.mod". make[2]: *** [src/CMakeFiles/foo.dir/m_point.f90.o.provides.build] Error 1 make[1]: *** [src/CMakeFiles/foo.dir/all] Error 2 make: *** [all] Error 2 ogunbog at JesusIsLord:~/work/fortran/point/build$ l mod/ m_point.mod m_point at point_a.smod m_point.smod A major benefit of submodules is that if a change is made to one, only it and its descendants are affected. Thus, it avoid unnecessary recompilation cascades. Regards Prince =========================================================== Prince Olusegun G. Ogunbade School Address Postal Address Dept. of Physics P O Box 11646 University of Pretoria The Tramshed Pretoria 0002 Pretoria 0126 Republic of South Africa Republic of South Africa Telephone: ======== +27 (0)12 420 3114 (School) +27 (0)74 539 7920 (Mobile) E-mail: ==== pogos77 at hotmail.com pogos77 at tuks.co.za jilfa12 at yahoo.com ________________________________________ From: Brad King Sent: Wednesday, March 23, 2016 10:12 PM To: olusegun ogunbade Cc: Arjen Markus; cmake at cmake.org Subject: Re: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built On 03/23/2016 11:41 AM, Arjen Markus wrote: > Fortran submodules are contained in a file with the extension > .smod instead of .mod. At least for Intel Fortran. It may very > well be that this feature is not yet supported by CMake. [snip] >> Error copying Fortran module "mod/function". >> Tried "mod/FUNCTION.mod" and "mod/function.mod". >> >> Does recent cmake support Fortran submodule? CMake has not been taught about Fortran submodules. I'm not very familiar with them either. Do submodules affect the order in which sources need to be compiled as modules do? Please provide a small example project demonstrating use of submodules and showing the error above. Thanks, -Brad -------------- next part -------------- A non-text attachment was scrubbed... Name: point.tar Type: application/x-tar Size: 24451 bytes Desc: point.tar URL: From DLRdave at aol.com Thu Mar 24 15:30:25 2016 From: DLRdave at aol.com (David Cole) Date: Thu, 24 Mar 2016 15:30:25 -0400 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: Are you running a dashboard script (ctest -S script) when this happens? Or calling ctest directly with other arguments? If you are running a -S script, you can specify the configuration to build and test in the script itself with the CTEST_CONFIGURATION_TYPE script variable. Read the docs here on the ctest_build and ctest_test steps: https://cmake.org/cmake/help/v3.5/manual/ctest.1.html#ctest-build-step The ctest_build command also takes a "CONFIGURATION" argument directly, but surprisingly, the ctest_test command does not seem to have that arg. https://cmake.org/cmake/help/v3.5/command/ctest_build.html and https://cmake.org/cmake/help/v3.5/command/ctest_test.html If you're not calling a -S script, I'm not sure how else you can do it besides passing "-C Release" on the command line... HTH, David C. On Thu, Mar 24, 2016 at 2:09 PM, Scott Aron Bloom wrote: > > > -----Original Message----- > From: Hendrik Sattler [mailto:post at hendrik-sattler.de] > Sent: Thursday, March 24, 2016 3:54 AM > To: Alan W. Irwin; Scott Aron Bloom > Cc: cmake at cmake.org > Subject: Re: [CMake] Two phase install? > > > > Am 24. M?rz 2016 10:14:40 MEZ, schrieb "Alan W. Irwin" : >>On 2016-03-24 03:59-0000 Scott Aron Bloom wrote: >> >>> That method does NOT work with windows... And since the visual >>studio project has the external as a single command, (not sure if its >>calling nmake or the new build cmd) the proeject is not run in >>parallel. >> >>I am pretty sure ExternalProject_Add only works with generators >>associated with build commands you can run from the command line such >>as make, nmake, jom, ninja, etc.. So, for MSVC the way you arrange >>that is avoid all the visual studio generators, and instead use one of >>"NMake Makefiles", "NMake Makefiles JOM", or "Ninja". > > No. Just as with cmake-generated solutions, you can build those on the command line using msbuild or devenv, the one used by cmake depends on the cmake version. You can even use cmake itself to trigger the right build command for those. Parallel building must be enabled by hand when using msbuild. For devenv, the setting from the IDE is used. > > HS > ============ > > The final hurdle Im hitting. When ctest is run, on windows I get the complaint that the configuration is not set. > > Is there any way to set the -C option to ctest? > > Scott > -- > > 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 From brad.king at kitware.com Thu Mar 24 15:32:45 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 24 Mar 2016 15:32:45 -0400 Subject: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built In-Reply-To: References: <8CF085736108634681FD03EC36E6A0724C24D4F7@V-EXC-C02.DIRECTORY.INTRA> <56F2F8A6.4070309@kitware.com> Message-ID: <56F440DD.6030401@kitware.com> On 03/24/2016 03:29 PM, olusegun ogunbade wrote: > [ 33%] Building Fortran object src/CMakeFiles/foo.dir/m_point.f90.o > Error copying Fortran module "mod/procedure". Tried "mod/PROCEDURE.mod" and "mod/procedure.mod". Thanks for the example. The problem is that the syntax MODULE PROCEDURE point_dist tricks CMake into parsing "MODULE PROCEDURE" as if it were a declaration of a module called "procedure". Unfortunately this is not just a matter of excluding that name because it also appears to be valid to really define a module named "procedure". I still need to look into this further to determine how to fix it. CMake's approximate Fortran parser will need to be updated to account for submodule syntax. -Brad From scott at towel42.com Thu Mar 24 15:34:54 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 24 Mar 2016 19:34:54 +0000 Subject: [CMake] Two phase install? In-Reply-To: References: Message-ID: I am not using a dashboard.. What I found is this.. When running a test from a VCXProj system, CMake sets up the custom command as follows Ctest ..... -C $(Configuration) The $(Configuration) is a visual studio/devenv variable, that is set by the system baed on the current configuration. However, when running cmake via a "super project" to a "subordinate external project" (sorry if my nomenclature is wrong), it runs without the -C option. Using a custom TEST_COMMAND doesn?t help in the ExternalProject_Add command, because for windows VS multi-config setups, the current configuration isn?t known as a CMAKE variable at the proper time So I descided to just "hard code" it in, like you suggested. Scott -----Original Message----- From: David Cole [mailto:DLRdave at aol.com] Sent: Thursday, March 24, 2016 12:30 PM To: Scott Aron Bloom Cc: Hendrik Sattler; Alan W. Irwin; cmake at cmake.org Subject: Re: [CMake] Two phase install? Are you running a dashboard script (ctest -S script) when this happens? Or calling ctest directly with other arguments? If you are running a -S script, you can specify the configuration to build and test in the script itself with the CTEST_CONFIGURATION_TYPE script variable. Read the docs here on the ctest_build and ctest_test steps: https://cmake.org/cmake/help/v3.5/manual/ctest.1.html#ctest-build-step The ctest_build command also takes a "CONFIGURATION" argument directly, but surprisingly, the ctest_test command does not seem to have that arg. https://cmake.org/cmake/help/v3.5/command/ctest_build.html and https://cmake.org/cmake/help/v3.5/command/ctest_test.html If you're not calling a -S script, I'm not sure how else you can do it besides passing "-C Release" on the command line... HTH, David C. On Thu, Mar 24, 2016 at 2:09 PM, Scott Aron Bloom wrote: > > > -----Original Message----- > From: Hendrik Sattler [mailto:post at hendrik-sattler.de] > Sent: Thursday, March 24, 2016 3:54 AM > To: Alan W. Irwin; Scott Aron Bloom > Cc: cmake at cmake.org > Subject: Re: [CMake] Two phase install? > > > > Am 24. M?rz 2016 10:14:40 MEZ, schrieb "Alan W. Irwin" : >>On 2016-03-24 03:59-0000 Scott Aron Bloom wrote: >> >>> That method does NOT work with windows... And since the visual >>studio project has the external as a single command, (not sure if its >>calling nmake or the new build cmd) the proeject is not run in >>parallel. >> >>I am pretty sure ExternalProject_Add only works with generators >>associated with build commands you can run from the command line such >>as make, nmake, jom, ninja, etc.. So, for MSVC the way you arrange >>that is avoid all the visual studio generators, and instead use one of >>"NMake Makefiles", "NMake Makefiles JOM", or "Ninja". > > No. Just as with cmake-generated solutions, you can build those on the command line using msbuild or devenv, the one used by cmake depends on the cmake version. You can even use cmake itself to trigger the right build command for those. Parallel building must be enabled by hand when using msbuild. For devenv, the setting from the IDE is used. > > HS > ============ > > The final hurdle Im hitting. When ctest is run, on windows I get the complaint that the configuration is not set. > > Is there any way to set the -C option to ctest? > > Scott > -- > > 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 From robert.maynard at kitware.com Thu Mar 24 16:13:08 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Thu, 24 Mar 2016 16:13:08 -0400 Subject: [CMake] [ANNOUNCE] CMake 3.5.1 available for download Message-ID: We are pleased to announce that CMake 3.5.1 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! ------------------------------------------------------------------------- Changes in 3.5.1 since 3.5.0: Ben Boeckel (1): FindPkgConfig: set correctly named variables in cache (#15903) Brad King (4): cmake-gui: Populate CFBundleIdentifier in our Info.plist file (#16023) CPack: Avoid using OS X CoreServices if compiler fails on header (#16021) FindCUDA: Fix regression in separate compilation (#16027) CMake 3.5.1 Roger Leigh (1): FindBoost: Tolerate missing indirect dependencies (#16013) Ruslan Baratov (1): Fix iOS combined feature for single architecture targets Sean McBride (1): CPack: Avoid requiring Carbon framework on OS X (#16021) Yves Frederix (1): Avoid occasional use-after-free when a variable watch is executed From peng.1.wang at nokia.com Fri Mar 25 04:11:33 2016 From: peng.1.wang at nokia.com (Wang, Peng 1. (Nokia - CN/Hangzhou)) Date: Fri, 25 Mar 2016 08:11:33 +0000 Subject: [CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack Message-ID: <9193CFE72398F046892830C5FB1689215307D420@SGSIMBX007.nsn-intra.net> Hi, In my project, I use cmake to construct the building system, I need to build an external project(here, I take zeromq for example) with ExternalProject_add, then pack the compiled binaries in a RPM package, but I need the generated RPM to have correct "PROVIDES" information to tell which libraries it provides, just like below libzmq.so.5()(64bit) zeromq = 4.1.2-1.el7 zeromq(x86-64) = 4.1.2-1.el7 But somehow, with setting CPACK_RPM_PACKAGE_AUTOPROV to 1, the built RPM still doesn't have correct 'PROVIDES' information, I will get 'PROVIDES' information below, without the provided libraries information zeromq = 4.1.2-1 zeromq(x86-64) = 4.1.2-1 the CMakeLists.txt(just some key content) for this is cmake_minimum_required (VERSION 3.4.0 FATAL_ERROR) set(COMP zeromq) set(CompVersion 4.1.2) set(CompURL http://download.zeromq.org/zeromq-${CompVersion}.tar.gz) set(CompMD5 159c0c56a895472f02668e692d122685) project(${COMP} VERSION ${CompVersion}) include(ExternalProject) ExternalProject_add(${COMP} PREFIX ${COMP} URL ${CompURL} URL_MD5 ${CompMD5} CONFIGURE_COMMAND /configure --without-libsodium --prefix=${CMAKE_INSTALL_PREFIX}) install(FILES ${CMAKE_INSTALL_PREFIX}/lib/libzmq.so.5 ${CMAKE_INSTALL_PREFIX}/lib/libzmq.so ${CMAKE_INSTALL_PREFIX}/lib/libzmq.so.5.0.0 DESTINATION lib64) string(REPLACE "." ";" VERSION_LIST ${PROJECT_VERSION}) list(LENGTH VERSION_LIST VERSION_LIST_LENGTH) list(GET VERSION_LIST 0 CPACK_PACKAGE_VERSION_MAJOR) list(GET VERSION_LIST 1 CPACK_PACKAGE_VERSION_MINOR) if(VERSION_LIST_LENGTH GREATER 2) list(GET VERSION_LIST 2 CPACK_PACKAGE_VERSION_PATCH) endif() set(CPACK_GENERATOR "RPM") set(CPACK_PACKAGE_VENDOR "Test") set(CPACK_RPM_PACKAGE_GROUP "3rd-party-software") set(CPACK_RPM_PACKAGE_AUTOPROV 1) set(CPACK_RPM_PACKAGE_AUTOREQ 0) set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /usr/lib /usr/lib64) set(CPACK_RPM_COMPONENT_INSTALL OFF) include(CPack) Does someone know why this "CPACK_RPM_PACKAGE_AUTOPROV" option doesn't take effect? how can I make it auto generates these 'PROVIDES' information in the RPM? thanks for your time and it will be very appreciated if you can provide some hints. Wang Peng (Rex) -------------- next part -------------- An HTML attachment was scrubbed... URL: From domen.vrankar at gmail.com Fri Mar 25 05:51:31 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Fri, 25 Mar 2016 10:51:31 +0100 Subject: [CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack In-Reply-To: <9193CFE72398F046892830C5FB1689215307D420@SGSIMBX007.nsn-intra.net> References: <9193CFE72398F046892830C5FB1689215307D420@SGSIMBX007.nsn-intra.net> Message-ID: > Does someone know why this "CPACK_RPM_PACKAGE_AUTOPROV" option doesn't take > effect? how can I make it auto generates these 'PROVIDES' information in the > RPM? thanks for your time and it will be very appreciated if you can > provide some hints. CPackRPM relies on rpmbuild and other rpm tools to correctly create the package and rpm is not the most automation friendly beast because of its macro system. In cmake tests: Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake there is a comment # FIXME auto autoprov is not tested at the moment as Ubuntu 15.04 rpmbuild # does not use them correctly: https://bugs.launchpad.net/rpm/+bug/1475755 I'm guessing that this is environment related (missing packages, failing/missing rpm macros, ...) as for the same version of rpmbuild installed on different Linux distros (each through their own package repository that came with the distro) it either worked or not and never told that it failed (you could see that only after inspecting the content of rpm package after it has already been created). I haven't looked deeper into it but perhaps you've stumbled across this as well. You could try to make the package on a different distro and see if it works there. Regards, Domen From rcdailey.lists at gmail.com Fri Mar 25 10:42:23 2016 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Fri, 25 Mar 2016 09:42:23 -0500 Subject: [CMake] Visual Studio + Ninja? In-Reply-To: <56dd4774.ca528c0a.db811.ffffed41SMTPIN_ADDED_MISSING@mx.google.com> References: <56dd4774.ca528c0a.db811.ffffed41SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Thanks for the feedback. I know for sure that you can create "Makefile" projects in Visual Studio, that do nothing but run commands. You can even still have files in the project itself, to allow you to edit those files (even though they won't actually build). I think CMake can use this functionality already, it just isn't setup to treat Visual Studio as an extra generator like most other IDEs. On Mon, Mar 7, 2016 at 3:18 AM, Nagy-Egri M?t? Ferenc wrote: > Short version: no. > > > > Long version: Visual Studio is heavily built around MSBuild as the back-end > of execution of various tasks. While theoretically it could be done that > MSBuild only acts as a relay and calls into Ninja scripts, you would lose > the entire feature set of Solution Explorer, which is quite a large portion > of the IDE. (Using CMake does preclude using most of it though.) MS is > looking into deeper CMake integration into their IDE, but the exec back-end > will most likely be MSBuild. > > > > Should you really want to achieve this, you would need support from both > CMake side and VS side. You would need to develop an Add-In with a custom > project type (CMake+Ninja) and hook up most Solution Explorer entries to > generate not MSBuild but Ninja script portions. And from CMake you would > need a generator for this mixed generator type. It could be done, but it?s a > lot of effort. Given the performance of MSBuild (which is not that bad > compared to Ninja), the benefits would only be substantial in enourmous > projects. MS generally looks into increasing build throughput by integrating > IncrediBuild into their IDE. > > > > > > > > Felad?: Robert Dailey > Elk?ldve: 2016. m?rcius 2., szerda 21:45 > C?mzett: CMake > T?rgy: [CMake] Visual Studio + Ninja? > > > > Right now I am using a toolchain file to setup cmake to build my C++ > > code against Android NDK. I also have several custom targets for > > running 'ant' commands for the java portions. > > > > I can use the Ninja generator to generate the build scripts to make my > > builds work fine. However, I'd love to be able to use Visual Studio on > > Windows as my IDE. However, there is no "Visual Studio - Ninja" > > generator that I can see. Is there a way to make Visual Studio wrap > > the Ninja scripts and simply execute them? that way I can use it to > > edit code and invoke builds. > > > > Thanks in advance. > > -- > > > > 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 > > From boxerab at gmail.com Fri Mar 25 10:43:03 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Fri, 25 Mar 2016 10:43:03 -0400 Subject: [CMake] Delete CDash project Message-ID: Does anyone know how to delete a CDash project? There doesn't seem to be any way to do this on the website. Thanks! Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From boxerab at gmail.com Fri Mar 25 10:44:56 2016 From: boxerab at gmail.com (Aaron Boxer) Date: Fri, 25 Mar 2016 10:44:56 -0400 Subject: [CMake] Delete CDash project In-Reply-To: References: Message-ID: Never mind - you can do this using the not very obvious "unsubscribe" option in manage subscription. On Fri, Mar 25, 2016 at 10:43 AM, Aaron Boxer wrote: > Does anyone know how to delete a CDash project? There doesn't seem to be > any way to do this on the website. > > Thanks! > Aaron > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Fri Mar 25 13:42:12 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 25 Mar 2016 13:42:12 -0400 Subject: [CMake] Fortran submodule cannot be built In-Reply-To: <56F440DD.6030401@kitware.com> References: <8CF085736108634681FD03EC36E6A0724C24D4F7@V-EXC-C02.DIRECTORY.INTRA> <56F2F8A6.4070309@kitware.com> <56F440DD.6030401@kitware.com> Message-ID: <56F57874.3020100@kitware.com> On 03/24/2016 03:32 PM, Brad King wrote: > CMake's approximate Fortran parser will need to be > updated to account for submodule syntax. I don't know if/when I'll have time to look at this myself. If anyone is interested in working on it, please come to the [developer list](https://cmake.org/mailman/listinfo/cmake-developers) to discuss more details. For reference, submodules are summarized [here](http://fortranwiki.org/fortran/show/Submodules). The parser is in Source/cmFortranParser.y in the CMake source tree. There are a few problems currently: * Submodules introduce a new syntax module function point_dist(a, b) result(distance) Currently CMake parses the "module function" part and thinks there is a module called "function". We cannot simply exclude this name because it is valid to define such a module normally. The parser may have to learn more about the structure of Fortran sources to distinguish true module definitions from these new "module function" and "module procedure" definitions within a module. At least it may need to track the opening/closing of modules (module foo ... end). * The submodule syntax submodule (points) points_a can be used to define the "points" module with no explicit "module points", as shown on the fortranwiki page. CMake will need to learn this syntax. * It needs to be determined whether there are cases that CMake's dependency scanning needs to be aware of the ".smod" files. -Brad From sschuberth at gmail.com Fri Mar 25 17:11:08 2016 From: sschuberth at gmail.com (Sebastian Schuberth) Date: Fri, 25 Mar 2016 22:11:08 +0100 Subject: [CMake] CMAKE_SIZEOF_VOID_P is unset when building libgit2 on Windows In-Reply-To: <56F40D60.7020407@kitware.com> References: <56F40D60.7020407@kitware.com> Message-ID: <56F5A96C.2020200@gmail.com> On 3/24/2016 16:53, Brad King wrote: >> Configuring libgit2 fails as CMake does not set CMAKE_SIZEOF_VOID_P >> (nor CMAKE_C_SIZEOF_DATA_PTR), see the attached CMakeCCompiler.cmake file. >> >> I tried to search CMake's source code to find out how the value of >> @CMAKE_C_SIZEOF_DATA_PTR@ is determined in CMakeCCompiler.cmake.in, >> but I failed. Does anyone have suggestions on how to debug this further, >> or what the possible root causes might be? > > It is supposed to be done here: > > https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCompilerABI.cmake;hb=v3.5.0#l23 > https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeCCompilerABI.c;hb=v3.5.0 > > The try_compile produces a binary file that encodes strings with the > information. Then we use file(STRINGS) to parse the strings right out > of the binary. The INFO:sizeof_dptr[...] string contains the size of > data pointer types. > > Check CMakeFiles/CMake{Output,Error}.log to see if anything went wrong > with that step that was logged. Otherwise you can add debugging code. I also just realized CMAKE_C_ABI_COMPILER is set to FALSE in CMakeCCompiler.cmake. Looking at CMakeError.log was a good hint. I found: ---8<--- Building C object CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC -o CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c "C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c" /usr/bin/sh: -c: line 0: syntax error near unexpected token `(' /usr/bin/sh: -c: line 0: `C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC -o CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c \C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c\' CMakeFiles/cmTC_c0166.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj' failed ---8<--- There seems to be some problem in escaping the non-alphanumeric chars in the path to "CMakeCCompilerABI.c". Any hint how to debug this further? Regards, Sebastian From gjasny at googlemail.com Fri Mar 25 18:44:05 2016 From: gjasny at googlemail.com (Gregor Jasny) Date: Fri, 25 Mar 2016 23:44:05 +0100 Subject: [CMake] CMAKE_SIZEOF_VOID_P is unset when building libgit2 on Windows In-Reply-To: <56F5A96C.2020200@gmail.com> References: <56F40D60.7020407@kitware.com> <56F5A96C.2020200@gmail.com> Message-ID: <56F5BF35.1020605@googlemail.com> On 25/03/16 22:11, Sebastian Schuberth wrote: > I also just realized CMAKE_C_ABI_COMPILER is set to FALSE in > CMakeCCompiler.cmake. Looking at CMakeError.log was a good hint. I > found: > > ---8<--- > Building C object CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj > > C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC -o > CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c "C:/Program > Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c" > > /usr/bin/sh: -c: line 0: syntax error near unexpected token `(' > /usr/bin/sh: -c: line 0: `C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC > -o CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c \C:/Program > Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c\' > CMakeFiles/cmTC_c0166.dir/build.make:65: recipe for target > 'CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj' failed > ---8<--- To unblock you until the problem is sorted out you might want to install a 64bit version of cmake which should not have the problematic (x86) in the path (or you choose a custom install location). http://ifw.podsvirov.pro/cmake/files/v3.5/ Hope that helps, Gregor From mdl45 at drexel.edu Fri Mar 25 21:15:18 2016 From: mdl45 at drexel.edu (Mike Lui) Date: Sat, 26 Mar 2016 01:15:18 +0000 Subject: [CMake] Support for colored makefile output with tmux Message-ID: When I use tmux and set my TERM to either 'tmux' or 'tmux-256color', I don't get colorized output of from cmake generated Makefiles. Is this a known issue? On 4.4.5-1-ARCH w/ CMake 3.5.0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at su-root.co.uk Sat Mar 26 05:30:36 2016 From: dan at su-root.co.uk (Dan Liew) Date: Sat, 26 Mar 2016 09:30:36 +0000 Subject: [CMake] Support for colored makefile output with tmux In-Reply-To: References: Message-ID: On 26 March 2016 at 01:15, Mike Lui wrote: > When I use tmux and set my TERM to either 'tmux' or 'tmux-256color', I don't > get colorized output of from cmake generated Makefiles. My TERM is set to "xterm-256color" and with that coloured output when running ``make`` in Tmux works fine for me. I'm using tmux 2.1-2, in gnome-terminal 3.18.3 on Arch Linux with CMake 3.5.0 From dan at su-root.co.uk Sat Mar 26 05:46:54 2016 From: dan at su-root.co.uk (Dan Liew) Date: Sat, 26 Mar 2016 09:46:54 +0000 Subject: [CMake] Support for colored makefile output with tmux In-Reply-To: References: Message-ID: On 26 March 2016 at 09:30, Dan Liew wrote: > On 26 March 2016 at 01:15, Mike Lui wrote: >> When I use tmux and set my TERM to either 'tmux' or 'tmux-256color', I don't >> get colorized output of from cmake generated Makefiles. > > My TERM is set to "xterm-256color" and with that coloured output when > running ``make`` in Tmux works fine for me. > > I'm using tmux 2.1-2, in gnome-terminal 3.18.3 on Arch Linux with CMake 3.5.0 Just to note coloured output in makefiles seems to be implemented using an undocumented cmake command ``cmake -E cmake_echo_color --cyan hello world`` If you look at [1] you can see the supported switches for different colours. [1] https://github.com/Kitware/CMake/blob/bd15330da1edaf4a662335ff53648074fdc30e2b/Source/cmcmd.cxx#L1176 From mdl45 at drexel.edu Sat Mar 26 09:54:15 2016 From: mdl45 at drexel.edu (Mike Lui) Date: Sat, 26 Mar 2016 13:54:15 +0000 Subject: [CMake] Support for colored makefile output with tmux In-Reply-To: References: Message-ID: I'm referencing a problem similar to this: https://github.com/thestinger/termite/issues/207 https://github.com/google/googletest/issues/698 Ncurses 6.0 comes with a tmux and tmux-256color terminfo that allows things like italics to work when in tmux. On Sat, Mar 26, 2016 at 5:46 AM Dan Liew wrote: > On 26 March 2016 at 09:30, Dan Liew wrote: > > On 26 March 2016 at 01:15, Mike Lui wrote: > >> When I use tmux and set my TERM to either 'tmux' or 'tmux-256color', I > don't > >> get colorized output of from cmake generated Makefiles. > > > > My TERM is set to "xterm-256color" and with that coloured output when > > running ``make`` in Tmux works fine for me. > > > > I'm using tmux 2.1-2, in gnome-terminal 3.18.3 on Arch Linux with CMake > 3.5.0 > > Just to note coloured output in makefiles seems to be implemented > using an undocumented cmake command > > ``cmake -E cmake_echo_color --cyan hello world`` > > If you look at [1] you can see the supported switches for different > colours. > > [1] > https://github.com/Kitware/CMake/blob/bd15330da1edaf4a662335ff53648074fdc30e2b/Source/cmcmd.cxx#L1176 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at su-root.co.uk Sun Mar 27 06:11:44 2016 From: dan at su-root.co.uk (Dan Liew) Date: Sun, 27 Mar 2016 11:11:44 +0100 Subject: [CMake] add_custom_command() OUTPUT does not accept generator expressions, why? Message-ID: Hi, I tried writing a add_custom_command statement that will output the generated file into the same directory as another target ``` set(OUTPUT_NAME "$/MyThing.dll") add_custom_command(OUTPUT "${OUTPUT_NAME}" COMMAND "csc.exe" "/output:$" "MySource.cs" ) ``` This doesn't work. CMake emits this error message ``` add_custom_command called with OUTPUT containing a "<". This character is not allowed ``` If I can't use generator expressions with ``OUTPUT``, how am I supposed to output a file into the build directory of a target? It doesn't look like reading the ``LIBRARY_OUTPUT_DIRECTORY`` property of a target is really an option as according to the documentation that itself may contain generator expressions. Any thoughts would be appreciated. Thanks, Dan. From aixtools at gmail.com Sun Mar 27 11:49:07 2016 From: aixtools at gmail.com (Michael Felt) Date: Sun, 27 Mar 2016 17:49:07 +0200 Subject: [CMake] cmake-3.5.1 for AIX 5.3 TL7 and later Message-ID: <56F800F3.3000701@gmail.com> Just completed the build for cmake on a AIX 5.3 system, so the packaging will be accepted also by AIX 6.1, AIX 7.1 and AIX 7.2. The package is available via: http://www.aixtools.net/index.php/cmake Note: still have to update the link - if you are too fast you will see my packaging for cmake-2.8.11.2 make tests results: 99% tests passed, 2 tests failed out of 400 Label Time Summary: Label1 = 0.70 sec (1 test) Label2 = 0.70 sec (1 test) Total Test time (real) = 2554.14 sec The following tests FAILED: 7 - kwsys.testSystemTools (Failed) 278 - RunCMake.BuildDepends (Failed) From peng.1.wang at nokia.com Mon Mar 28 02:22:14 2016 From: peng.1.wang at nokia.com (Wang, Peng 1. (Nokia - CN/Hangzhou)) Date: Mon, 28 Mar 2016 06:22:14 +0000 Subject: [CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack In-Reply-To: References: <9193CFE72398F046892830C5FB1689215307D420@SGSIMBX007.nsn-intra.net> Message-ID: <9193CFE72398F046892830C5FB1689215307D641@SGSIMBX007.nsn-intra.net> Thanks for your answer. Actually, I was trying this on RHEL, not ubuntu. rpmbuild and rpmdevtools are correctly installed in my machine, I've tested that to generate RPM with my spec file based on rpmbuild and rpmdevtools, it works, libraries information is generated in the 'PROVIDES' fields of the RPM package. But with cpack, it doesn't. Wang Peng (Rex) Seat: 21F HZ SE Team +86018605811125 -----Original Message----- From: EXT Domen Vrankar [mailto:domen.vrankar at gmail.com] Sent: Friday, March 25, 2016 5:52 PM To: Wang, Peng 1. (Nokia - CN/Hangzhou) Cc: cmake at cmake.org Subject: Re: [CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack > Does someone know why this "CPACK_RPM_PACKAGE_AUTOPROV" option doesn't take > effect? how can I make it auto generates these 'PROVIDES' information in the > RPM? thanks for your time and it will be very appreciated if you can > provide some hints. CPackRPM relies on rpmbuild and other rpm tools to correctly create the package and rpm is not the most automation friendly beast because of its macro system. In cmake tests: Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake there is a comment # FIXME auto autoprov is not tested at the moment as Ubuntu 15.04 rpmbuild # does not use them correctly: https://bugs.launchpad.net/rpm/+bug/1475755 I'm guessing that this is environment related (missing packages, failing/missing rpm macros, ...) as for the same version of rpmbuild installed on different Linux distros (each through their own package repository that came with the distro) it either worked or not and never told that it failed (you could see that only after inspecting the content of rpm package after it has already been created). I haven't looked deeper into it but perhaps you've stumbled across this as well. You could try to make the package on a different distro and see if it works there. Regards, Domen From brad.king at kitware.com Mon Mar 28 10:05:33 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 28 Mar 2016 10:05:33 -0400 Subject: [CMake] add_custom_command() OUTPUT does not accept generator expressions, why? In-Reply-To: References: Message-ID: <56F93A2D.9090809@kitware.com> 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 refactoring since I last looked at it. There is some discussion here: https://cmake.org/Bug/view.php?id=13840 https://cmake.org/Bug/view.php?id=12877#c28315 > If I can't use generator expressions with ``OUTPUT``, how am I > supposed to output a file into the build directory of a target? Unfortunately it is not possible to do cleanly without fixing the above. Approximations include: * Use a POST_BUILD command on the target instead. * Make the OUTPUT a timestamp file and generate the real output as a side effect. If anyone is interested in trying to implement generator expressions for custom command outputs, I can provide more details to get started. -Brad From brad.king at kitware.com Mon Mar 28 10:09:36 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 28 Mar 2016 10:09:36 -0400 Subject: [CMake] CMAKE_SIZEOF_VOID_P is unset when building libgit2 on Windows In-Reply-To: References: <56F40D60.7020407@kitware.com> Message-ID: <56F93B20.8070004@kitware.com> On 03/25/2016 05:08 PM, Sebastian Schuberth wrote: > Looking at CMakeError.log was a good hint. I found: > > C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC -o > CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c "C:/Program > Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c" > > /usr/bin/sh: -c: line 0: syntax error near unexpected token `(' > /usr/bin/sh: -c: line 0: `C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC > -o CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c \C:/Program > Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c\' > CMakeFiles/cmTC_c0166.dir/build.make:65: recipe for target > 'CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj' failed > ---8<--- > > There seems to be some problem in escaping the non-alphanumeric chars > in the path to "CMakeCCompilerABI.c". Strange. CMake is regularly used from "C:/Program Files (x86)/CMake". > Any hint how to debug this further? Try running the logged compiler command line by hand: C:/Ruby-DevKit/mingw/bin/gcc.exe -c "C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c" Also try configuring a small test project in a fresh build tree: $ cat CMakeLists.txt cmake_minimum_required(VERSION 3.5) project(test C) message("${CMAKE_SIZEOF_VOID_P}") If that reproduces the problem, try configuring with --debug-trycompile so that the CMakeFiles/CmakeTmp/CMakeFiles/cmTC_*.dir/build.make files will be left behind for inspection. -Brad From domen.vrankar at gmail.com Mon Mar 28 13:00:10 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Mon, 28 Mar 2016 19:00:10 +0200 Subject: [CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack In-Reply-To: <9193CFE72398F046892830C5FB1689215307D641@SGSIMBX007.nsn-intra.net> References: <9193CFE72398F046892830C5FB1689215307D420@SGSIMBX007.nsn-intra.net> <9193CFE72398F046892830C5FB1689215307D641@SGSIMBX007.nsn-intra.net> Message-ID: CPackRPM generates spec files from which it generates the packages (just search for *.spec in your build directory). It is possible that Autoprov or Autoreqprov is not set correctly. Another possibility is that rpmbuild executed from within CPack is executed with different parameters. Please check for the differences between your spec file and the one that is generated by CPackRPM. I can also do that myself if you provide me with a minimal working spec file and commands that you used for generating the correct package. Thanks, Domen 2016-03-28 8:22 GMT+02:00 Wang, Peng 1. (Nokia - CN/Hangzhou) : > Thanks for your answer. > Actually, I was trying this on RHEL, not ubuntu. rpmbuild and rpmdevtools are correctly installed in my machine, I've tested that to generate RPM with my spec file based on rpmbuild and rpmdevtools, it works, libraries information is generated in the 'PROVIDES' fields of the RPM package. But with cpack, it doesn't. > > Wang Peng (Rex) > Seat: 21F > HZ SE Team > +86018605811125 > > -----Original Message----- > From: EXT Domen Vrankar [mailto:domen.vrankar at gmail.com] > Sent: Friday, March 25, 2016 5:52 PM > To: Wang, Peng 1. (Nokia - CN/Hangzhou) > Cc: cmake at cmake.org > Subject: Re: [CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack > >> Does someone know why this "CPACK_RPM_PACKAGE_AUTOPROV" option doesn't take >> effect? how can I make it auto generates these 'PROVIDES' information in the >> RPM? thanks for your time and it will be very appreciated if you can >> provide some hints. > > CPackRPM relies on rpmbuild and other rpm tools to correctly create > the package and rpm is not the most automation friendly beast because > of its macro system. > > In cmake tests: Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake > there is a comment > > # FIXME auto autoprov is not tested at the moment as Ubuntu 15.04 rpmbuild > # does not use them correctly: https://bugs.launchpad.net/rpm/+bug/1475755 > > I'm guessing that this is environment related (missing packages, > failing/missing rpm macros, ...) as for the same version of rpmbuild > installed on different Linux distros (each through their own package > repository that came with the distro) it either worked or not and > never told that it failed (you could see that only after inspecting > the content of rpm package after it has already been created). I > haven't looked deeper into it but perhaps you've stumbled across this > as well. > > You could try to make the package on a different distro and see if it > works there. > > Regards, > Domen From lloydkl.tech at gmail.com Tue Mar 29 03:03:02 2016 From: lloydkl.tech at gmail.com (Lloyd) Date: Tue, 29 Mar 2016 12:33:02 +0530 Subject: [CMake] Check if a variable contains valid number Message-ID: Hi, How can I check if the user supplied value is a valid positive integer or not? I have tried the following, but it is not entering the if condition, what might be wrong? Is there a better solution? SET(MY_NUMBER "100" CACHE STRING " Please enter the number") string(REGEX MATCH "^[1-9][0-9]*$" MY_NUMBER ${MY_NUMBER}) if(MY_NUMBER) #This area is not getting executed, whats wrong here endif() Thanks, Lloyd -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyall.dawson at gmail.com Tue Mar 29 03:57:53 2016 From: nyall.dawson at gmail.com (Nyall Dawson) Date: Tue, 29 Mar 2016 18:57:53 +1100 Subject: [CMake] How to debug missing dart images from ctest in cdash? Message-ID: (please forgive the cross-posting from the cdash list also, I'm not sure where this issue lies) I'm currently hitting an issue I can't resolve with submission of ctest results to cdash. Our project makes heavy use of DartMeasurementFile to display expected/rendered image results on cdash. This works fine for most set ups, and images are correctly displayed on our dash (eg, see http://dash.orfeo-toolbox.org/testDetails.php?test=39250586&build=222727). However, we've recently deployed a new build on Travis which makes use of cmake version 3.5, and using this build we cannot get the dart measurement files to display. An example output is http://dash.orfeo-toolbox.org/testDetails.php?test=39284628&build=222801 . The test code has not changed, and the same DartMeasurementFile messages are being output by the tests, but they are just ignored by ctest/cdash and we do not see the images for these builds. I've spent some time trying to debug this, but I'm stumped. Is there anything different with cmake 3.5 which would explain this behaviour? Kind regards, Nyall From eike at sf-mail.de Tue Mar 29 04:14:43 2016 From: eike at sf-mail.de (Rolf Eike Beer) Date: Tue, 29 Mar 2016 10:14:43 +0200 Subject: [CMake] Check if a variable contains valid number In-Reply-To: References: Message-ID: <667b0d12e3de7b431d911834ce06adca@sf-mail.de> Am 2016-03-29 09:03, schrieb Lloyd: > Hi, > > How can I check if the user supplied value is a valid positive integer > or > not? > > I have tried the following, but it is not entering the if condition, > what > might be wrong? Is there a better solution? > > SET(MY_NUMBER "100" CACHE STRING " Please enter the number") > string(REGEX MATCH "^[1-9][0-9]*$" MY_NUMBER ${MY_NUMBER}) > if(MY_NUMBER) > > #This area is not getting executed, whats wrong here > > endif() Have you tried this: if (MY_NUMBER MATCHES "^[0-9]+$") Greetings, Eike -- From vincent.huber at cemosis.fr Tue Mar 29 04:31:55 2016 From: vincent.huber at cemosis.fr (Vincent Huber) Date: Tue, 29 Mar 2016 10:31:55 +0200 Subject: [CMake] Debian SID / CMake 3.5.0-1 / FindBoost / CTest Message-ID: Hello everyone, In a CTest process, I have to determine the Boost_VERSION. To do so, I just add FIND_PACKAGE(Boost) to my configuration file. I didn?t had any problems since a cmake update on Debian/SID to cmake 3.5.0. >From now, I have: -- Looking for boost CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:896 (add_library): Unknown CMake command "add_library". Call Stack (most recent call first): /home/vhuber/feelpp/cmake/dashboard/testsuite.cmake:328 (FIND_PACKAGE)? ?If I run a standard cmake process with a FIND_PACKAGE(Boost) everything goes well. I do not clearly understand what is going on. ?I do not have theses problems with cmake 3.4.3 What can I do to solve that problem ? All the best, VH? ? -- Docteur Ing?nieur de recherche CeMoSiS - vincent.huber at cemosis.fr Tel: +33 (0)3 68 8*5 02 06* IRMA - 7, rue Ren? Descartes 67 000 Strasbourg -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsgladitz at gmail.com Tue Mar 29 04:54:27 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Tue, 29 Mar 2016 10:54:27 +0200 Subject: [CMake] Debian SID / CMake 3.5.0-1 / FindBoost / CTest In-Reply-To: References: Message-ID: <56FA42C3.8020503@gmail.com> On 03/29/2016 10:31 AM, Vincent Huber wrote: > > Hello everyone, > > In a |CTest| process, I have to determine the |Boost_VERSION|. > To do so, I just add |FIND_PACKAGE(Boost)| to my configuration file. > I didn?t had any problems since a |cmake| update on Debian/SID to > cmake 3.5.0. > > From now, I have: > |-- Looking for boost CMake Error at > /usr/share/cmake-3.5/Modules/FindBoost.cmake:896 (add_library): > Unknown CMake command "add_library". Call Stack (most recent call > first): /home/vhuber/feelpp/cmake/dashboard/testsuite.cmake:328 > (FIND_PACKAGE)|? > > ?If I run a standard |cmake| process with a |FIND_PACKAGE(Boost)| > everything goes well. > > I do not clearly understand what is going on. > add_library() is used by an increasing number of find modules to define IMPORTED targets. IMPORTED targets are the preferred and most convenient way to use libraries located by find modules. Since add_library() is only meaningful in build system definitions it is not available to ctest. > ?I do not have theses problems with cmake 3.4.3 > > What can I do to solve that problem ? > You haven't mentioned why you need to determine the Boost version in your ctest script but if you do still require it I would implement custom logic (you could base it on the existing logic in FindBoost.cmake). Using library find modules from any context other than cmake project files is ill defined even before the changes that introduced imported targets. The boost find module specifically uses compiler and platform information that is not available in ctest scripts (e.g. boost library file names can be mangled differently depending on which compilers/versions are used and can be located differently depending on bitness). Nils -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.huber at cemosis.fr Tue Mar 29 05:12:49 2016 From: vincent.huber at cemosis.fr (Vincent Huber) Date: Tue, 29 Mar 2016 11:12:49 +0200 Subject: [CMake] Debian SID / CMake 3.5.0-1 / FindBoost / CTest In-Reply-To: <56FA42C3.8020503@gmail.com> References: <56FA42C3.8020503@gmail.com> Message-ID: Thank you for your precise and clear answer ! 2016-03-29 10:54 GMT+02:00 Nils Gladitz : > On 03/29/2016 10:31 AM, Vincent Huber wrote: > > Hello everyone, > > In a CTest process, I have to determine the Boost_VERSION. > To do so, I just add FIND_PACKAGE(Boost) to my configuration file. > I didn?t had any problems since a cmake update on Debian/SID to cmake > 3.5.0. > > From now, I have: > -- Looking for boost CMake Error at > /usr/share/cmake-3.5/Modules/FindBoost.cmake:896 (add_library): Unknown > CMake command "add_library". Call Stack (most recent call first): > /home/vhuber/feelpp/cmake/dashboard/testsuite.cmake:328 (FIND_PACKAGE)? > > ?If I run a standard cmake process with a FIND_PACKAGE(Boost) everything > goes well. > > I do not clearly understand what is going on. > > > add_library() is used by an increasing number of find modules to define > IMPORTED targets. > IMPORTED targets are the preferred and most convenient way to use > libraries located by find modules. > > Since add_library() is only meaningful in build system definitions it is > not available to ctest. > > ?I do not have theses problems with cmake 3.4.3 > > What can I do to solve that problem ? > > > You haven't mentioned why you need to determine the Boost version in your > ctest script but if you do still require it I would implement custom logic > (you could base it on the existing logic in FindBoost.cmake). > > Using library find modules from any context other than cmake project files > is ill defined even before the changes that introduced imported targets. > The boost find module specifically uses compiler and platform information > that is not available in ctest scripts (e.g. boost library file names can > be mangled differently depending on which compilers/versions are used and > can be located differently depending on bitness). > > Nils > > -- Docteur Ing?nieur de recherche CeMoSiS - vincent.huber at cemosis.fr Tel: +33 (0)3 68 8*5 02 06* IRMA - 7, rue Ren? Descartes 67 000 Strasbourg -------------- next part -------------- An HTML attachment was scrubbed... URL: From mosra at centrum.cz Tue Mar 29 05:14:15 2016 From: mosra at centrum.cz (=?utf-8?q?Vladim=C3=ADr_Vondru=C5=A1?=) Date: Tue, 29 Mar 2016 11:14:15 +0200 Subject: [CMake] =?utf-8?q?EFFECTIVE=5FPLATFORM=5FNAME_not_expanded_in_TAR?= =?utf-8?q?GET=5F*_generator_expressions_on_iOS?= In-Reply-To: <56EFFD98.8040208@yahoo.com> References: <20160321134235.25B57D72@centrum.cz> <56EFFD98.8040208@yahoo.com> Message-ID: <20160329111415.64AF0FFF@centrum.cz> I saw that commit, yes. Since there is no additional round of variable expansion, wouldn't it be better to expand the ${EFFECTIVE_PLATFORM_NAME} to at least something fixed (based on the value of CMAKE_OSX_SYSROOT), instead of making the generator expression unusable in all cases? It seems reasonable to me that if I set CMAKE_OSX_SYSROOT to "iPhoneSimulator", the output of $ would be something like /path/to/my/build/dir/Debug-iphonesimulator/something.framework instead of: /path/to/my/build/dir/Debug${EFFECTIVE_PLATFORM_NAME}/something.framework Because the latter is unusable, with the former I have at least the ability to use it with a single fixed SDK. Thanks mosra ______________________________________________________________ > Od: Ruslan Baratov > Komu: "Vladim?r Vondru?" > Datum: 21.03.2016 14:56 > P?edm?t: Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS > > CC: cmake at cmake.org >On 21-Mar-16 19:42, Vladim?r Vondru? wrote: >> Hello, >> >> I came across this problem when trying to use XCTest macros ( https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When compiling for OSX, ctest properly executes all test cases, but when targeting iOS or iOS simulator, all the test cases fail similarly to the following: >> >> 25: Test command: /Applications/Xcode.app/Contents/Developer/usr/bin/xctest "/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTestRunner.xctest/../.." >> 25: Environment variables: >> 25: DYLD_FRAMEWORK_PATH=/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTest.framework/.. >> 25: Test timeout computed to be: 9.99988e+06 >> 25: 2016-03-21 12:41:38.799 xctest[31113:31078264] The bundle ?Test? couldn?t be loaded because its executable couldn?t be located. Try reinstalling the bundle. >> 25/28 Test #25: UtilityTypeTraitsTest ...............***Failed 0.04 sec >> >> As you can see, the `${EFFECTIVE_PLATFORM_NAME}` is not being expanded to `-iphonesimulator` and thus the file is not found. The problem is that the `$` generator expression does not expand the variable. On the other hand, installation works without an issue, because the `cmake_install.cmake` scripts do additional round of variable expansion that (accidentally?) fixes this. The relevant part of the CMake source is here: https://github.com/Kitware/CMake/blob/cd569b962dbeaa7ea718021c16582cddd158df3a/Source/cmGeneratorTarget.cxx#L5063 >> >> From the source it looks like the generator is just putting the "${EFFECTIVE_PLATFORM_NAME}" output and hopes that someone later expands it. That's the case with install scripts (so they work), but not with generator expressions. The `TARGET_LINKER_FILE_DIR` is not the only affected, the problem is the same for all `TARGET_*` generator expressions. >> >> Currently I'm working around this by partially hardcoding the path, but that's far from ideal and I would like to avoid that: >> >> if(CMAKE_OSX_SYSROOT MATCHES "iPhoneOS") >> set(platform_name "-iphoneos") >> elseif(CMAKE_OSX_SYSROOT MATCHES "iPhoneSimulator") >> set(platform_name "-iphonesimulator") >> endif() >> set(target_linker_file_dir ${CMAKE_CURRENT_BINARY_DIR}/$${platform_name}/${target}.xctest) >> >> Is there any way to fix this directly in CMake? Also the above workaround works only when targeting single SDK and not when having single generated project for both the device and the simulator. >> >> Thank you a lot for your help. >> >> mosra >I doubt I can help with the problem but just for your information: >* it wasn't fixed "accidentally", it was a fix for #12506: >https://github.com/Kitware/CMake/commit/48fe617e667d2e6b1e471cfb56346de51f984ba5 >* there is no "additional round" of variable expansion, >EFFECTIVE_PLATFORM_NAME initialized from Xcode's environment variable >EFFECTIVE_PLATFORM_NAME on installation > >As far as I understand the main general problem with iOS >device/simulator support is that CMake doesn't have multi-toolchain >feature from the box. So for now all this stuff worked by generating >some "universal" code that do work for both SDKs. The real SDK can be >triggered by additional explicit option, i.e.: >* cmake --build _builds -- -sdk iphoneos # trigger iphoneos SDK >* cmake --build _builds -- -sdk iphonesimulator # trigger >iphonesimulator SDK > >Ruslo > From sschuberth at gmail.com Tue Mar 29 05:39:56 2016 From: sschuberth at gmail.com (Sebastian Schuberth) Date: Tue, 29 Mar 2016 11:39:56 +0200 Subject: [CMake] CMAKE_SIZEOF_VOID_P is unset when building libgit2 on Windows In-Reply-To: <56F93B20.8070004@kitware.com> References: <56F40D60.7020407@kitware.com> <56F93B20.8070004@kitware.com> Message-ID: <56FA4D6C.9050409@gmail.com> On 3/28/2016 16:09, Brad King wrote: >> /usr/bin/sh: -c: line 0: syntax error near unexpected token `(' >> /usr/bin/sh: -c: line 0: `C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC >> -o CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c \C:/Program >> Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c\' >> CMakeFiles/cmTC_c0166.dir/build.make:65: recipe for target >> 'CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj' failed >> ---8<--- >> >> There seems to be some problem in escaping the non-alphanumeric chars >> in the path to "CMakeCCompilerABI.c". > > Strange. CMake is regularly used from "C:/Program Files (x86)/CMake". > >> Any hint how to debug this further? > > Try running the logged compiler command line by hand: > > C:/Ruby-DevKit/mingw/bin/gcc.exe -c "C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c" This seems to work, with no output on the console and an exit code of 0. > Also try configuring a small test project in a fresh build tree: > > $ cat CMakeLists.txt > cmake_minimum_required(VERSION 3.5) > project(test C) > message("${CMAKE_SIZEOF_VOID_P}") > > If that reproduces the problem, try configuring with --debug-trycompile > so that the CMakeFiles/CmakeTmp/CMakeFiles/cmTC_*.dir/build.make files > will be left behind for inspection. Yes, that does reproduce the issue, ${CMAKE_SIZEOF_VOID_P} evaluates to an empty string. I was looking at the CMakeFiles/cmTC_21eb3.dir/build.make file for CMakeCCompilerABI but was not seeing any suspicious. Calling $ /c/Ruby-DevKit/bin/make -f CMakeFiles/cmTC_21eb3.dir/build.make cmTC_21eb3.exe Also successfully builds the executable. What should I try next? Regards, Sebastian From sschuberth at gmail.com Tue Mar 29 06:18:02 2016 From: sschuberth at gmail.com (Sebastian Schuberth) Date: Tue, 29 Mar 2016 12:18:02 +0200 Subject: [CMake] CMAKE_SIZEOF_VOID_P is unset when building libgit2 on Windows In-Reply-To: <56FA4D6C.9050409@gmail.com> References: <56F40D60.7020407@kitware.com> <56F93B20.8070004@kitware.com> <56FA4D6C.9050409@gmail.com> Message-ID: <56FA565A.8000202@gmail.com> On 3/29/2016 11:39, Sebastian Schuberth wrote: >> $ cat CMakeLists.txt >> cmake_minimum_required(VERSION 3.5) >> project(test C) >> message("${CMAKE_SIZEOF_VOID_P}") >> >> If that reproduces the problem, try configuring with --debug-trycompile >> so that the CMakeFiles/CmakeTmp/CMakeFiles/cmTC_*.dir/build.make files >> will be left behind for inspection. > > Yes, that does reproduce the issue, ${CMAKE_SIZEOF_VOID_P} evaluates to an empty string. I was looking at the CMakeFiles/cmTC_21eb3.dir/build.make file for CMakeCCompilerABI but was not seeing any suspicious. Calling > > $ /c/Ruby-DevKit/bin/make -f CMakeFiles/cmTC_21eb3.dir/build.make cmTC_21eb3.exe > > Also successfully builds the executable. > > What should I try next? Ok, I seem to have found the root cause of the problem. Altough CMake is correctly using gcc from C:/Ruby-DevKit/mingw/bin/gcc.exe, it's using gmake from C:/Strawberry/c/bin/gmake.exe (which is from Strawberry Perl that I also have installed). Ruby-DevKit does not come with gmake.exe, only with bin/make.exe (and with mingw/bin/mingw32-make.exe). But for some reason CMake seems to prefer gmake over make, despite the latter coming from the same parent directory than gcc. While C:/Ruby-DevKit/bin/make.exe is an executable linked against MSYS-1.0.DLL that understands Unix-style paths on Windows, C:/Strawberry/c/bin/gmake.exe is a native Windows exeutable linked against MSVCRT.DLL that does not. Removing C:/Strawberry/c/bin from PATH so that CMake doe snot find gmake properly works around the issue for me. So far, so good, but I'm yet unsure what's the best / most generic fix for this. As Ruby-DevKit is based on MSYS, I tried to replace "Unix Makefiles" in $ cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Unix Makefiles" with "MSYS Makefiles" so that it reads $ cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "MSYS Makefiles" and that seems to work. Brad, do you think that's a reasonable fix? What's the difference between CMake's "Unix Makefiles" and "MSYS Makefiles" anyway? Regards, Sebastian From ruslan_baratov at yahoo.com Tue Mar 29 09:20:49 2016 From: ruslan_baratov at yahoo.com (Ruslan Baratov) Date: Tue, 29 Mar 2016 20:20:49 +0700 Subject: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS In-Reply-To: <20160329111415.64AF0FFF@centrum.cz> References: <20160321134235.25B57D72@centrum.cz> <56EFFD98.8040208@yahoo.com> <20160329111415.64AF0FFF@centrum.cz> Message-ID: <56FA8131.2080801@yahoo.com> On 29-Mar-16 16:14, Vladim?r Vondru? wrote: > I saw that commit, yes. Since there is no additional round of variable expansion, wouldn't it be better to expand the ${EFFECTIVE_PLATFORM_NAME} to at least something fixed (based on the value of CMAKE_OSX_SYSROOT), instead of making the generator expression unusable in all cases? It seems reasonable to me that if I set CMAKE_OSX_SYSROOT to "iPhoneSimulator", the output of $ would be something like > > /path/to/my/build/dir/Debug-iphonesimulator/something.framework > > instead of: > > /path/to/my/build/dir/Debug${EFFECTIVE_PLATFORM_NAME}/something.framework > > Because the latter is unusable, with the former I have at least the ability to use it with a single fixed SDK. > > Thanks > mosra As far as I know you have to set CMAKE_OSX_SYSROOT to "iphoneos" so Xcode project will contain both simulator and device configuration. Without this change such feature like CMAKE_IOS_INSTALL_COMBINED will not work. In other words substituting `${EFFECTIVE_PLATFORM_NAME}` may fit your needs but will broke CMAKE_IOS_INSTALL_COMBINED for everybody (at least if this behaviour will be unconditional). Ruslo > > ______________________________________________________________ >> Od: Ruslan Baratov >> Komu: "Vladim?r Vondru?" >> Datum: 21.03.2016 14:56 >> P?edm?t: Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS >> >> CC: cmake at cmake.org >> On 21-Mar-16 19:42, Vladim?r Vondru? wrote: >>> Hello, >>> >>> I came across this problem when trying to use XCTest macros ( https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When compiling for OSX, ctest properly executes all test cases, but when targeting iOS or iOS simulator, all the test cases fail similarly to the following: >>> >>> 25: Test command: /Applications/Xcode.app/Contents/Developer/usr/bin/xctest "/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTestRunner.xctest/../.." >>> 25: Environment variables: >>> 25: DYLD_FRAMEWORK_PATH=/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTest.framework/.. >>> 25: Test timeout computed to be: 9.99988e+06 >>> 25: 2016-03-21 12:41:38.799 xctest[31113:31078264] The bundle ?Test? couldn?t be loaded because its executable couldn?t be located. Try reinstalling the bundle. >>> 25/28 Test #25: UtilityTypeTraitsTest ...............***Failed 0.04 sec >>> >>> As you can see, the `${EFFECTIVE_PLATFORM_NAME}` is not being expanded to `-iphonesimulator` and thus the file is not found. The problem is that the `$` generator expression does not expand the variable. On the other hand, installation works without an issue, because the `cmake_install.cmake` scripts do additional round of variable expansion that (accidentally?) fixes this. The relevant part of the CMake source is here: https://github.com/Kitware/CMake/blob/cd569b962dbeaa7ea718021c16582cddd158df3a/Source/cmGeneratorTarget.cxx#L5063 >>> >>> From the source it looks like the generator is just putting the "${EFFECTIVE_PLATFORM_NAME}" output and hopes that someone later expands it. That's the case with install scripts (so they work), but not with generator expressions. The `TARGET_LINKER_FILE_DIR` is not the only affected, the problem is the same for all `TARGET_*` generator expressions. >>> >>> Currently I'm working around this by partially hardcoding the path, but that's far from ideal and I would like to avoid that: >>> >>> if(CMAKE_OSX_SYSROOT MATCHES "iPhoneOS") >>> set(platform_name "-iphoneos") >>> elseif(CMAKE_OSX_SYSROOT MATCHES "iPhoneSimulator") >>> set(platform_name "-iphonesimulator") >>> endif() >>> set(target_linker_file_dir ${CMAKE_CURRENT_BINARY_DIR}/$${platform_name}/${target}.xctest) >>> >>> Is there any way to fix this directly in CMake? Also the above workaround works only when targeting single SDK and not when having single generated project for both the device and the simulator. >>> >>> Thank you a lot for your help. >>> >>> mosra >> I doubt I can help with the problem but just for your information: >> * it wasn't fixed "accidentally", it was a fix for #12506: >> https://github.com/Kitware/CMake/commit/48fe617e667d2e6b1e471cfb56346de51f984ba5 >> * there is no "additional round" of variable expansion, >> EFFECTIVE_PLATFORM_NAME initialized from Xcode's environment variable >> EFFECTIVE_PLATFORM_NAME on installation >> >> As far as I understand the main general problem with iOS >> device/simulator support is that CMake doesn't have multi-toolchain >> feature from the box. So for now all this stuff worked by generating >> some "universal" code that do work for both SDKs. The real SDK can be >> triggered by additional explicit option, i.e.: >> * cmake --build _builds -- -sdk iphoneos # trigger iphoneos SDK >> * cmake --build _builds -- -sdk iphonesimulator # trigger >> iphonesimulator SDK >> >> Ruslo >> From mosra at centrum.cz Tue Mar 29 11:51:09 2016 From: mosra at centrum.cz (=?utf-8?q?Vladim=C3=ADr_Vondru=C5=A1?=) Date: Tue, 29 Mar 2016 17:51:09 +0200 Subject: [CMake] =?utf-8?q?EFFECTIVE=5FPLATFORM=5FNAME_not_expanded_in_TAR?= =?utf-8?q?GET=5F*_generator_expressions_on_iOS?= In-Reply-To: <56FA8131.2080801@yahoo.com> References: <20160321134235.25B57D72@centrum.cz>, <56EFFD98.8040208@yahoo.com>, <20160329111415.64AF0FFF@centrum.cz> <56FA8131.2080801@yahoo.com> Message-ID: <20160329175109.C5A7BAF9@centrum.cz> Hm... this is unfortunate. Would it be possible to keep the ${EFFECTIVE_PLATFORM_NAME} in place for the install step but return it substituted when one asks explicitly using generator expression? From what I understood in the docs, the CMAKE_IOS_INSTALL_COMBINED is doing something additional during installation step and does not affect generator step -- so I think a behavior specific for installation and CMAKE_IOS_INSTALL_COMBINED could be separated from direct use of generator expressions. Or am I completely out of touch? Thank you mosra ______________________________________________________________ > Od: Ruslan Baratov > Komu: "Vladim?r Vondru?" > Datum: 29.03.2016 15:20 > P?edm?t: Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS > > CC: cmake at cmake.org >On 29-Mar-16 16:14, Vladim?r Vondru? wrote: >> I saw that commit, yes. Since there is no additional round of variable expansion, wouldn't it be better to expand the ${EFFECTIVE_PLATFORM_NAME} to at least something fixed (based on the value of CMAKE_OSX_SYSROOT), instead of making the generator expression unusable in all cases? It seems reasonable to me that if I set CMAKE_OSX_SYSROOT to "iPhoneSimulator", the output of $ would be something like >> >> /path/to/my/build/dir/Debug-iphonesimulator/something.framework >> >> instead of: >> >> /path/to/my/build/dir/Debug${EFFECTIVE_PLATFORM_NAME}/something.framework >> >> Because the latter is unusable, with the former I have at least the ability to use it with a single fixed SDK. >> >> Thanks >> mosra >As far as I know you have to set CMAKE_OSX_SYSROOT to "iphoneos" so >Xcode project will contain both simulator and device configuration. >Without this change such feature like CMAKE_IOS_INSTALL_COMBINED will >not work. In other words substituting `${EFFECTIVE_PLATFORM_NAME}` may >fit your needs but will broke CMAKE_IOS_INSTALL_COMBINED for everybody >(at least if this behaviour will be unconditional). > >Ruslo > >> >> ______________________________________________________________ >>> Od: Ruslan Baratov >>> Komu: "Vladim?r Vondru?" >>> Datum: 21.03.2016 14:56 >>> P?edm?t: Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS >>> >>> CC: cmake at cmake.org >>> On 21-Mar-16 19:42, Vladim?r Vondru? wrote: >>>> Hello, >>>> >>>> I came across this problem when trying to use XCTest macros ( https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When compiling for OSX, ctest properly executes all test cases, but when targeting iOS or iOS simulator, all the test cases fail similarly to the following: >>>> >>>> 25: Test command: /Applications/Xcode.app/Contents/Developer/usr/bin/xctest "/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTestRunner.xctest/../.." >>>> 25: Environment variables: >>>> 25: DYLD_FRAMEWORK_PATH=/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTest.framework/.. >>>> 25: Test timeout computed to be: 9.99988e+06 >>>> 25: 2016-03-21 12:41:38.799 xctest[31113:31078264] The bundle ?Test? couldn?t be loaded because its executable couldn?t be located. Try reinstalling the bundle. >>>> 25/28 Test #25: UtilityTypeTraitsTest ...............***Failed 0.04 sec >>>> >>>> As you can see, the `${EFFECTIVE_PLATFORM_NAME}` is not being expanded to `-iphonesimulator` and thus the file is not found. The problem is that the `$` generator expression does not expand the variable. On the other hand, installation works without an issue, because the `cmake_install.cmake` scripts do additional round of variable expansion that (accidentally?) fixes this. The relevant part of the CMake source is here: https://github.com/Kitware/CMake/blob/cd569b962dbeaa7ea718021c16582cddd158df3a/Source/cmGeneratorTarget.cxx#L5063 >>>> >>>> From the source it looks like the generator is just putting the "${EFFECTIVE_PLATFORM_NAME}" output and hopes that someone later expands it. That's the case with install scripts (so they work), but not with generator expressions. The `TARGET_LINKER_FILE_DIR` is not the only affected, the problem is the same for all `TARGET_*` generator expressions. >>>> >>>> Currently I'm working around this by partially hardcoding the path, but that's far from ideal and I would like to avoid that: >>>> >>>> if(CMAKE_OSX_SYSROOT MATCHES "iPhoneOS") >>>> set(platform_name "-iphoneos") >>>> elseif(CMAKE_OSX_SYSROOT MATCHES "iPhoneSimulator") >>>> set(platform_name "-iphonesimulator") >>>> endif() >>>> set(target_linker_file_dir ${CMAKE_CURRENT_BINARY_DIR}/$${platform_name}/${target}.xctest) >>>> >>>> Is there any way to fix this directly in CMake? Also the above workaround works only when targeting single SDK and not when having single generated project for both the device and the simulator. >>>> >>>> Thank you a lot for your help. >>>> >>>> mosra >>> I doubt I can help with the problem but just for your information: >>> * it wasn't fixed "accidentally", it was a fix for #12506: >>> https://github.com/Kitware/CMake/commit/48fe617e667d2e6b1e471cfb56346de51f984ba5 >>> * there is no "additional round" of variable expansion, >>> EFFECTIVE_PLATFORM_NAME initialized from Xcode's environment variable >>> EFFECTIVE_PLATFORM_NAME on installation >>> >>> As far as I understand the main general problem with iOS >>> device/simulator support is that CMake doesn't have multi-toolchain >>> feature from the box. So for now all this stuff worked by generating >>> some "universal" code that do work for both SDKs. The real SDK can be >>> triggered by additional explicit option, i.e.: >>> * cmake --build _builds -- -sdk iphoneos # trigger iphoneos SDK >>> * cmake --build _builds -- -sdk iphonesimulator # trigger >>> iphonesimulator SDK >>> >>> Ruslo >>> > > From ruslan_baratov at yahoo.com Tue Mar 29 14:00:44 2016 From: ruslan_baratov at yahoo.com (Ruslan Baratov) Date: Wed, 30 Mar 2016 01:00:44 +0700 Subject: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS In-Reply-To: <20160329175109.C5A7BAF9@centrum.cz> References: <20160321134235.25B57D72@centrum.cz> <56EFFD98.8040208@yahoo.com> <20160329111415.64AF0FFF@centrum.cz> <56FA8131.2080801@yahoo.com> <20160329175109.C5A7BAF9@centrum.cz> Message-ID: <56FAC2CC.5000309@yahoo.com> The note about CMAKE_IOS_INSTALL_COMBINED is related to value of CMAKE_OSX_SYSROOT. `${EFFECTIVE_PLATFORM_NAME}` as far as I understand used on build step too, it's not only installation (`cmTarget::ComputeOutputDir`). As alternative you can try to hardcode `LIBRARY_OUTPUT_DIRECTORY` so both simulator and device will have same predictable location. I don't know about CMake internals in such depth to answer question about generator expression. Ruslo On 29-Mar-16 22:51, Vladim?r Vondru? wrote: > Hm... this is unfortunate. Would it be possible to keep the ${EFFECTIVE_PLATFORM_NAME} in place for the install step but return it substituted when one asks explicitly using generator expression? From what I understood in the docs, the CMAKE_IOS_INSTALL_COMBINED is doing something additional during installation step and does not affect generator step -- so I think a behavior specific for installation and CMAKE_IOS_INSTALL_COMBINED could be separated from direct use of generator expressions. Or am I completely out of touch? > > Thank you > mosra > > ______________________________________________________________ >> Od: Ruslan Baratov >> Komu: "Vladim?r Vondru?" >> Datum: 29.03.2016 15:20 >> P?edm?t: Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS >> >> CC: cmake at cmake.org >> On 29-Mar-16 16:14, Vladim?r Vondru? wrote: >>> I saw that commit, yes. Since there is no additional round of variable expansion, wouldn't it be better to expand the ${EFFECTIVE_PLATFORM_NAME} to at least something fixed (based on the value of CMAKE_OSX_SYSROOT), instead of making the generator expression unusable in all cases? It seems reasonable to me that if I set CMAKE_OSX_SYSROOT to "iPhoneSimulator", the output of $ would be something like >>> >>> /path/to/my/build/dir/Debug-iphonesimulator/something.framework >>> >>> instead of: >>> >>> /path/to/my/build/dir/Debug${EFFECTIVE_PLATFORM_NAME}/something.framework >>> >>> Because the latter is unusable, with the former I have at least the ability to use it with a single fixed SDK. >>> >>> Thanks >>> mosra >> As far as I know you have to set CMAKE_OSX_SYSROOT to "iphoneos" so >> Xcode project will contain both simulator and device configuration. >> Without this change such feature like CMAKE_IOS_INSTALL_COMBINED will >> not work. In other words substituting `${EFFECTIVE_PLATFORM_NAME}` may >> fit your needs but will broke CMAKE_IOS_INSTALL_COMBINED for everybody >> (at least if this behaviour will be unconditional). >> >> Ruslo >> >>> ______________________________________________________________ >>>> Od: Ruslan Baratov >>>> Komu: "Vladim?r Vondru?" >>>> Datum: 21.03.2016 14:56 >>>> P?edm?t: Re: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS >>>> >>>> CC: cmake at cmake.org >>>> On 21-Mar-16 19:42, Vladim?r Vondru? wrote: >>>>> Hello, >>>>> >>>>> I came across this problem when trying to use XCTest macros ( https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When compiling for OSX, ctest properly executes all test cases, but when targeting iOS or iOS simulator, all the test cases fail similarly to the following: >>>>> >>>>> 25: Test command: /Applications/Xcode.app/Contents/Developer/usr/bin/xctest "/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTestRunner.xctest/../.." >>>>> 25: Environment variables: >>>>> 25: DYLD_FRAMEWORK_PATH=/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTest.framework/.. >>>>> 25: Test timeout computed to be: 9.99988e+06 >>>>> 25: 2016-03-21 12:41:38.799 xctest[31113:31078264] The bundle ?Test? couldn?t be loaded because its executable couldn?t be located. Try reinstalling the bundle. >>>>> 25/28 Test #25: UtilityTypeTraitsTest ...............***Failed 0.04 sec >>>>> >>>>> As you can see, the `${EFFECTIVE_PLATFORM_NAME}` is not being expanded to `-iphonesimulator` and thus the file is not found. The problem is that the `$` generator expression does not expand the variable. On the other hand, installation works without an issue, because the `cmake_install.cmake` scripts do additional round of variable expansion that (accidentally?) fixes this. The relevant part of the CMake source is here: https://github.com/Kitware/CMake/blob/cd569b962dbeaa7ea718021c16582cddd158df3a/Source/cmGeneratorTarget.cxx#L5063 >>>>> >>>>> From the source it looks like the generator is just putting the "${EFFECTIVE_PLATFORM_NAME}" output and hopes that someone later expands it. That's the case with install scripts (so they work), but not with generator expressions. The `TARGET_LINKER_FILE_DIR` is not the only affected, the problem is the same for all `TARGET_*` generator expressions. >>>>> >>>>> Currently I'm working around this by partially hardcoding the path, but that's far from ideal and I would like to avoid that: >>>>> >>>>> if(CMAKE_OSX_SYSROOT MATCHES "iPhoneOS") >>>>> set(platform_name "-iphoneos") >>>>> elseif(CMAKE_OSX_SYSROOT MATCHES "iPhoneSimulator") >>>>> set(platform_name "-iphonesimulator") >>>>> endif() >>>>> set(target_linker_file_dir ${CMAKE_CURRENT_BINARY_DIR}/$${platform_name}/${target}.xctest) >>>>> >>>>> Is there any way to fix this directly in CMake? Also the above workaround works only when targeting single SDK and not when having single generated project for both the device and the simulator. >>>>> >>>>> Thank you a lot for your help. >>>>> >>>>> mosra >>>> I doubt I can help with the problem but just for your information: >>>> * it wasn't fixed "accidentally", it was a fix for #12506: >>>> https://github.com/Kitware/CMake/commit/48fe617e667d2e6b1e471cfb56346de51f984ba5 >>>> * there is no "additional round" of variable expansion, >>>> EFFECTIVE_PLATFORM_NAME initialized from Xcode's environment variable >>>> EFFECTIVE_PLATFORM_NAME on installation >>>> >>>> As far as I understand the main general problem with iOS >>>> device/simulator support is that CMake doesn't have multi-toolchain >>>> feature from the box. So for now all this stuff worked by generating >>>> some "universal" code that do work for both SDKs. The real SDK can be >>>> triggered by additional explicit option, i.e.: >>>> * cmake --build _builds -- -sdk iphoneos # trigger iphoneos SDK >>>> * cmake --build _builds -- -sdk iphonesimulator # trigger >>>> iphonesimulator SDK >>>> >>>> Ruslo >>>> >> From barry at barrys-emacs.org Tue Mar 29 14:05:19 2016 From: barry at barrys-emacs.org (Barry Scott) Date: Tue, 29 Mar 2016 19:05:19 +0100 Subject: [CMake] zlib and pkg-config on window Message-ID: <20160329190519.00002ed2@barrys-emacs.org> I am trying to build a couple of projects that use CMake, libssh2 and libgit2 on Windows 10 64 bit. I am installing all open source code into c:\OpenSource64 tree with the usual bin, lib, include folders. I cannot seem to find a set of -D that allows cmake to allow ZLIB and libssh2 be found when bulding libgit2. Do I need to point CMake at the folder with the .pc files in it? How would I do that? Does CMake need an implementation of pkg-config for windows? Here are the libssh2 files that are installed: c:\>dir OpenSource64\libssh* /s /b|find /v "share" c:\OpenSource64\bin\libssh2.dll c:\OpenSource64\include\libssh2.h c:\OpenSource64\include\libssh2_config.h c:\OpenSource64\include\libssh2_publickey.h c:\OpenSource64\include\libssh2_sftp.h c:\OpenSource64\lib\libssh2.dll c:\OpenSource64\lib\libssh2.lib c:\OpenSource64\lib\cmake\libssh2 c:\OpenSource64\lib\cmake\libssh2\Libssh2Config-release.cmake c:\OpenSource64\lib\cmake\libssh2\Libssh2Config.cmake c:\OpenSource64\lib\cmake\libssh2\Libssh2ConfigVersion.cmake c:\OpenSource64\lib\pkgconfig\libssh2.pc here is the cmake run: C:\Users\barry\Work\libgit2-0.24.0\build.Release> cmake -G "Visual Studio 14 2015 Win64" .. -DCMAKE_PREFIX_PATH=c:/OpenSource64 -DLIBSSH2_PREFIX=c:/OpenSource64 -- The C compiler identification is MSVC 19.0.23026.0 -- Check for working C compiler using: Visual Studio 14 2015 Win64 -- Check for working C compiler using: Visual Studio 14 2015 Win64 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Performing Test HAVE_STRUCT_STAT_ST_MTIM -- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Failed -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed -- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC -- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC - Failed -- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.8") -- zlib was not found; using bundled 3rd-party sources. -- LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path. -- Looking for futimens -- Looking for futimens - not found -- Looking for qsort_r -- Looking for qsort_r - not found -- Looking for qsort_s -- Looking for qsort_s - found -- Looking for clock_gettime in rt -- Looking for clock_gettime in rt - not found -- Found PythonInterp: C:/python35.win64/python.exe (found version "3.5.1") -- Configuring done -- Generating done -- Build files have been written to: C:/Users/barry/Work/libgit2-0.24.0/build.Release Adding -DZLIB_LIBRARY=c:/OpenSource64/lib/zlib1.dll leads to a link error claiming that zlib1.dll is a corrupt file. Atleast to dumpbin it seems that zlib1.dll is good. Barry From gjasny at googlemail.com Wed Mar 30 08:15:34 2016 From: gjasny at googlemail.com (Gregor Jasny) Date: Wed, 30 Mar 2016 14:15:34 +0200 Subject: [CMake] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS In-Reply-To: <20160321134235.25B57D72@centrum.cz> References: <20160321134235.25B57D72@centrum.cz> Message-ID: <56FBC366.4090706@googlemail.com> Hello, I fear you're one of the first users of the XCtest feature :) On 21/03/16 13:42, Vladim?r Vondru? wrote: > Hello, > > I came across this problem when trying to use XCTest macros ( https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When compiling for OSX, ctest properly executes all test cases, but when targeting iOS or iOS simulator, all the test cases fail similarly to the following: > > 25: Test command: /Applications/Xcode.app/Contents/Developer/usr/bin/xctest "/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTestRunner.xctest/../.." > 25: Environment variables: > 25: DYLD_FRAMEWORK_PATH=/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTest.framework/.. > 25: Test timeout computed to be: 9.99988e+06 > 25: 2016-03-21 12:41:38.799 xctest[31113:31078264] The bundle ?Test? couldn?t be loaded because its executable couldn?t be located. Try reinstalling the bundle. > 25/28 Test #25: UtilityTypeTraitsTest ...............***Failed 0.04 sec > > As you can see, the `${EFFECTIVE_PLATFORM_NAME}` is not being expanded to `-iphonesimulator` and thus the file is not found. The problem is that the `$` generator expression does not expand the variable. On the other hand, installation works without an issue, because the `cmake_install.cmake` scripts do additional round of variable expansion that (accidentally?) fixes this. The relevant part of the CMake source is here: https://github.com/Kitware/CMake/blob/cd569b962dbeaa7ea718021c16582cddd158df3a/Source/cmGeneratorTarget.cxx#L5063 > > From the source it looks like the generator is just putting the "${EFFECTIVE_PLATFORM_NAME}" output and hopes that someone later expands it. That's the case with install scripts (so they work), but not with generator expressions. The `TARGET_LINKER_FILE_DIR` is not the only affected, the problem is the same for all `TARGET_*` generator expressions. > > Currently I'm working around this by partially hardcoding the path, but that's far from ideal and I would like to avoid that: > > if(CMAKE_OSX_SYSROOT MATCHES "iPhoneOS") > set(platform_name "-iphoneos") > elseif(CMAKE_OSX_SYSROOT MATCHES "iPhoneSimulator") > set(platform_name "-iphonesimulator") > endif() > set(target_linker_file_dir ${CMAKE_CURRENT_BINARY_DIR}/$${platform_name}/${target}.xctest) > > Is there any way to fix this directly in CMake? Also the above workaround works only when targeting single SDK and not when having single generated project for both the device and the simulator. Could you please send me a minimal example and a command line how you invoke CMake? Thanks, Gregor From karelgeiregat at gmail.com Wed Mar 30 11:15:21 2016 From: karelgeiregat at gmail.com (Karel Geiregat) Date: Wed, 30 Mar 2016 17:15:21 +0200 Subject: [CMake] using cmake to link header files: file could be found, is included, but build error when using nmake. Message-ID: Dear users at Cmake It could be that I don't have understood the linking process when building the project by cmake. The project has three dependencies: (1) Boost, (2) (Apache) Avro and (3) Botan. After issuing the following command to be able to use the nmake command from Visual Studio: D:\...\build>cmake -G "NMake Makefiles" -DKAA_INSTALL_PATH="D:\kaa\kaaSDK" > -DKAA_DEBUG_ENABLED=1 .. > It ran without problems, except minor warnings like WARNING: Target "kaacpp" requests linking to directory > "D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win". Targets may link only to > libraries. CMake is dropping the item. > => note: full log is at the bottom of this mail (appendix 1). but when i call nmake after, it immediately throws up error: D:\...\build>nmake > > Microsoft (R) Program Maintenance Utility Version 14.00.23506.0 > Copyright (C) Microsoft Corporation. All rights reserved. > > Scanning dependencies of target kaacpp_o > [ 1%] Building CXX object > CMakeFiles/kaacpp_o.dir/impl/event/registration/EndpointRegistrationManager.cpp.obj > EndpointRegistrationManager.cpp > D:\kaa\kaa-cpp-ep-sdk-aXrMkhHEE2BrPBehV_Vbxym2MfU\kaa/gen/EndpointGen.hpp(26): > fatal error C1083: Cannot open include file: 'avro/Specific.hh': No such > file or directory > NMAKE : fatal error U1077: 'C:\PROGRA~2\VISUAL~1.0\VC\bin\cl.exe' : return > code '0x2' > Stop. > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Visual Studio > 14.0\VC\BIN\nmake.exe"' : return code '0x2' > Stop. > I have checked the file, and there is the following includes #include > #include "boost/any.hpp" > #include "avro/Specific.hh" <-------- error line > #include "avro/Encoder.hh" > #include "avro/Decoder.hh" > My idea is that the linking of the avro library is not set up correctly since the error got thrown after including a Boost file. Here is a fragment of my cmakelists.txt file where Avro got added and how the packages got found/added # AVRO_ROOT_DIR - Set this variable to the root installation of > Avro C++ if the module has problems finding the proper installation path. > # AVRO_LIBRARY - The Avro C++ libraries > # AVRO_INCLUDE_DIR - The location of Avro C++ headers > set(AVRO_ROOT_DIR D:/kuleuven/thesis/kaa/kaaBuild/avro_1.8.0/lang/c++) > set(AVRO_LIBRARY > D:/kuleuven/thesis/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win) > set(AVRO_INCLUDE_DIR > D:/kuleuven/thesis/kaa/kaaBuild/avro_1.8.0/lang/c++/avro) > > some contents omitte > > # > # Find third-party dependencies > # > find_package (Boost 1.54 REQUIRED COMPONENTS log system thread) > find_package (Avro REQUIRED) > find_package (Botan REQUIRED) > => note: full cmakelist.txt file is added as appendix2 After that, i have issued the following messaging message("--- AVRO: Found? " ${AVRO_FOUND}) <----- displays "--- AVRO: > Found? TRUE" > message(${AVRO_LIBRARIES}) <----- displays " > D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win" So, the library can be found. However, it surprises me that the specific file, Specific.hh could not be found while it is in the include directory, AVRO_INCLUDE_DIR (according to the findavrocpp.cmake it's used for headers). I have issued the following PowerShell command to show that the file is in the given directory PS D:\kaa\kaaBuild\avro_1.8.0\lang\c++\avro> Get-childitem Specific.hh > > Directory: D:\kaa\kaaBuild\avro_1.8.0\lang\c++\avro > > Mode LastWriteTime Length Name > ---- ------------- ------ ---- > -a---- 2/9/2012 7:11 PM 7428 Specific.hh > So it could be that it is not linking correctly. Is the cmakelist.txt incorrect or is cmake unable to link the right header file without throwing an error ? Is there a solution for this ? I don't have a clue where to find the cause of the linking problems so i can solve it. If you need more information, please check the appendix 1 & 2 here below. If these isn't sufficient enough, please inform me which information i can provide. Sincerely - kg *APPENDIX 1: output of cmake command* D:\kaa\kaa-cpp-ep-sdk-aXrMkhHEE2BrPBehV_Vbxym2MfU\build>cmake -G "NMake > Makefiles" -DKAA_INSTALL_PATH="D:\kaa\kaaSDK" -DKAA_DEBUG_ENABLED=1 .. > ================================== > CMake Warning (dev) at CMakeLists.txt:73 (if): > Policy CMP0054 is not set: Only interpret if() arguments as variables or > keywords when unquoted. Run "cmake --help-policy CMP0054" for policy > details. Use the cmake_policy command to set the policy and suppress > this > warning. > > Quoted variables like "MSVC" will no longer be dereferenced when the > policy > is set to NEW. Since the policy is not set the OLD behavior will be > used. > This warning is for project developers. Use -Wno-dev to suppress it. > > ================================== > KAA_MAX_LOG_LEVEL=6 > EVENTS ENABLED > NOTIFICATIONS ENABLED > CONFIGURATION ENABLED > LOGGING ENABLED > OPERATION_TCP_CHANNEL ENABLED > OPERATION_LONG_POLL_CHANNEL ENABLED > OPERATION_HTTP_CHANNEL ENABLED > BOOTSTRAP_HTTP_CHANNEL ENABLED > CONNECTIVITY_CHECKER ENABLED > KAA_THREADSAFE ENABLED > ================================== > -- Boost version: 1.60.0 > -- Found the following Boost libraries: > -- log > -- system > -- thread > -- date_time > -- log_setup > -- filesystem > -- regex > -- chrono > -- atomic > > Looking for Avro C++ headers and libraries > -- Root dir: D:/kaa/kaaBuild/avro_1.8.0/lang/c++ > -- Include directories: D:/kaa/kaaBuild/avro_1.8.0/lang/c++/avro > -- Libraries: D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win > -- FindBotan check > -- BOTAN_HOME is not empty: "D:/kaa/kaaBuild/botan-1.11.29" > -- Looking for botan in D:/kaa/kaaBuild/botan-1.11.29 > -- Include directory: D:/kaa/kaaBuild/botan-1.11.29/build/include > -- Library: D:/kaa/kaaBuild/botan-1.11.29/botan.lib > > checking libraries > --- BOTAN: Found? YES > D:/kaa/kaaBuild/botan-1.11.29/botan.lib > --- AVRO: Found? TRUE > D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win > --- BOOST: Found? > > optimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_log-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_log-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_system-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_system-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_thread-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_thread-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_date_time-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_date_time-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_log_setup-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_log_setup-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_filesystem-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_filesystem-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_regex-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_regex-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_chrono-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_chrono-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_atomic-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_atomic-vc140-mt-gd-1_60.lib > done checking libraries > > -- KAA WILL BE INSTALLED TO C:/Program Files (x86)/Kaa-cpp > -- Configuring done > WARNING: Target "kaacpp" requests linking to directory > "D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win". Targets may link only to > libraries. CMake is dropping the item. > -- Generating done > -- Build files have been written to: > D:/kaa/kaa-cpp-ep-sdk-aXrMkhHEE2BrPBehV_Vbxym2MfU/build > *APPENDIX 2: cmakelists.txt file* File consists of 300+ lines, so uploaded it. See upload on my google drive: https://drive.google.com/open?id=0B-1WvUfrCC3MUHR5dGZmVUdhY0U // EOF -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloydkl.tech at gmail.com Thu Mar 31 00:40:32 2016 From: lloydkl.tech at gmail.com (Lloyd) Date: Thu, 31 Mar 2016 10:10:32 +0530 Subject: [CMake] Visual C++ for Linux Message-ID: Hi, Microsoft announced Visual C++ for Linux. Would CMake support this? https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/ Thanks, Lloyd -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwan.work at gmail.com Thu Mar 31 01:53:50 2016 From: rwan.work at gmail.com (Raymond Wan) Date: Thu, 31 Mar 2016 13:53:50 +0800 Subject: [CMake] Visual C++ for Linux In-Reply-To: References: Message-ID: Hi Lloyd, On Thu, Mar 31, 2016 at 12:40 PM, Lloyd wrote: > Hi, > > Microsoft announced Visual C++ for Linux. Would CMake support this? > > https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/ > > Thanks, > Lloyd Interesting developments but looking at the blog entry (which, BTW, was posted yesterday -- you do expect other tools to respond quickly, don't you? :-) ), I don't see how CMake is related. My understanding is that Visual C++ connects to a Linux server, copies the source over, and then compiles it. That's why openssh-server, g++, etc. should be installed beforehand. If Visual C++ is "aware" that the project is managed by CMake then it could invoke CMake on the server side first, and then compile it. It makes me feel like your question should really be to Microsoft and whether they support remotely invoking CMake as opposed to asking if CMake would support Visual C++. From the perspective of CMake, it would be executed on the Linux server and would not need to be aware of Visual C++. As I'm not a CMake developer, of course, do not take my word on this since I'm not an expert. Perhaps others might have something else to add... Ray From petr.kmoch at gmail.com Thu Mar 31 03:20:32 2016 From: petr.kmoch at gmail.com (Petr Kmoch) Date: Thu, 31 Mar 2016 09:20:32 +0200 Subject: [CMake] using cmake to link header files: file could be found, is included, but build error when using nmake. In-Reply-To: References: Message-ID: 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 compiler, libraries are used by the linker. * Regarding the linking thing: AVRO_LIBRARY - The Avro C++ libraries Yet you seem to be setting this to a directory: set(AVRO_LIBRARY D:/kuleuven/thesis/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win) when you're supposed to set it to a library (.lib file). * As for the header issue, you're setting: set(AVRO_INCLUDE_DIR D:/kuleuven/thesis/kaa/kaaBuild/avro_1.8.0/lang/c++/avro) but then using: include_directories ( ${AVRO_INCLUDE_DIRS} ) Note the difference in the trailing 'S'. * Additionally, variables like AVRO_INCLUDE_DIR and AVRO_LIBRARY look like something the find package should be setting *for* you. It doesn't seem like a package shipped with CMake, so consult its docs to check you're using it as intended. Petr On Wed, Mar 30, 2016 at 5:15 PM, Karel Geiregat wrote: > Dear users at Cmake > > > It could be that I don't have understood the linking process when building > the project by cmake. The project has three dependencies: (1) Boost, (2) > (Apache) Avro and (3) Botan. > After issuing the following command to be able to use the nmake command > from Visual Studio: > > D:\...\build>cmake -G "NMake Makefiles" -DKAA_INSTALL_PATH="D:\kaa\kaaSDK" >> -DKAA_DEBUG_ENABLED=1 .. >> > > It ran without problems, except minor warnings like > > WARNING: Target "kaacpp" requests linking to directory >> "D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win". Targets may link only to >> libraries. CMake is dropping the item. >> > => note: full log is at the bottom of this mail (appendix 1). > > but when i call nmake after, it immediately throws up error: > > D:\...\build>nmake >> >> Microsoft (R) Program Maintenance Utility Version 14.00.23506.0 >> Copyright (C) Microsoft Corporation. All rights reserved. >> >> Scanning dependencies of target kaacpp_o >> [ 1%] Building CXX object >> CMakeFiles/kaacpp_o.dir/impl/event/registration/EndpointRegistrationManager.cpp.obj >> EndpointRegistrationManager.cpp >> D:\kaa\kaa-cpp-ep-sdk-aXrMkhHEE2BrPBehV_Vbxym2MfU\kaa/gen/EndpointGen.hpp(26): >> fatal error C1083: Cannot open include file: 'avro/Specific.hh': No such >> file or directory >> NMAKE : fatal error U1077: 'C:\PROGRA~2\VISUAL~1.0\VC\bin\cl.exe' : >> return code '0x2' >> Stop. >> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Visual Studio >> 14.0\VC\BIN\nmake.exe"' : return code '0x2' >> Stop. >> > > I have checked the file, and there is the following includes > > #include >> #include "boost/any.hpp" >> #include "avro/Specific.hh" <-------- error line >> #include "avro/Encoder.hh" >> #include "avro/Decoder.hh" >> > > My idea is that the linking of the avro library is not set up correctly > since the error got thrown after including a Boost file. > Here is a fragment of my cmakelists.txt file where Avro got added and how > the packages got found/added > > # AVRO_ROOT_DIR - Set this variable to the root installation >> of Avro C++ if the module has problems finding the proper installation >> path. >> # AVRO_LIBRARY - The Avro C++ libraries >> # AVRO_INCLUDE_DIR - The location of Avro C++ headers >> set(AVRO_ROOT_DIR D:/kuleuven/thesis/kaa/kaaBuild/avro_1.8.0/lang/c++) >> set(AVRO_LIBRARY >> D:/kuleuven/thesis/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win) >> set(AVRO_INCLUDE_DIR >> D:/kuleuven/thesis/kaa/kaaBuild/avro_1.8.0/lang/c++/avro) >> > >> > some contents omitte >> > >> > # >> # Find third-party dependencies >> # >> find_package (Boost 1.54 REQUIRED COMPONENTS log system thread) >> find_package (Avro REQUIRED) >> find_package (Botan REQUIRED) >> > => note: full cmakelist.txt file is added as appendix2 > > > After that, i have issued the following messaging > > message("--- AVRO: Found? " ${AVRO_FOUND}) <----- displays "--- AVRO: >> Found? TRUE" >> message(${AVRO_LIBRARIES}) <----- displays " >> D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win" > > > > So, the library can be found. However, it surprises me that the specific > file, Specific.hh could not be found while it is in the include directory, > AVRO_INCLUDE_DIR (according to the findavrocpp.cmake > > it's used for headers). > I have issued the following PowerShell command to show that the file is in > the given directory > > PS D:\kaa\kaaBuild\avro_1.8.0\lang\c++\avro> Get-childitem Specific.hh >> >> Directory: D:\kaa\kaaBuild\avro_1.8.0\lang\c++\avro >> >> Mode LastWriteTime Length Name >> ---- ------------- ------ ---- >> -a---- 2/9/2012 7:11 PM 7428 Specific.hh >> > > > So it could be that it is not linking correctly. Is the cmakelist.txt > incorrect or is cmake unable to link the right header file without throwing > an error ? > Is there a solution for this ? I don't have a clue where to find the cause > of the linking problems so i can solve it. > > If you need more information, please check the appendix 1 & 2 here below. > If these isn't sufficient enough, please inform me which information i can > provide. > > Sincerely > - kg > > > > *APPENDIX 1: output of cmake command* > > D:\kaa\kaa-cpp-ep-sdk-aXrMkhHEE2BrPBehV_Vbxym2MfU\build>cmake -G "NMake >> Makefiles" -DKAA_INSTALL_PATH="D:\kaa\kaaSDK" -DKAA_DEBUG_ENABLED=1 .. >> ================================== >> CMake Warning (dev) at CMakeLists.txt:73 (if): >> Policy CMP0054 is not set: Only interpret if() arguments as variables or >> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy >> details. Use the cmake_policy command to set the policy and suppress >> this >> warning. >> >> Quoted variables like "MSVC" will no longer be dereferenced when the >> policy >> is set to NEW. Since the policy is not set the OLD behavior will be >> used. >> This warning is for project developers. Use -Wno-dev to suppress it. >> >> ================================== >> KAA_MAX_LOG_LEVEL=6 >> EVENTS ENABLED >> NOTIFICATIONS ENABLED >> CONFIGURATION ENABLED >> LOGGING ENABLED >> OPERATION_TCP_CHANNEL ENABLED >> OPERATION_LONG_POLL_CHANNEL ENABLED >> OPERATION_HTTP_CHANNEL ENABLED >> BOOTSTRAP_HTTP_CHANNEL ENABLED >> CONNECTIVITY_CHECKER ENABLED >> KAA_THREADSAFE ENABLED >> ================================== >> -- Boost version: 1.60.0 >> -- Found the following Boost libraries: >> -- log >> -- system >> -- thread >> -- date_time >> -- log_setup >> -- filesystem >> -- regex >> -- chrono >> -- atomic >> >> Looking for Avro C++ headers and libraries >> -- Root dir: D:/kaa/kaaBuild/avro_1.8.0/lang/c++ >> -- Include directories: D:/kaa/kaaBuild/avro_1.8.0/lang/c++/avro >> -- Libraries: D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win >> -- FindBotan check >> -- BOTAN_HOME is not empty: "D:/kaa/kaaBuild/botan-1.11.29" >> -- Looking for botan in D:/kaa/kaaBuild/botan-1.11.29 >> -- Include directory: D:/kaa/kaaBuild/botan-1.11.29/build/include >> -- Library: D:/kaa/kaaBuild/botan-1.11.29/botan.lib >> >> checking libraries >> --- BOTAN: Found? YES >> D:/kaa/kaaBuild/botan-1.11.29/botan.lib >> --- AVRO: Found? TRUE >> D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win >> --- BOOST: Found? >> >> optimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_log-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_log-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_system-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_system-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_thread-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_thread-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_date_time-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_date_time-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_log_setup-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_log_setup-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_filesystem-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_filesystem-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_regex-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_regex-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_chrono-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_chrono-vc140-mt-gd-1_60.liboptimizedD:/software/boost_1_60_32/lib32-msvc-14.0/boost_atomic-vc140-mt-1_60.libdebugD:/software/boost_1_60_32/lib32-msvc-14.0/boost_atomic-vc140-mt-gd-1_60.lib >> done checking libraries >> >> -- KAA WILL BE INSTALLED TO C:/Program Files (x86)/Kaa-cpp >> -- Configuring done >> WARNING: Target "kaacpp" requests linking to directory >> "D:/kaa/kaaBuild/avro_1.8.0/lang/c++/build.win". Targets may link only to >> libraries. CMake is dropping the item. >> -- Generating done >> -- Build files have been written to: >> D:/kaa/kaa-cpp-ep-sdk-aXrMkhHEE2BrPBehV_Vbxym2MfU/build >> > > > > *APPENDIX 2: cmakelists.txt file* > > File consists of 300+ lines, so uploaded it. See upload on my google > drive: https://drive.google.com/open?id=0B-1WvUfrCC3MUHR5dGZmVUdhY0U > > > > // EOF > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at su-root.co.uk Thu Mar 31 05:50:06 2016 From: dan at su-root.co.uk (Dan Liew) Date: Thu, 31 Mar 2016 10:50:06 +0100 Subject: [CMake] add_custom_command() OUTPUT does not accept generator expressions, why? In-Reply-To: <56F93A2D.9090809@kitware.com> References: <56F93A2D.9090809@kitware.com> Message-ID: 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 refactoring since I last looked at it. > > There is some discussion here: > > https://cmake.org/Bug/view.php?id=13840 > https://cmake.org/Bug/view.php?id=12877#c28315 > >> If I can't use generator expressions with ``OUTPUT``, how am I >> supposed to output a file into the build directory of a target? > > Unfortunately it is not possible to do cleanly without fixing the > above. Approximations include: > > * Use a POST_BUILD command on the target instead. > > * Make the OUTPUT a timestamp file and generate the real output > as a side effect. > > If anyone is interested in trying to implement generator expressions > for custom command outputs, I can provide more details to get started. Thanks for the info Brad. I wish I had time to look into this but I don't so for now I'll just work around it. Dan. From yves.frederix+cmake at gmail.com Thu Mar 31 07:26:27 2016 From: yves.frederix+cmake at gmail.com (Yves Frederix) Date: Thu, 31 Mar 2016 13:26:27 +0200 Subject: [CMake] add_custom_command() OUTPUT does not accept generator expressions, why? In-Reply-To: <56F93A2D.9090809@kitware.com> References: <56F93A2D.9090809@kitware.com> Message-ID: 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 realized it was not that straightforward (not even talking about doing it 'right' here ;)). Any pointers are welcome! Regards, Yves From david.wagner at intel.com Thu Mar 31 12:17:19 2016 From: david.wagner at intel.com (Wagner, David) Date: Thu, 31 Mar 2016 18:17:19 +0200 Subject: [CMake] Issues using CPack for making a debian package In-Reply-To: References: <56F28F73.5070108@intel.com> Message-ID: <56FD4D8F.3070200@intel.com> 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 be willing to provide the patch with `-l` option for > inclusion into CPack and a minimal test CMakeLists.txt showing its > usage? It just so happens that the presence of the DEBIAN directory also fixes my use-case (withouth any RPATH): now, dpkg-shlibdeps finds my private libraries. However, I notice a strange behaviour from dpkg-shlibdeps: > $ ls > debian DEBIAN usr > $ dpkg-shlibdeps --ignore-missing-info -O ./usr/lib/libparameter.so > shlibs:Depends=libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), libxml2 (>= 2.7.4) > $ dpkg-shlibdeps --ignore-missing-info -O usr/lib/libparameter.so > dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory > dpkg-shlibdeps: warning: symbol _ZN31BackgroundRemoteProcessorServerC1EtOSt10unique_ptrI21IRemoteCommandHandlerSt14default_deleteIS1_EE used by usr/lib/libparameter.so found in none of the libraries > shlibs:Depends=libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), libxml2 (>= 2.7.4) Note how it works ok when the path to the binary starts with ./ but fails otherwise. I narrowed it down to the `relative_to_pkg_root` function in Dpkg/Path.pm but I don't understand Perl enoough to go further. Fortunately, the way CPackDeb.cmake calls dpkg-shlibdeps has these leading './'. Bottom line: it works but I don't know how robust it is. BR David -- David Wagner complex != complicated --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. From mrawd2 at gmail.com Thu Mar 31 15:38:48 2016 From: mrawd2 at gmail.com (Fedja Jeleskovic) Date: Thu, 31 Mar 2016 15:38:48 -0400 Subject: [CMake] Mixing up project language settings? Message-ID: 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 they are both defaulted anyway) where my new components are, or the top level needs to be changed as well to reflects what will be used below. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholas11braden at gmail.com Thu Mar 31 15:42:46 2016 From: nicholas11braden at gmail.com (Nicholas Braden) Date: Thu, 31 Mar 2016 14:42:46 -0500 Subject: [CMake] Mixing up project language settings? In-Reply-To: References: Message-ID: 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 or remove C, it is up to you aesthetically. On Thu, Mar 31, 2016 at 2:38 PM, Fedja Jeleskovic wrote: > 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 they are both defaulted anyway) > where my new components are, or the top level needs to be changed as well to > reflects what will be used below. > > Thanks! > > -- > > 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 From salazardetro1 at llnl.gov Thu Mar 31 18:22:09 2016 From: salazardetro1 at llnl.gov (Salazar De Troya, Miguel) Date: Thu, 31 Mar 2016 22:22:09 +0000 Subject: [CMake] Creating a list of link directories from a variable Message-ID: 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 that can extract the information and put it into a variable with the dirs or library names separated by comma, for instance: INCLUDE_DIRS = /g/g92/miguel/code/libmesh_2D/include;/usr/include/curl;/usr/include/glpk;/usr/local/tools/vtk-6.1.0/include/vtk-6.1;/g/g92/miguel/petsc-3.6.2/include;/g/g92/miguel/petsc-3.6.2/miguel-opt/include;/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/hwloc/hwloc191/hwloc/include;/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/event/libevent2021/libevent;/usr/local/tools/openmpi-intel-1.8.4/include/openmpi/opal/mca/event/libevent2021/libevent/include;/usr/local/tools/openmpi-intel-1.8.4/include;/usr/local/tools/openmpi-intel-1.8.4/include/openmpi;/usr/local/tools/boost-mpi-1.55.0//include LIBS = -lcurl;-lhdf5;-lglpk;-lvtkIOCore-6.1;-lvtkCommonCore-6.1;-lvtkCommonDataModel-6.1;-lvtkFiltersCore-6.1;-lvtkIOXML-6.1;-lvtkImagingCore-6.1;-lvtkIOImage-6.1;-lvtkImagingMath-6.1;-lz;-lpetsc;-lcmumps;-ldmumps;-lsmumps;-lzmumps;-lmumps_common;-lpord;-lscalapack;-lHYPRE;-lml;-llapack;-lblas;-lparmetis;-lmetis;-lX11;-lhwloc;-lssl;-lcrypto;-lmpi_usempif08;-lmpi_usempi_ignore_tkr;-lmpi_mpifh;-lifport;-lifcore;-lm;-lmpi;-limf;-lsvml;-lirng;-lipgo;-ldecimal;-lcilkrts;-lstdc++;-lgcc_s;-lirc;-lpthread;-lirc_s;-ldl;-lmesh_opt LIB_DIRS = /usr/lib;/lib;/usr/lib64;/usr/local/tools/vtk-6.1.0/lib;/g/g92/miguel/petsc-3.6.2/miguel-opt/lib;/usr/local/tools/openmpi-intel-1.8.4/lib;/usr/local/tools/ic-14.0.174/composer_xe_2013_sp1.3.174/compiler/lib/intel64;/usr/lib/gcc/x86_64-redhat-linux/4.4.7;/g/g92/miguel/code/libmesh_2D/lib These are variables in my environment that I use in CMake with $ENV{VAR}. How can I use this information for the commands: include_directories($ENV{INCLUDE_DIRS}) link_directories($ENV{LIB_DIRS}) target_link_libraries($ENV{LIBS}) ? It seems that cmake can digest the include directories and the target_link_libraries (because they appear correctly in the compilation), but not the link_directories. Why? Also, I?ve read that it is more correct to use find_library() instead. How would I iterate over the LIBS? Can I use a single LIB_DIRS (with all the information above) in the PATHS argument of find_library() Thanks Miguel -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.scott at crascit.com Thu Mar 31 19:53:07 2016 From: craig.scott at crascit.com (Craig Scott) Date: Fri, 1 Apr 2016 10:53:07 +1100 Subject: [CMake] Building a tool immediately so it can be used later in same CMake run Message-ID: 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/36084785/1938798 *Short version*: invoke a nested cmake-and-build immediately within the main CMake run to build a specific target via execute_process(). This makes that tool available for use still within the same (main) CMake run. An ExternalProject-based technique would normally be a better solution, but in this particular case, that wasn't possible. I'd be interested if anyone can confirm whether the suggested approach is guaranteed to be safe for all generators and platforms, or whether there are other factors I have not considered in the proposed technique. Cheers -- Craig Scott Melbourne, Australia http://crascit.com -------------- next part -------------- An HTML attachment was scrubbed... URL: