Re: [CMake] Patch: Add NO_CACHE option to find_xxx commands
On Monday 07 July 2008 22:04:53 Enrico Scholz wrote: Miguel A. Figueroa-Villanueva [EMAIL PROTECTED] writes: I would like to propose the addition of a NO_CACHE keyword to the find_xxx commands that would treat VAR as a non-cached variable. Better wolution would be the equivalent of autoconf's './config.status --recheck', e.g. reinvoking cmake with empty cache but with original configuration options. This is not what we want. We want to keep the cache variables since the user might have changed it in the gui. No; it is exactly what you want. Just store the original configuration (e.g. 'cmake' commandline or items entered into the GUI by user) somewhere and rerun 'cmake' on it with an empty cache. This is possible by using initial configuration. For example, maintainer can prepare text file with options and paths, which should be known before configure steps. User after checkout (copies and) modifies it and passes to CMake via -C parameter. Enrico ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to find wxWidgets with cmake under Windows?
Hi Miguel, Well, Bob is setting wxWidgets_LIB_DIR in the GUI and this should then work for him (it's the same that you are doing with the -D param). And from the listing Bob sent me it seems that after we find wxWidgets_LIB_DIR correctly the rest is good to go. Have you tried it with static libs. That is, -DwxWidgets_LIB_DIR=%WXWIN%\lib\gcc_lib ?? No, I never tried that, I need the dll for my program. In any case, the attached file should not require you to specify the wxWidgets_LIB_DIR anymore. [...] Great, so test the attached file and let me know if it works! I tested it, and it doesn't work, although wxWidgets_LIB_DIR is set correctly for MinGW. But the problem is, that the module looks for the wrong libraries: FIND_PATH(wxWidgets_LIB_DIR NAMES wxpng.lib wxpngd.lib PATHS ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib DOC Path to wxWidgets libraries? NO_DEFAULT_PATH ) The MinGW compiler toolset adheres to the library naming convention for Linux and therefore the corresponding libraries are called libwxpng.a and libwxpngd.a So either add these names to NAME, or use another variable? I think any other windows compiler would name the library wxpng.lib. HTH, Werner -- Dr. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: [EMAIL PROTECTED] web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] ADD_TEST comparing the command input with a file content
Hello guys, Thank you very much for the tip! This is exactly what I needed. Best regards, William On Fri, Jul 4, 2008 at 9:56 PM, Alan W. Irwin [EMAIL PROTECTED] wrote: On 2008-07-04 12:08+0200 William Candillon wrote: Hi, I'm using the ADD_TEST command to test the output of my executable like this: ADD_TEST(test mycommand) SET_TEST_PROPERTIES(test PROPERTIES PASS_REGULAR_EXPRESSION foo) However, I would like to compare the output with the content of a file. Is there a platform independent way to do that without writing a perl script for example ? You can run cmake -E compare_files file1 file2 as part of your test at test time (not at the normal cmake time when the tests are configured) to check whether file1 and file2 are the same or not. 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); PLplot scientific plotting software package (plplot.org); 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 __ -- William Candillon http://apdt.googlecode.com ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] DLL runtime error R6034
Hi, Does anyone had this error http://msdn.microsoft.com/en-us/library/ms235560(VS.80).aspx while using a DLL built this cmake? My application (also built with cmake) works fine on Release mode, I get this error only in Debug configuration. In the old project (visual studio files only) the application seems to work in debug and release without problems. I've looked into the compiler options but I didn't find what could be the key difference. Since I switched from linux to windows recently, I'm really confused. Any ideas on how to find where the problem is coming from? Thanks in advance, -- Mehdi ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] DLL runtime error R6034
On Tuesday 08 July 2008 13:38:25 Mehdi Rabah wrote: Hi, Does anyone had this error http://msdn.microsoft.com/en-us/library/ms235560(VS.80).aspx while using a DLL built this cmake? My application (also built with cmake) works fine on Release mode, I get this error only in Debug configuration. In the old project (visual studio files only) the application seems to work in debug and release without problems. I've looked into the compiler options but I didn't find what could be the key difference. Since I switched from linux to windows recently, I'm really confused. Any ideas on how to find where the problem is coming from? I suppose you use VS 2005? You should put manifest file with your DLL. For example, I have to put Microsoft.VC80.CRT.manifest with msvcr80.dll to run on systems without MS VS 2005 redistributable runtime installed. Thanks in advance, -- Mehdi ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CTest with Python unittest
Hi, I have had a look at the FAQ for CTest but did not find any specific answer hence I am posting here. I have a couple of Python projects which has unittest as part of their code base. I'd like to submit their unit test run output on to a CDash server, is there any information available to do this? Is this a CTest question or a CDash question ? Regards ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] DLL runtime error R6034
On Tue, Jul 8, 2008 at 1:39 PM, Yuri Timenkov [EMAIL PROTECTED] wrote: On Tuesday 08 July 2008 15:29:51 Mehdi Rabah wrote: Hi Yuri, CMake generate both .embed.manifest and .intermediate.manifest (but no .CRT.manifest). Also, I have added VS 2008 redistribuable DLLs path in my %PATH%. I mean .CRT.manifest is manifest for MSVS CRT dll. For your libraries manifests have different names, but they should be in same folder as your dll after installation. I don't know whether CMake embeds manifest or not, because we build our software with VS2003 :) I just encountered such problem once, and to solve this problem I had to put not only dll itself to application folder, but also its manifest. Ok thanks, maybe I should use VS 2005 (I use the express version and 2003 is not available anymore). I have all the right manifest files in the output folder (they are generated by cmake, I didn't have to do anything), but I still have this problem. Any other ideas? How could I embed a manifest file in my DLL using cmake ? Thank you also for your previous answers. -- Mehdi On Tue, Jul 8, 2008 at 11:47 AM, Yuri Timenkov [EMAIL PROTECTED] wrote: On Tuesday 08 July 2008 13:38:25 Mehdi Rabah wrote: Hi, Does anyone had this error http://msdn.microsoft.com/en-us/library/ms235560(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/ms235560%28VS.80%29.aspx http://msd n.microsoft.com/en-us/library/ms235560%28VS.80%29.aspxwhile using a DLL built this cmake? My application (also built with cmake) works fine on Release mode, I get this error only in Debug configuration. In the old project (visual studio files only) the application seems to work in debug and release without problems. I've looked into the compiler options but I didn't find what could be the key difference. Since I switched from linux to windows recently, I'm really confused. Any ideas on how to find where the problem is coming from? I suppose you use VS 2005? You should put manifest file with your DLL. For example, I have to put Microsoft.VC80.CRT.manifest with msvcr80.dll to run on systems without MS VS 2005 redistributable runtime installed. Thanks in advance, -- Mehdi ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake not searching Fortran source suffixes
Hi all, I wonder if anyone can help with this that I've got stuck on. I'm building a mixed C and Fortran project that builds libraries and then some example applications. When building the example apps, to make everything more generic and reusable I do this (like in VTK with its Rendering, etc subdirectories I think): set(EXAMPLE app_name) add_executable(${EXAMPLE} ${EXAMPLE}) where the source file it needs to compile is app_name.c So far so good as CMake finds app_name.c by searching through a list of known source file suffixes to complete the filename. But when building the Fortran examples I get an error: CMAke Error: Cannot find source file /source/path/and/filename for target filename Tried extensions .c .C .c++ .cc etc and so on. When I turn on Fortran in my project a file called CMakeFortranCompiler.cmake is created which lists the possible Fortran extensions in a variable called CMAKE_Fortran_SOURCE_FILE_EXTENSIONS but these it seems aren't added to the list CMake uses to search with. Is this a bug? Can I add them to the search list myself? I've looked in vain for a variable where the search list might be stored and therefore appended to. This is with 2.4.8 and 2.6.0. Thanks for any help/pointers, Rob ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake support for Python
Hi, I'd like to build and run Python unit test using CMake. In the keyword Project, there is support for a language tag after the project name. Is there any example of using CMake to run Python unit tests? Regards ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] DLL runtime error R6034
Mehdi Rabah wrote: Ok thanks, maybe I should use VS 2005 (I use the express version and 2003 is not available anymore). I have all the right manifest files in the output folder (they are generated by cmake, I didn't have to do anything), but I still have this problem. Any other ideas? How could I embed a manifest file in my DLL using cmake ? CMake automatically embeds manifest in your application. The trick is the distribution of the MS run time libraries. For that you have to use the .manifest files and dll's provided by MS. There is a module InstallRequiredSystemLibraries.cmake that will install those libraries with your application. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] a suggestion. [CMake 0007303]: CMake latest: Boost_LIBRARIES is not set
Hello! I do not want make an unnecessary bug report so I decided to write this email. I made an issue http://public.kitware.com/Bug/view.php?id=7303. And I suppose an other issue should be originated to documentation. Because it is not clear that Boost_LIBRARIES is used in case of COMPONENTS. What do you think about it? -- /BR, Alexander ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Check if a target has been added
Hi, I posted a message yesterday and found out that the method wasn't quite effective. If there any way of checking if a target has already been added to the build chain (resetting it at each configure) ? I have lots of projects depending on the same target and this produces makefile warnings and VS. annoying popups. Cheers, Félix ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] a suggestion. [CMake 0007303]: CMake latest: Boost_LIBRARIES is not set
On 08.07.08 18:29:27, Alexander Bubnov wrote: Hello! I do not want make an unnecessary bug report so I decided to write this email. I made an issue http://public.kitware.com/Bug/view.php?id=7303. And I suppose an other issue should be originated to documentation. Because it is not clear that Boost_LIBRARIES is used in case of COMPONENTS. You should open a new report for that. Personally I think the documentation is pretty clear, though maybe not very verbose on that particular part. It reads Boost_LIBRARIES Link these to use the Boost libraries that you specified, so obviously if you don't specify any libraries you can expect the variable to be not set. Andreas -- You learn to write as if to someone else because NEXT YEAR YOU WILL BE SOMEONE ELSE. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] a suggestion. [CMake 0007303]: CMake latest: Boost_LIBRARIES is not set
I agree. But about 2008/7/8, Andreas Pakulat [EMAIL PROTECTED]: On 08.07.08 18:29:27, Alexander Bubnov wrote: Hello! I do not want make an unnecessary bug report so I decided to write this email. I made an issue http://public.kitware.com/Bug/view.php?id=7303. And I suppose an other issue should be originated to documentation. Because it is not clear that Boost_LIBRARIES is used in case of COMPONENTS. You should open a new report for that. Personally I think the documentation is pretty clear, though maybe not very verbose on that particular part. It reads Boost_LIBRARIES Link these to use the Boost libraries that you specified, so obviously if you don't specify any libraries you can expect the variable to be not set. Andreas -- You learn to write as if to someone else because NEXT YEAR YOU WILL BE SOMEONE ELSE. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake -- /BR, Alexander ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Newbie creating shared objects on Mac
On Mon, Jul 7, 2008 at 9:39 PM, Gerrick Bivins [EMAIL PROTECTED] wrote: I realized I left out the fact that I'm using the swig module. Sorry about that. Does the SWIG_ADD_MODULE have a SWIG_ADD_LIBRARY equivalent? It's the same for me, but it hasn't caused me any troubles so far. [snip] [ 81%] Swig source Scanning dependencies of target _main [ 81%] Building CXX object src/py-wrappers/adonthell/CMakeFiles/_main.dir/py_mainPYTHON_wrap.o [ 82%] Building CXX object src/py-wrappers/adonthell/CMakeFiles/_main.dir/py_main.o Linking CXX shared module _main.so [snip] I am not using the latest CMake, however (still happy with 2.4.7). So unless you have a specific issue (aside from a file extension that's atypical for a Mac shared library), I wouldn't bother. Kai ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Newbie creating shared objects on Mac
Kai Sterker wrote: On Mon, Jul 7, 2008 at 9:39 PM, Gerrick Bivins [EMAIL PROTECTED] wrote: I realized I left out the fact that I'm using the swig module. Sorry about that. Does the SWIG_ADD_MODULE have a SWIG_ADD_LIBRARY equivalent? It's the same for me, but it hasn't caused me any troubles so far. [snip] [ 81%] Swig source Scanning dependencies of target _main [ 81%] Building CXX object src/py-wrappers/adonthell/CMakeFiles/_main.dir/py_mainPYTHON_wrap.o [ 82%] Building CXX object src/py-wrappers/adonthell/CMakeFiles/_main.dir/py_main.o Linking CXX shared module _main.so [snip] I am not using the latest CMake, however (still happy with 2.4.7). So unless you have a specific issue (aside from a file extension that's atypical for a Mac shared library), I wouldn't bother. Actually, this is typical for a shared module on the Mac. Older macs made a distinction between linkable and loadable modules. By convention loadable modules had the .so extension in many projects. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Newbie creating shared objects on Mac
Ok. If I understand you guys correctly, I should be good to go because .so and .dylib now are the same in the mac OSX current architectures? On 7/8/08 12:43 PM, Bill Hoffman [EMAIL PROTECTED] wrote: Kai Sterker wrote: On Mon, Jul 7, 2008 at 9:39 PM, Gerrick Bivins [EMAIL PROTECTED] wrote: I realized I left out the fact that I'm using the swig module. Sorry about that. Does the SWIG_ADD_MODULE have a SWIG_ADD_LIBRARY equivalent? It's the same for me, but it hasn't caused me any troubles so far. [snip] [ 81%] Swig source Scanning dependencies of target _main [ 81%] Building CXX object src/py-wrappers/adonthell/CMakeFiles/_main.dir/py_mainPYTHON_wrap.o [ 82%] Building CXX object src/py-wrappers/adonthell/CMakeFiles/_main.dir/py_main.o Linking CXX shared module _main.so [snip] I am not using the latest CMake, however (still happy with 2.4.7). So unless you have a specific issue (aside from a file extension that's atypical for a Mac shared library), I wouldn't bother. Actually, this is typical for a shared module on the Mac. Older macs made a distinction between linkable and loadable modules. By convention loadable modules had the .so extension in many projects. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Problem with Static Pattern Rules
On Tuesday 08 July 2008, Carminati Federico wrote: Hello, it is possible to add a custom command to cmake with a static pattern rule? My problem is the following, I have a coding convention checker that for each c++ source file creates a violation file. The rule I had in my makefile was $(SRCS:.cxx=.viol) : %.viol : %.cxx bla bla How can I do this in cmake? The only way that seems to work is to create a single rule for each file with foreach. Yes, that's how to do it. You can wrap this in a macro, so you get something like: add_violation_rules(... files) Alex ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Check if a target has been added
On Tuesday 08 July 2008, Félix C. Morency wrote: Hi, I posted a message yesterday and found out that the method wasn't quite effective. If there any way of checking if a target has already been added to the build chain (resetting it at each configure) ? I have lots of projects depending on the same target and this produces makefile warnings and VS. annoying popups. You could try to get a target property, e.g. LOCATION from the target you are interested in, and see what you get. (this may behave differently in cmake 2.4 and 2.6) Alex ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Visual Studio and Windows Mobile SDKs
On Monday 07 July 2008, you wrote: Hi, I'll submit a patch as soon as I've managed to work around some remaining issues. After messing around with some registry stuff, here's where I'm currently standing. I had a hard time to find whether VS stores the information on all the different SDKs in the registry or in a file. Concerning Windows Mobile they are stored in a config file called ${VSHOME}\VC\vcpackages\WCE.VCPlatform.config. Now I'm using a special XML parser engine derived from cmXMLParser to parse it and to get a vector of structs containing all the information, including the used instruction set, the exact SDK name, etc. I also removed the need for the additional command line flags. All the toolchain-based stuff moved into the generator, because the only important flag to set is the WINCE flag to access the platform specific files. Everything else can also be parsed from the SDK definitions. Also the compilers/assemblers are set in the generator itself, because basically it is just a change of executables within VS (because they are part of VS anyway). Does this actually influence the makefile generators in any way or is there information which could/should also be used by them ? Now I end up having a generator with a set of SDKs and, unfortunately, only one possibility to set this-PlatformName to one of the SDKs. Could this be done by setting a special cmake variable in the toolchain file (which is read very early) and which could then be evaluated by the generator ? Alex ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake