[CMake] Missing Folders in CPack generated TGZ
Hello I have a strange cpack problem: I use cpack to generate a Mac install package (PackageMaker) and to generate a tar.gz. Logically, the tar.gz and the installer should contain/install the same files. Unfortunately, this is not the case. Some more or less random directories are missing in the tar.gz. But strangely, these files are not missing in the helper folder _CPack_Packages/TGZ. _CPack_Packages/TGZ contains the correct directories. Is this a known problem? Can I debug this somehow? Can someone tell me the command that is used to pack _CPack_Packages/TGZ? David ___ 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] Batch Files in CTest (instead executables)
Hello David The problem I have is not located in the batch file. The EXIT is executed. But if the /B option is on, ctest doesn't detect failures anymore. The batch script must be killed by executing EXIT without the '/B' options. But then, the batch script cannot be used anymore from the command line because it kills the command line all the time. I didn't find a clean solution in the meantime. Now, I am using different scripts. One to execute executables form ctest (without /B option). And one to execute executables from the command line (with /B option). David On Mar 31, 2010, at 7:34 PM, David Cole wrote: Try something like this instead: SETLOCAL SET PATH=...;%PATH% execute_something.exe set my_error=%ERRORLEVEL% IF %my_error% neq 0 ( EXIT /B %my_error% ) ENDLOCAL I think the problem is probably that ERRORLEVEL is changing to 0 after you execute the batch script IF command... Saving it in your own variable prevents that sort of sole last error madness... Let me know if that does not work. This should be working as you expect. On Wed, Mar 31, 2010 at 3:59 AM, David Graf david.g...@28msec.com wrote: Hello Everybody I want to execute batch files in CTest tests (to set the correct paths to the PATH environment variables before executing an executable). Unfortunately, that does not work smoothly. The reason is the error handling. If an error happens in the batch file, the batch file has to be killed with an exit command. Otherwise, ctest doesn't receive an error code. My script has to look like this: SETLOCAL SET PATH=...;%PATH% execute_something.exe IF %ERRORLEVEL% neq 0 ( EXIT %ERRORLEVEL% ) ENDLOCAL Unfortunately, this is not handy because the batch file cannot be executed anymore from the cmd. Actually, it can. But it kills that cmd every time an error happens. Not really nice. In my opinion, the batch file should look like this: SETLOCAL SET PATH=...;%PATH% execute_something.exe IF %ERRORLEVEL% neq 0 ( EXIT /B %ERRORLEVEL% ) ENDLOCAL Because of the argument '/B', the cmd is not killed anymore, but the error code is correctly set! Unfortunately, ctest doesn't behave correctly anymore after this change. After this change, every test passes. No matter what is going on. CTest doesn't seem to check the %ERRORLEVEL%. Is this a missing feature in ctest? Or am I missing something? Cheers, David Graf ___ 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 ___ 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] Batch Files in CTest (instead executables)
Hello Michael I fixed it differently. I just two different scripts. One for ctest and one to execute executables from the command line directly. David On Mar 31, 2010, at 3:16 PM, Michael Wild wrote: Why on earth is it so bad to have a trailing line with --- YAY TEST PASSED --- (or something like this) in the output of ctest -V? On 31. Mar, 2010, at 15:04 , David Graf wrote: Hello But this is also not a solution for me. Our testdriver prints some debugging information that can be seen if ctest is executed with the -V option. Therefore, it is impossible to echo SUCCESS or FAILED. David On Mar 31, 2010, at 1:23 PM, Michael Wild wrote: On 31. Mar, 2010, at 11:47 , David Graf wrote: Hello Michael Instead of checking the exit status, you could have CTest check the output for success or failure. Have a look at SET_TESTS_PROPERTIES. Unfortunately, that doesn't work in our case. We are running a testdriver for the result checking. There reason is: Our tests produce xml and XML cannot be compared like a string. It must be translated into canonical form before it can be compared. We wrote this part in C++. Therefore, we cannot do the comparison in CMake. David What I meant is this to output a string from your batch script: SETLOCAL SET PATH=...;%PATH% execute_something.exe IF %ERRORLEVEL% neq 0 ( ECHO FAILED ) ELSE ( ECHO SUCCESS ) ENDLOCAL 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
[CMake] Batch Files in CTest (instead executables)
Hello Everybody I want to execute batch files in CTest tests (to set the correct paths to the PATH environment variables before executing an executable). Unfortunately, that does not work smoothly. The reason is the error handling. If an error happens in the batch file, the batch file has to be killed with an exit command. Otherwise, ctest doesn't receive an error code. My script has to look like this: SETLOCAL SET PATH=...;%PATH% execute_something.exe IF %ERRORLEVEL% neq 0 ( EXIT %ERRORLEVEL% ) ENDLOCAL Unfortunately, this is not handy because the batch file cannot be executed anymore from the cmd. Actually, it can. But it kills that cmd every time an error happens. Not really nice. In my opinion, the batch file should look like this: SETLOCAL SET PATH=...;%PATH% execute_something.exe IF %ERRORLEVEL% neq 0 ( EXIT /B %ERRORLEVEL% ) ENDLOCAL Because of the argument '/B', the cmd is not killed anymore, but the error code is correctly set! Unfortunately, ctest doesn't behave correctly anymore after this change. After this change, every test passes. No matter what is going on. CTest doesn't seem to check the %ERRORLEVEL%. Is this a missing feature in ctest? Or am I missing something? Cheers, David Graf ___ 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] Batch Files in CTest (instead executables)
Hello Michael Instead of checking the exit status, you could have CTest check the output for success or failure. Have a look at SET_TESTS_PROPERTIES. Unfortunately, that doesn't work in our case. We are running a testdriver for the result checking. There reason is: Our tests produce xml and XML cannot be compared like a string. It must be translated into canonical form before it can be compared. We wrote this part in C++. Therefore, we cannot do the comparison in CMake. David ___ 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] Batch Files in CTest (instead executables)
Hello But this is also not a solution for me. Our testdriver prints some debugging information that can be seen if ctest is executed with the -V option. Therefore, it is impossible to echo SUCCESS or FAILED. David On Mar 31, 2010, at 1:23 PM, Michael Wild wrote: On 31. Mar, 2010, at 11:47 , David Graf wrote: Hello Michael Instead of checking the exit status, you could have CTest check the output for success or failure. Have a look at SET_TESTS_PROPERTIES. Unfortunately, that doesn't work in our case. We are running a testdriver for the result checking. There reason is: Our tests produce xml and XML cannot be compared like a string. It must be translated into canonical form before it can be compared. We wrote this part in C++. Therefore, we cannot do the comparison in CMake. David What I meant is this to output a string from your batch script: SETLOCAL SET PATH=...;%PATH% execute_something.exe IF %ERRORLEVEL% neq 0 ( ECHO FAILED ) ELSE ( ECHO SUCCESS ) ENDLOCAL 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
[CMake] Weired behavior with CTest Fedora 10 g++ 4.3.2
Hello We have a weired problem when we compile and test our software on Fedora 10 with g++ 4.3.2. We have around 600 tests. When we execute these tests in one ctest run, two random tests always fail (without any regularity). We tested it on two different fedora installation with ctest 2.4 and 2.6. This strange behavior occurs on both machines. After some debugging, we observed that the failing tests do not produce any log output. Even when adding the std::cout out statements into the code, we do not get some output. We assume there is some bad interaction between Fedora 10 and ctest. Has someone noticed the same strange behavior? David ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] post build add_test
Hello Is it somehow possible to make the ADD_TEST command dependent on a target? Is it possible to add tests to a project after a certain target has been built? Currently, I have the impression that tests can only be added to a project when the cmake code is executed, before the build process starts not later. But maybe, there is a trick to add tests after the buid process. I have the situation that I wanna use an executable of my own project to compute the test cases (the executable is built out of external sources that are not tested in my project). The result of the executable is a list of strings that I wanna use to add tests to my project. David ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CPack DEB Packaging: Automate dependency resolution
Hello Currently in my project, I provide all dependencies for DEB packaging in CPack by setting the variable CPACK_DEBIAN_PACKAGE_DEPENDS. Is there a possibility to automate this process (similar to the behavior of the CPack RPM packaging mechanism)? As far as I understood it correctly, such a mechanism must be implemented with the Linux tool 'objdump' to get the dependencies of shared libraries. I already thought about implementing my own script to get these dependencies of my shared libraries automatically. But first, I wanted to make sure that I do not reinvent the wheel. Especially because I found the following entry in 'CPackDeb.cmake' next to the dependency section: ' TODO: automate 'objdump -p | grep NEEDED'. David ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] RPM Package Dependencies
Hello Eric Thanks a lot! It works! I made a feature request (http://public.kitware.com/Bug/view.php?id=7904). Please attach your updated CPackRPM.cmake to it. David Eric Noulard wrote: 2008/10/30 David Graf [EMAIL PROTECTED]: Hello I would like to add a dependency to a RPM packages that is generated by CPack 2.6 manually. Is this possible (similar to the DEB solution that is setting the variable CPACK_DEBIAN_PACKAGE_DEPENDS)? No currently, there is no such feature. However Would you try to replace the CPackRPM.cmake file currently installed on your system with the one attached to this mail. Then try to define CPACK_RPM_PACKAGE_REQUIRES in your CMakeLists.txt with the appropriate value. The rebuild your RPM with cpack. Then verify that the dependency is properly set using: rpm -qpR yourrpm.rpm If all this did go smooth, would you be kind enough to file a feature request in the bug tracker and I'll try to make the update if the CMake dev team is interested. If it does not work for you, please file a feature request :=) I'll try harder. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] RPM Package Dependencies
Hello I would like to add a dependency to a RPM packages that is generated by CPack 2.6 manually. Is this possible (similar to the DEB solution that is setting the variable CPACK_DEBIAN_PACKAGE_DEPENDS)? David ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] set env vars with nsis installer created by cpack
Hello I am creating an nsis package from my cmake project with cpack and have the following question: Is there a possibility in cpack to force the nsis installer to add an entry to the windows environment variables which contains the path to the installed package as value? The environment vars should contain after installation an entry like PROJECTNAME_HOME=C:\Program Files\projectname. David ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Ruby Python Binding with SWIG in CMake
I managed to solve the problem by generating each SWIG module in a separate directory. But it is not possible to use one SWIG interface file for every module. Thus, I added in every directory a '.i' file that just includes the original '.i' file from the upper dir (%include ../test.i). David Alan W. Irwin wrote: On 2008-05-12 11:00-0700 David Graf wrote: Hello I have problems to generate Python and Ruby bindings with SWIG in CMake out of one SWIG interface file. In the following example, I have a small interface file and a CMake file that should generate Ruby and Python bindings. But the Ruby binding is not generated at all and the Python binding is broken because the two generation processes produce a library file with the same name (_test.so). Does someone know how to produce bindings from one interface for several languages? I need bindings for Ruby, Python, PHP, Java, C#. Multiple bindings should not be a problem for swig and CMake. For example, PLplot implements python and java bindings using swig. If you want to see how this example works in detail, look at http://plplot.svn.sourceforge.net/viewvc/plplot/trunk. In particular, you should look at bindings/swig-support/plplotcapi.i (which defines our API for swig), and CMakeLists.txt files and *.i files in bindings/python and bindings/java. Hope that working example helps you to figure out what is wrong for your own attempt to build multiple bindings using swig and CMake. 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 __ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Deb Package Dependencies
Hello In CPack 2.6, is it possible to add package dependencies to the generated deb package? David ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Ruby Python Binding with SWIG in CMake
Hello I have problems to generate Python and Ruby bindings with SWIG in CMake out of one SWIG interface file. In the following example, I have a small interface file and a CMake file that should generate Ruby and Python bindings. But the Ruby binding is not generated at all and the Python binding is broken because the two generation processes produce a library file with the same name (_test.so). Does someone know how to produce bindings from one interface for several languages? I need bindings for Ruby, Python, PHP, Java, C#. David Example: SWIG Interface File: %module test %{ int get() { return 5; } %} int get(); CMake File: PROJECT(swig_test) FIND_PACKAGE(SWIG) INCLUDE(${SWIG_USE_FILE}) SET_SOURCE_FILES_PROPERTIES(test.i PROPERTIES CPLUSPLUS ON) FIND_PACKAGE(PythonLibs) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) SWIG_ADD_MODULE(test python test.i) SWIG_LINK_LIBRARIES(test ${PYTHON_LIBRARIES}) FIND_PACKAGE(Ruby) INCLUDE_DIRECTORIES(${RUBY_INCLUDE_PATH}) SWIG_ADD_MODULE(test ruby test.i) SWIG_LINK_LIBRARIES(test ${RUBY_LIBRARY}) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake