[CMake] Diff output from CMake?
I am trying to compare two large lists of file paths (about 14,000 lines each) to identify which entries in each list are missing from the other, and while I can get CMake to do it I must be doing it the wrong way because the results are hideously slow. I currently generate two files with the paths and then read them in as lists, using LIST() commands to peform STREQUAL tests. I was hoping to just run a cmake -E command to get a diff output and parse my results in from that, but as far as I can tell CMake's compare_files command doesn't provide diff style output? I can just call diff on platforms that have it, but that's not reliable on Windows. Does CMake have any ability to rapidly provide the results of a diff between two text files or large lists of strings? Cheers, and thanks. CY ___ 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] Running unit test as part of the build
On Mon, Sep 12, 2011 at 20:30, Michael Wild wrote: > How about using a custom command that runs the unit test using a > wrapper script that upon successful completion creates a stamp-file and > depends upon the unit-test executable target itself? This seems to work: add_executable(unittest ${test_SRCS}) set(unittest_stamp "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/unittest.stamp") add_custom_command(OUTPUT "${unittest_stamp}" COMMAND ${CMAKE_CTEST_COMMAND} $(ARGS) COMMAND ${CMAKE_COMMAND} -E touch "${unittest_stamp}" COMMENT "Running unit test" DEPENDS unittest) add_custom_target(unittest_run ALL DEPENDS "${unittest_stamp}") // Erik -- Erik Johansson Home Page: http://ejohansson.se/ PGP Key: http://ejohansson.se/erik.asc ___ 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] Running unit test as part of the build
On Mon 12 Sep 2011 05:47:18 PM CEST, Ben Medina wrote: > On Sat, Sep 10, 2011 at 9:10 AM, Erik Johansson wrote: > >> How does one get cmake to run the unit test as part of the build so that: >> - If the unit test fails, the build fails. >> - If the unit test has failed, and make is run again, the unit test >> will run again. >> - If the unit test has succeeded, and make is run again, the unit test >> will not run again. >> >> I know how to get two out of three, but not all three at once. > > Good question! We currently do the first and third items in your list. > How are you going about the second? How about using a custom command that runs the unit test using a wrapper script that upon successful completion creates a stamp-file and depends upon the unit-test executable target itself? Michael ___ 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] [SunOS] ccmake: fatal: relocation error: file ccmake: symbol _register_forkhandler: referenced symbol not found
On 9/12/2011 12:56 PM, Alec Taylor wrote: Good morning, Unfortunately CMake is failing for me. uname -a SunOS 5.10 Generic_144500-19 sun4u sparc SUNW,Sun-Fire-V490 /usr/sfw/bin/wget http://www.cmake.org/files/v2.8/cmake-2.8.5-SunOS-sparc.sh chmod +x ./cmake-2.8.5-SunOS-sparc.sh ./cmake-2.8.5-SunOS-sparc.sh [Agree] n (install to current directory) chmod +x /bin/cc* /bin/ccmake ld.so.1: ccmake: fatal: relocation error: file ccmake: symbol _register_forkhandler: referenced symbol not found Killed What can I do in order to get CMake working? You should be able to build it from source. -Bill ___ 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] [SunOS] ccmake: fatal: relocation error: file ccmake: symbol _register_forkhandler: referenced symbol not found
Good morning, Unfortunately CMake is failing for me. > uname -a SunOS 5.10 Generic_144500-19 sun4u sparc SUNW,Sun-Fire-V490 > /usr/sfw/bin/wget http://www.cmake.org/files/v2.8/cmake-2.8.5-SunOS-sparc.sh > chmod +x ./cmake-2.8.5-SunOS-sparc.sh > ./cmake-2.8.5-SunOS-sparc.sh > [Agree] > n (install to current directory) > chmod +x /bin/cc* > /bin/ccmake ld.so.1: ccmake: fatal: relocation error: file ccmake: symbol _register_forkhandler: referenced symbol not found Killed What can I do in order to get CMake working? Thanks for all suggestions, Alec Taylor ___ 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] CPack question.
Thanks Eric. Everything working now. I was using absolute paths in INSTALL commands. Akshay On Mon, Sep 12, 2011 at 12:36 PM, Akshay wrote: > I'll try and get back. Thanks very much for the help. > > Akshay > > > > On Mon, Sep 12, 2011 at 12:34 PM, Eric Noulard wrote: > >> 2011/9/12 Akshay : >> > Hi Eric, >> > >> > Just to clarify, INSTALL command are present in the sibling source >> > directories' CMakeLists.txt and not in the main CMakeLists.txt. Would >> this >> > change the behavior of CPack (which is present only in the main >> > CMakeLists.txt) ? >> >> No it shouldn't. >> Provided that: >> >> add_subdirectory comes before include(CPack) in the main CMakeLists.txt >> and >> install command do not use absolute install path. >> >> -- >> Erk >> Membre de l'April - « promouvoir et défendre le logiciel libre » - >> http://www.april.org >> > > ___ 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] Running unit test as part of the build
On Sat, Sep 10, 2011 at 9:10 AM, Erik Johansson wrote: > How does one get cmake to run the unit test as part of the build so that: > - If the unit test fails, the build fails. > - If the unit test has failed, and make is run again, the unit test > will run again. > - If the unit test has succeeded, and make is run again, the unit test > will not run again. > > I know how to get two out of three, but not all three at once. Good question! We currently do the first and third items in your list. How are you going about the second? ___ 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] Xcode IDE hierarchy view on CMake projects
Hi, I've managed to get working multi-platform/-architecture meta-builds for Windows, Mac OS X and iOS via CMake. I get the following hierarchy shown in the XCode (4.0.2) IDE: 'MetaName' + Sources + ALL_BUILD + 'ProjectName_1' + Source Files + Resources + 'ProjectName_2' + Source Files + Resources ... + 'ProjectName_n' + Source Files + Resources + Resources + Products I don't understand why the top level 'Sources' directory exists. A bit annoying, because it contains other data, like resources and CMake data files. Furthermore, what is the role of 'Resources' on that same level, project independent resources? In Visual Studio (2008) the hierarchy looks more logical: Solution 'MetaName' + ALL_BUILD + 'ProjectName_1' + 'ProjectName_2' ... + 'ProjectName_n' Is this common Xcode/CMake behavior or am I doing something wrong? Kind Regards, Daniel Dekkers ___ 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 example for Qt console application (without GUI)
On Monday 12 September 2011 10:26:44 Alan W. Irwin wrote: > On 2011-09-12 09:04+0200 Reinhard Thies wrote: > > Hello, > > > > I am looking for a cmake example for a Qt console application. > > Are there any ? > > Sure. PLplot has a CMake-based build system which we use (among many > other things) to configure one of the PLplot device drivers called qt. > That device driver implements 11 different plot devices. One of those > is an interactive GUI, but a lot of them can be run directly from the > command line (if that is what you mean by a Qt console application). > For example, our pngqt device driver creates a PNG plot file from the > command-line by combining the capabilities of the PLplot principal > library with Qt4 capabilities, and similarly for our epsqt, pdfqt, > svgqt, etc., drivers. > > I suspect others can come up with much simpler examples, but if not > contact me off list if you have further questions about the PLplot > build-system, and how it configure linking with Qt4 for both > interactive GUI and noninteractive file device drivers. > > 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 > __ Thanks, I'll have a look on it -- Reinhard ___ 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 example for Qt console application (without GUI)
On 2011-09-12 09:04+0200 Reinhard Thies wrote: Hello, I am looking for a cmake example for a Qt console application. Are there any ? Sure. PLplot has a CMake-based build system which we use (among many other things) to configure one of the PLplot device drivers called qt. That device driver implements 11 different plot devices. One of those is an interactive GUI, but a lot of them can be run directly from the command line (if that is what you mean by a Qt console application). For example, our pngqt device driver creates a PNG plot file from the command-line by combining the capabilities of the PLplot principal library with Qt4 capabilities, and similarly for our epsqt, pdfqt, svgqt, etc., drivers. I suspect others can come up with much simpler examples, but if not contact me off list if you have further questions about the PLplot build-system, and how it configure linking with Qt4 for both interactive GUI and noninteractive file device drivers. 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 __ ___ 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 example for Qt console application (without GUI)
Hello, I am looking for a cmake example for a Qt console application. Are there any ? Thanks. Reinhard ___ 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] CPack question.
I'll try and get back. Thanks very much for the help. Akshay On Mon, Sep 12, 2011 at 12:34 PM, Eric Noulard wrote: > 2011/9/12 Akshay : > > Hi Eric, > > > > Just to clarify, INSTALL command are present in the sibling source > > directories' CMakeLists.txt and not in the main CMakeLists.txt. Would > this > > change the behavior of CPack (which is present only in the main > > CMakeLists.txt) ? > > No it shouldn't. > Provided that: > > add_subdirectory comes before include(CPack) in the main CMakeLists.txt > and > install command do not use absolute install path. > > -- > Erk > Membre de l'April - « promouvoir et défendre le logiciel libre » - > http://www.april.org > ___ 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] CPack question.
2011/9/12 Akshay : > Hi Eric, > > Just to clarify, INSTALL command are present in the sibling source > directories' CMakeLists.txt and not in the main CMakeLists.txt. Would this > change the behavior of CPack (which is present only in the main > CMakeLists.txt) ? No it shouldn't. Provided that: add_subdirectory comes before include(CPack) in the main CMakeLists.txt and install command do not use absolute install path. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ 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] CPack question.
Hi Eric, Just to clarify, INSTALL command are present in the sibling source directories' CMakeLists.txt and not in the main CMakeLists.txt. Would this change the behavior of CPack (which is present only in the main CMakeLists.txt) ? Akshay On Mon, Sep 12, 2011 at 12:18 PM, Eric Noulard wrote: > 2011/9/12 Akshay : > > Hi Eric, > > Hi, > > Please do not drop the ML address. > > > 'make install' puts the targets in the directories that I have set in the > > main CMakeLists.txt. > >I am using CMake 2.8.0 on Ubuntu x64 (Linux valhala > > 2.6.38-10-generic #46~lucid1-Ubuntu SMP Wed Jul 6 18:41:04 UTC 2011 > x86_64 > > GNU/Linux). > > If "make install" is working the way you want there is no reason CPack > wouldn't > unless you use absolute install path in your INSTALL command. > > > Yes, main CMakeLists.txt is in a sibling directory. Yes, I goto > > the directory of main CMakeLists.txt and do 'cmake CMakeLists.txt' > followed > > by 'make'. I have trying all options with the actual source tree. > > What do you mean by "all options"? > > > However > > before starting, I used a single level dummy project where things worked > > fine. I have used INCLUDE_SUBDIRECTORY() for all the source directories > with > > relative paths. > > INCLUDE_SUBDIRECTORY is not a CMake command you must be using > ADD_SUBDIRECTORY. > > Could you send us your main CMakeLists.txt and an example of CMakeLists.txt > you use in one subdir. > > Or better build self-contained dummy project which exhibit the issue. > > -- > Erk > Membre de l'April - « promouvoir et défendre le logiciel libre » - > http://www.april.org > ___ 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