[CMake] Last minute build-date file.
On Fri, 15 Oct 2010 12:00:02 -0400 cmake-requ...@cmake.org wrote: Hello: If my app requires relinking, then at link time I would like to capture the current date and time and place it in a last-minute source file which is linked with the application. Following is my attempt at this with CMake. The problems I can see are: 1 - It is not portable as it uses the OS date command. 2 - It is not portable as it calls gcc directly. 3 - It will not work with Debug or Release builds unless I set additional target LINK_FLAGS_type properties. 4 - I wish the creation of the link_date.cc file could be done inline of the add_custom_command instead of requiring a separate file. (I got into quoting hell.) 5 - Sneaking link_date.o onto the link line with the LINK_FLAGS property is kind of a hack. Suggestions please. Thanks in advance. Bill This is just OTTOMH, but could you have something like this: #include string const std::string link_date( __DATE__ ); const std::string link_time( __TIME__ ); in a separate blah.cc file? Then set the blah target to one of the PHONYs in the Makefile (those are the ones that always recompile regardless, right?), and make sure it's a requirement for every link. Not sure how else you could accomplish this. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How would I use parallel make on ExternalProjects?
There is one problem with that, which is what I'm trying to address: load balancing. If your project builds ITK, VTK, and sundry other prerequisite libraries, it will spawn 4 sequential builds. In practice this means everything except ITK (which we build with wrapping on) finishes, and then ITK chugs along doing its sequential build. If I do what I'm talking about, I'd sequentially conduct parallel builds of ITK VTK etc. In which case the big hairy libraries, like ITK with wrapping, get built in parallel. Have you considered distcc? It's essentially a compiler load balancer and fairly mature by now. I don't think it works on Windows though, so if you need that it might not be what you want. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Disallowing in-source builds
is there an easy way to clean out a source tree if an in-source build was accidentally kicked off? (short of dividing the files by their timestamp and removing the newer ones, etc..) My immediate thought was, does make clean not work for you? But I guess you're talking about CMake debris rather than make debris. Ideally, I?d like to prevent it before any cruft is written into the source tree. I suggest an alternative. I think I read about it on this list but I'm not sure. What I do is provide an empty cmake folder in my source tree root, and run all CMake commands in it. This ensures all the CMake cruft is contained in one in-source folder. (I guess you could modify this so it's out-source.) To re-run the rootwards-most CMakeLists.txt file: cd projectx/cmake cmake .. Then, to clear all CMake debris: rm -r projectx/cmake/* (insert usual disclaimer on rm usage) This doesn't prevent anything, but it does at least make it easy to build in-source without cluttering the source tree. Is there a good way to disallow in-source builds? Probably the best way is to circulate an email stating the lead developer has threatened to eat^H^H^H^H fire anyone who builds in-source. You could maybe do something with user permissions and build scripts. Make sure the build scripts only work in one place. Regards, Adam J Richardson ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake/MinGW/Windows XP 32-bit: command line arguments delimited by semicolon?
Hi list, Found some odd behaviour while setting up CMake on Windows XP. I've tried to correct the word-wrapping cmd.exe does, not always successfully; I hope you can read this: C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmakerm -r * C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmakecmake .. -DCMAKE_BUILD_TYPE=Debug -G MinGW Makefiles -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: C:/Programs/MinGW/bin/gcc.exe -- Check for working C compiler: C:/Programs/MinGW/bin/gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Programs/MinGW/bin/g++.exe -- Check for working CXX compiler: C:/Programs/MinGW/bin/g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Boost version: 1.40.0 -- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig -- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig -- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig -- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig -- Configuring done -- Generating done -- Build files have been written to: C:/Users/buildbot/Reu2/bin/bga120/build/Reu2/cmake C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmakemake Scanning dependencies of target SmallTestLib [ 2%] Building CXX object SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.obj cc1plus.exe: error: unrecognized command line option -Wwrite-strings;-std=c++0x;-pedantic-errors;-pedantic;-Wall;-W;-Weffc++;-Wmain;-Wextra;-DBUILD_DLL cc1plus.exe: warning: unrecognized command line option -Wno-long-long;-Wno-comment;-g;-gdwarf-2 make[2]: *** [SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.obj] Error 1 make[1]: *** [SmallTestLib/CMakeFiles/SmallTestLib.dir/all] Error 2 make: *** [all] Error 2 C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake It's the line beginning cc1plus.exe that confuses me. Why are the command line arguments separated by semicolons? It should be spaces. I've looked in the generated Makefile and CMakeCache.txt but I can't figure it out. This MinGW installation has been installed and working for a little while now, so I don't think it's a MinGW problem. Regards, Adam J Richardson ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake/MinGW/Windows XP 32-bit: command line arguments delimited by semicolon?
On Wed, 6 Oct 2010 11:09:36 -0400 David Cole david.c...@kitware.com wrote: Looks to me like somebody quoted a ${CMAKE_CXX_FLAGS} reference where they should not have quoted it... I can believe it, sounds like my work. ;) What does the CMakeLists.txt file look like? Hmm. I'll link you directly to the files in my Fossil repository. The rootwards-most CMakeLists.txt is first. http://dreamtrack.dnsalias.com/fossils/reu2.cgi/artifact?name=12d75197da80395cd817b742349d2a30c547e23f http://dreamtrack.dnsalias.com/fossils/reu2.cgi/artifact?name=3801770b640cdf3ee866db319057b0b8ade29cf6 http://dreamtrack.dnsalias.com/fossils/reu2.cgi/artifact?name=6d89f405894e285e3f71790cf970901e877cf7fa http://dreamtrack.dnsalias.com/fossils/reu2.cgi/artifact?name=8ed752e51909af87cbec4294af3f458391a7be8d ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake/MinGW/Windows XP 32-bit: command line arguments delimited by semicolon?
On Wed, 6 Oct 2010 11:58:05 -0400 David Cole david.c...@kitware.com wrote: Put double quotes on these lines (and lines like them) so that CMAKE_CXX_FLAGS is a single space separated string. Ahhh, I see. That solves it. Thanks. Looks like I need to do lots of work on the CMakeLists.txt files to get them to work on Windows. Strange how the Linux builds had no problems with those files. I assume Linux CMake will tolerate the double quotes, I'd hate to have more than one set of CMakeLists.txt files. I guess a good rule of thumb would be to write CMakeLists.txt files on Windows first. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] rpmbuild breaks if HOME is wrong
On Mon, 4 Oct 2010 20:45:21 +0200 Eric Noulard eric.noul...@gmail.com wrote: May be you can check in the generated spec file whether if this field has an appropriate value. Apologies/length. build...@nikko:/var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake$ grep -iFlr BUILDROOT . ./_CPack_Packages/Linux/RPM/SPECS/reu2.spec.in ./_CPack_Packages/Linux/RPM/SPECS/reu2.spec build...@nikko:/var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake$ Field is present in two files. I'm guessing the .in file is the more interesting of the two so I'll check that first. build...@nikko:/var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake$ head -n 5 ./_CPack_Packages/Linux/RPM/SPECS/reu2.spec.in # -*- rpm-spec -*- Buildroot: @CPACK_RPM_DIRECTORY@/@CPACK_PACKAGE_FILE_NAME@ Summary:@CPACK_RPM_PACKAGE_SUMMARY@ Name: @CPACK_RPM_PACKAGE_NAME@ Version:@CPACK_RPM_PACKAGE_VERSION@ build...@nikko:/var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake$ head -n 5 ./_CPack_Packages/Linux/RPM/SPECS/reu2.spec # -*- rpm-spec -*- Buildroot: /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM/Reu2-0.1.1-Linux Summary:Reu2 - a reusable C++ modules library based on Boost Name: reu2 Version:0.1.1 build...@nikko:/var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake$ Seems one is an expanded version of the other. The value does seem to be correct. Could you explain me why the buildbot would have an invalid HOME Heh. This takes some explaining. Here goes. HOME is actually defined correctly in /etc/passwd as /var/lib/buildbot. (Why buildbot chose *that* as opposed to /home/buildbot I don't know.) The buildbot script is in two parts, buildmaster and buildslave. The buildslave(s) run a series of build steps (darcs pull, make all, etc) whenever they're told to. The buildmaster coordinates the actions of the buildslaves and contains the build steps. Let's assume the buildmaster is up and running already, and the buildslave is already configured. Here's how I start the buildslave. 1. Log into the buildslave over SSH using my normal user account, fatman. The SSH daemon is set for public-key authentication only, so fatman is the only account I can use. 2. Switch to a bash shell controlled by my non-login-enabled account, buildbot, using the command sudo -u buildbot bash. Note, HOME still points to /home/fatman because sudo doesn't change user context. 3. Start the buildslave. It detaches itself from the console. 4. Exit from the buildbot shell and log out, leaving the buildslave running in daemon mode. Now, note that the buildslave environment is running with user buildbot, but has the HOME of user fatman. When the buildmaster instructs it to start a build and it gets around to running CPackRPM, it still has the wrong HOME. If yes from which user to su from using which method (a,b,c,d,e)? c) sudo from your point of view should I see the problem or do you have some other steps I miss ? No, that is essentially what I do. You will see the problem. error: failed to create directory %{_topdir}: /home/fatman/rpmbuild: Permission denied May be you can send me the whole rpmbuild.err and rpmbuild.out files? The .out file is empty, and the .err file contains only that single line. build...@nikko:/var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake$ cat _CPack_Packages/Linux/RPM/rpmbuild.err error: failed to create directory %{_topdir}: /home/fatman/rpmbuild: Permission denied build...@nikko:/var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake$ My interpretation: rpmbuild is trying to make a temporary folder in HOME and build the RPM package in it. HOME is wrong, so the permissions for HOME are inappropriate, and we get permission denied. Does that sound plausible? Note the different user. This is why the HOME variable is wrong. Why would it be wrong? I believe you are correct about su, but I'm using sudo, which for reasons I forget doesn't switch user context (in Ubuntu at least). /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM is the previous directory belonging to user buildbot ? User buildbot owns /var/lib/buildbot and all subdirectories and files. By the way, I am also building a DEB and TGZ package. They both complete successfully. Yes but even if rpm building is enabled on Debian based host it's possible that rpmbuild is not working as expected on such host. Quite so. I meant that the aberrant behaviour seems to occur in the part of the system governed by CPackRPM, rather than CMake, CPack, CPackDEB or CPackTGZ (if those are the names). By any chance do you have any other buildbot machine which would be RPM based which exhibits the same trouble? No. I do have a temporary buildslave, Vostro, running Ubuntu 32-bit. The entire build succeeds and I get a pretty green column in my buildmaster's waterfall webpage :D We don't see the same error because I'm using my main user to start the buildslave. So
Re: [CMake] rpmbuild breaks if HOME is wrong
On 5/10/2010, Eric Noulard eric.noul...@gmail.com wrote: Ok now I see the precise scheme. I'll try to reproduce that. Unfortunately I will be off network for a while so could you be kind enough to open a bug tracker entry http://public.kitware.com/Bug/my_view_page.php and add a reference to this thread of discussion http://www.cmake.org/pipermail/cmake/2010-October/040011.html Done. Regards, Adam J Richardson ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake/Buildbot xplat upload?
CMake is integrating well with Buildbot to make a sort of poor-man's build farm. The one thing I can't seem to work out is a crossplatform way to upload CPack-built packages (Windows and Linux) to a web server (Ubuntu). that's true you have file(DOWNLOAD ...) (which internally uses libcurl) so it should be fairly easy to add file(UPLOAD ...) but currently AFAIK this does not exists... may be worth a feature request. I'll do that. It would certainly save me some scripting headaches. The target web server supports SSH, SCP, DAV and possibly NFS. Any ideas? Or should I be asking Buildbot's mailing list? I don't know or use buildbot but it appears to be written in python so may I guess python may be required when using build bot. May be using some 100% python SSH lib (in order to be cross platform) like paramiko (http://www.lag.net/paramiko/) is doable in order to transfer your files using scp. You may call your python scp script from CMake using execute_process after a find_package(PythonInterp). Correct, Buildbot is a Python script. I only brought Buildbot up because (it seems to me) uploading is one of those edge use cases, where it could fall into the purview of either system, and I wasn't sure if this was more a Buildbot feature or not. (It's a barrel of fun getting Buildbot to run at all on a Windows machine, never mind as a service, and never mind as a Windows 7 service, but I did it anyway. Go me!) ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] rpmbuild breaks if HOME is wrong
Hi list, I notice rpmbuild tries to use the HOME directory as a base for its files. This won't work if HOME is set wrongly (eg. by sudo -u other bash), as in my case. Is it possible to stop it doing this and make it use the CPack build hierarchy? Thanks, Adam J Richardson ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake/Buildbot xplat upload?
On 1/10/2010, Eric Noulard eric.noul...@gmail.com wrote: may be worth a feature request. Feature request added. Please see http://www.cmake.org/Bug/view.php?id=11286 . ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] rpmbuild breaks if HOME is wrong
On Mon, 4 Oct 2010 18:19:20 +0200 Eric Noulard eric.noul...@gmail.com wrote: If you are speaking about CPackRPM generator then NO it shouldn't use HOME dir. If it is the case then may be you have a some custom .rpmrc somewhere? Oh. I guessed it was the rpmbuild default. Maybe I do have a .rpmrc somewhere. (Can't think why I would but I'll check anyway.) fat...@nikko:/var/lib/buildbot$ sudo find / | grep .rpmrc$ [sudo] password for fatman: /usr/lib/rpm/rpmrc fat...@nikko:/var/lib/buildbot$ No .rpmrc, but there is some sort of defaults file. I searched this file for the strings ~, home or fatman, but didn't find them. If not could you gives us more informations: - Which version of CMake - Which Linux system (Mandriva, RedHat, OpenSuSE, Fedora...) with version fat...@nikko:/var/lib/buildbot$ cmake --version cmake version 2.8.1 fat...@nikko:/var/lib/buildbot$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 10.04.1 LTS Release:10.04 Codename: lucid fat...@nikko:/var/lib/buildbot$ uname -a Linux nikko 2.6.32-24-generic-pae #43-Ubuntu SMP Thu Sep 16 15:30:27 UTC 2010 i686 GNU/Linux fat...@nikko:/var/lib/buildbot$ I discovered the wrong HOME problem in rpmbuild.err and tested with a corrected HOME variable. It worked, so the problem at least involves the HOME variable, somehow. error: failed to create directory %{_topdir}: /home/fatman/rpmbuild: Permission denied Could you try to run the following command in your build directory: cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM and send me the output. Note the different user. This is why the HOME variable is wrong. build...@nikko:/var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake$ cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM CPack: Create package using RPM CPack: Install projects CPack: - Run preinstall target for: Reu2 CPack: - Install project: Reu2 CPack: Compress package CPackRPM:Debug: rpmbuild version is 4.7.2 CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM CPackRPM:Debug: CPACK_TOPLEVEL_TAG= Linux CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM/Reu2-0.1.1-Linux CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME= Reu2-0.1.1-Linux.rpm CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/Reu2-0.1.1-Linux.rpm CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = Reu2-0.1.1-Linux CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM/SPECS/reu2.spec CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = Reu2 CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM/Reu2-0.1.1-Linux.rpm CPackRPM: Will use GENERATED spec file: /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM/SPECS/reu2.spec CPackRPM:Debug: You may consult rpmbuild logs in: CPackRPM:Debug: - /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM/rpmbuild.err CPackRPM:Debug: - /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM/rpmbuild.out CPack: Finalize package CPack Error: Problem copying the package: /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/_CPack_Packages/Linux/RPM/Reu2-0.1.1-Linux.rpm to /var/lib/buildbot/Reu2/slave/bin/nikko/build/cmake/Reu2-0.1.1-Linux.rpm CPack Error: Error when generating package: Reu2 build...@nikko:/var/lib/buildbot$ By the way, I am also building a DEB and TGZ package. They both complete successfully. Thanks. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake Digest, Vol 77, Issue 104
Date: Wed, 29 Sep 2010 03:14:57 +0200 From: Michael Hertling mhertl...@online.de Subject: Re: [CMake] How to set compiler flags? To: cmake@cmake.org Message-ID: 4ca29311.1050...@online.de Content-Type: text/plain; charset=ISO-8859-1 [...] So I now use add_definitions instead: add_definitions( -Wall -m64 -O3 ) Is there a better way of doing this? Don't do this at all, and adhere to the flags. Interesting - I've been doing this: if(CMAKE_BUILD_TYPE EQUAL Debug) set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++ -Wmain -Wextra) else(CMAKE_BUILD_TYPE EQUAL Debug) set(CMAKE_CXX_FLAGS -s etc) endif(CMAKE_BUILD_TYPE EQUAL Debug) because it never occurred to me to do it another way. Is this wrong too? Regards, Adam J Richardson ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake/Buildbot xplat upload?
Hi list, I Googled for this but didn't find anything. CMake is integrating well with Buildbot to make a sort of poor-man's build farm. The one thing I can't seem to work out is a crossplatform way to upload CPack-built packages (Windows and Linux) to a web server (Ubuntu). The target web server supports SSH, SCP, DAV and possibly NFS. Any ideas? Or should I be asking Buildbot's mailing list? Thanks all, Adam J Richardson ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]
On Fri, 1 Oct 2010 10:23:30 +0100 David Aldrich david.aldr...@eu.nec.com wrote: if(CMAKE_BUILD_TYPE EQUAL Debug) set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++ -Wmain -Wextra) else(CMAKE_BUILD_TYPE EQUAL Debug) set(CMAKE_CXX_FLAGS -s etc) endif(CMAKE_BUILD_TYPE EQUAL Debug) As a total non-expert I don't see how this will work because if build type is Debug then CMake will use CMAKE_CXX_FLAGS_DEBUG not CMAKE_CXX_FLAGS. Am I right? Could be. I too am a non-expert. CMake doesn't seem to output the command lines it executes, or if it does then Buildbot ignores it. This is the view from Buildbot's IO log: cd cmake make all cd .. in dir /home/arichardson/buildbot/Reu2/bin/vostro/build (timeout 1200 secs) watching logfiles {} argv: cd cmake make all cd .. environment: snip lots of wrappily long env vars closing stdin using PTY: False [ 2%] Building CXX object SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o Linking CXX shared library ../../bin/libSmallTestLib-d.so [ 2%] Built target SmallTestLib [ 5%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/TrayIcon.cc.o [ 8%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/Transformer.cc.o snip lots of very similar lines, you get the idea I think [ 47%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/CommonFunctions.cc.o [ 50%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/Buffer.cc.o Linking CXX static library ../../bin/libReu2-d.a [ 50%] Built target Reu2 [ 52%] Building CXX object Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-TrayIcon.cc.o [ 55%] Building CXX object Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Transformer.cc.o snip [ 94%] Building CXX object Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Database.cc.o [ 97%] Building CXX object Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Converter.cc.o [100%] Building CXX object Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Buffer.cc.o Linking CXX executable ../../bin/Test-Reu2 [100%] Built target Test-Reu2 program finished with exit code 0 elapsedTime=15.055892 Can I make CMake more verbose? The IO log above contains the command line executed by Buildbot (cd cmake make all cd ..). ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Error finding boost libraries
From: David Aldrich david.aldr...@eu.nec.com Subject: To: cmake@cmake.org cmake@cmake.org The following command is not working for me: find_package( Boost 1.40.0 COMPONENTS python REQUIRED ) I get error: CMake Error at CMakeLists.txt:36 (find_package): Could not find module FindBoostLibs.cmake or a configuration file for package BoostLibs. I am running CMake 2.8.2, which contains 'FindBoost.cmake' (NOT FindBoostLibs.cmake). Is this a known problem? I notice you specify Boost.Python. This is possibly a non-sequitur, but I've had problems with Boost.Python in the past, in particular when I tried to compose a pkg-config file (.pc) for it. The rest of Boost works just fine with pkg-config, as it turns out. It's just Boost.Python I had to give up on. IMO, the Boost.Python binary is inherently warped. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]
Could be. I too am a non-expert. CMake doesn't seem to output the command lines it executes, or if it does then Buildbot ignores it. This is the view from Buildbot's IO log: snip blah Can I make CMake more verbose? The IO log above contains the command line executed by Buildbot (cd cmake make all cd ..). You can run cmake and then: make VERBOSE=1 to see the flags. Thanks! I'll insert that into the builder configuration, sighup the buildmaster and force a build. Then we'll smell what CMake is cookin'. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_CXX_FLAGS
I'll insert that into the builder configuration, sighup the buildmaster and force a build. Or at least I will when the server lets me in. It's started doing this odd thing every day where it works until I try and SSH into it, then it goes offline for an hour and when it comes back I can SSH into it fine. Something else to fix. I hate computers. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_CXX_FLAGS
It let me in more quickly than usual today. Let's look at the IO log. cd cmake make VERBOSE=1 all cd .. in dir /home/arichardson/buildbot/Reu2/bin/vostro/build (timeout 1200 secs) watching logfiles {} argv: cd cmake make VERBOSE=1 all cd .. snip boring bits [ 2%] Building CXX object SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o cd /home/arichardson/buildbot/Reu2/bin/vostro/build/cmake/SmallTestLib /usr/lib/ccache/c++ -DSmallTestLib_EXPORTS -s -g -fPIC -o CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o -c /home/arichardson/buildbot/Reu2/bin/vostro/build/SmallTestLib/src/SmallTestLib.cc Linking CXX shared library ../../bin/libSmallTestLib-d.so cd /home/arichardson/buildbot/Reu2/bin/vostro/build/cmake/SmallTestLib /usr/bin/cmake -E cmake_link_script CMakeFiles/SmallTestLib.dir/link.txt --verbose=1 /usr/lib/ccache/c++ -fPIC -s -g -shared -Wl,-soname,libSmallTestLib-d.so -o ../../bin/libSmallTestLib-d.so CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o snip more boring bits [ 5%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/TrayIcon.cc.o cd /home/arichardson/buildbot/Reu2/bin/vostro/build/cmake/Reu2 /usr/lib/ccache/c++-s -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include -I/usr/include -g -o CMakeFiles/Reu2.dir/src/TrayIcon.cc.o -c /home/arichardson/buildbot/Reu2/bin/vostro/build/Reu2/src/TrayIcon.cc /usr/bin/cmake -E cmake_progress_report /home/arichardson/buildbot/Reu2/bin/vostro/build/cmake/CMakeFiles 2 snip most of the rest of the file elapsedTime=8.055578 I think I'll leave VERBOSE on, I like detailed logfiles. Looks like you're right. This is my debug build, and I don't see any of my flags in there (--pedantic, --std=c++0x, --gdwarf-2, etc). I'll alter my CMakeLists.txt and see if your suggested edits make a difference. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake