[CMake] module and cmake
Hi all. I am currently trying to create a more tidy CMakeLists.txt script for a simulation code I'm working on. The target platforms are mac and linux desktops (for development) and HPC [0] servers (all linux or, in some hypothetical future, unix systems). On HPC servers, it is very common to install software in modules. I am not sure how well aquainted the CMake crowd is with the module system [1] so I'll post a brief explanation. HPC servers often have a large amount of users with varying requirements. Therefore, it is common to require, say, two different versions of a library, or the same library for two different compilers. As an example, a machine I'm currently using has several modules for the FFTW library. Example: paulanto@rocks:~/Rayleigh2D $ module avail fftw fftw/2.1.5 fftw/3.2.2(default) So, there's two different fftw versions available, and I'm currently using the default one as such: paulanto@rocks:~/Rayleigh2D $ module load fftw paulanto@rocks:~/Rayleigh2D $ module list Currently Loaded Modulefiles: 1) fftw/3.2.2 There we go. Now what does it mean to load a module? Well, basically, the module command works by adjusting environment variables: [0] High Performance Computing [1] http://modules.sourceforge.net/ -- 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] Fwd: module and cmake
Hi all. I am currently trying to create a more tidy CMakeLists.txt script for a simulation code I'm working on. The target platforms are mac and linux desktops (for development) and HPC [0] servers (all linux or, in some hypothetical future, unix systems). For the desktop/laptop case, it's mostly easy enough, as one installs libraries in a standard location - /opt, /usr/local, or something of that sort. On HPC servers, it is very common to install software in modules. I am not sure how well aquainted the CMake crowd is with the module system [1] so I'll post a brief explanation. HPC servers often have a large amount of users with varying requirements. Therefore, it is common to require, say, two different versions of a library, or the same library for two different compilers. As an example, a machine I'm currently using has several modules for the FFTW library. Example: paulanto@rocks:~/Rayleigh2D $ module avail fftw fftw/2.1.5 fftw/3.2.2(default) So, there's two different fftw versions available, and I'm currently using the default one as such: paulanto@rocks:~/Rayleigh2D $ module load fftw paulanto@rocks:~/Rayleigh2D $ module list Currently Loaded Modulefiles: 1) fftw/3.2.2 There we go. Now what does it mean to load a module? Well, basically, the module command works by adjusting environment variables: paulanto@rocks:~/Rayleigh2D $ module show fftw /share/apps/modulefiles/fftw/3.2.2: prepend-path CPATH /share/apps/modulessoftware/fftw/fftw-3.2.2/include prepend-path FPATH /share/apps/modulessoftware/fftw/fftw-3.2.2/include prepend-path LD_LIBRARY_PATH /share/apps/modulessoftware/fftw/fftw-3.2.2/lib prepend-path LIBRARY_PATH /share/apps/modulessoftware/fftw/fftw-3.2.2/lib We see that the fftw module sets various paths, and that these will all be different based on the exact version I'm using on the current machine. Hence, I can't tell beforehand, in my CMakeLists.txt, where to search for, say, libfftw3.a. So why am i ranting on about this? Well, basically find_package(FFTW3) does not find the fftw library, and other libraries I'm using (hdf5, mkl, ...) share the same fate. Previously I've just hand-added all sorts of include_directories and link_directories but I'm getting fed up and want to use the more elegant find_package approach, at least where possible. So, what am I asking? 1) Is there a standard way for CMake to interact with modules? 2) Is there a standard way to tell FindXXX.cmake (where XXX=fftw, hdf5, mkl, etc) where to search for libraries? 3) Can I convince CMake to include link and include directores from the environment variables, like LIBRARY_PATH, FPATH etc? 4) How do I handle LIBRARY_PATHs with multiple entries, such as this one? paulanto@rocks:~/Rayleigh2D $ echo $LIBRARY_PATH /share/apps/modulessoftware/fftw/fftw-3.2.2/lib:/share/apps/modulessoftware/hdf5/hdf-5.1.8.5-intel/lib:/share/apps/modulessoftware/openmpi/openmpi-1.4.3-intel/lib:/share/apps/modulessoftware/intel/compilers/11.1.059/lib/intel64:/share/apps/modulessoftware/intel/compilers/11.1.059/ipp/em64t/lib:/share/apps/modulessoftware/intel/compilers/11.1.059//mkl/lib/em64t:/share/apps/modulessoftware/intel/compilers/11.1.059/tbb/intel64/cc4.1.0_libc2.4_kernel2.6.16.21/lib Perhaps I'm not asking the right questions, but hopefully, some can tell me what I _should_ be asking. Or even better, the answer. Cheers Paul [0] High Performance Computing [1] http://modules.sourceforge.net/ -- 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] Fwd: module and cmake
Am Samstag, 19. Mai 2012, 14:42:49 schrieb Paul Anton Letnes: Hi all. I am currently trying to create a more tidy CMakeLists.txt script for a simulation code I'm working on. The target platforms are mac and linux desktops (for development) and HPC [0] servers (all linux or, in some hypothetical future, unix systems). For the desktop/laptop case, it's mostly easy enough, as one installs libraries in a standard location - /opt, /usr/local, or something of that sort. On HPC servers, it is very common to install software in modules. I am not sure how well aquainted the CMake crowd is with the module system [1] so I'll post a brief explanation. HPC servers often have a large amount of users with varying requirements. Therefore, it is common to require, say, two different versions of a library, or the same library for two different compilers. As an example, a machine I'm currently using has several modules for the FFTW library. Example: [...] So why am i ranting on about this? Well, basically find_package(FFTW3) does not find the fftw library, This module is not part of CMake, so you should complain somewhere else. and other libraries I'm using (hdf5, mkl, ...) share the same fate. Previously I've just hand-added all sorts of include_directories and link_directories but I'm getting fed link_directories() is surely not the solution you need. In fact, it usually creates only more problems. But to have some useful information: set CMAKE_PREFIX_PATH to the path where the libraries can be found without the lib/ or include/ suffix, CMake will add them itself. So if you have fftw2 in /opt/fftw2/lib/libfftw2.a and fftw3 in /opt/fftw-3/lib/libfftw3.so just call: cmake -D CMAKE_PREFIX_PATH=/opt/fftw2 ... Then CMake should pick up that library and all should be well. Eike signature.asc Description: This is a digitally signed message part. -- 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] lapack-3.4.1-cmake testing error
Greetings, I am trying to compile lapack -3.4.1 with cmake. lapack-3.4.1/TESTING/CMakeLists.txt has these lines at the end:- # execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_SOURCE_DIR}/lapack_testing.py ${LAPACK_BINARY_DIR}) add_test( NAME LAPACK_Test_Summary WORKING_DIRECTORY ${LAPACK_BINARY_DIR} COMMAND ${PYTHON_EXECUTABLE} lapack_testing.py ) #- running cmake ends like so:- --- CMake Error at TESTING/CMakeLists.txt:313 (add_test): add_test given unknown argument: WORKING_DIRECTORY -- Configuring incomplete, errors occurred! -- I dont want to disable the tests so advice would be appreciated. sincerely lux-integ. -- 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] Fwd: module and cmake
2012/5/19 Rolf Eike Beer e...@sf-mail.de: Am Samstag, 19. Mai 2012, 14:42:49 schrieb Paul Anton Letnes: Hi all. I am currently trying to create a more tidy CMakeLists.txt script for a simulation code I'm working on. The target platforms are mac and linux desktops (for development) and HPC [0] servers (all linux or, in some hypothetical future, unix systems). For the desktop/laptop case, it's mostly easy enough, as one installs libraries in a standard location - /opt, /usr/local, or something of that sort. On HPC servers, it is very common to install software in modules. I am not sure how well aquainted the CMake crowd is with the module system [1] so I'll post a brief explanation. HPC servers often have a large amount of users with varying requirements. Therefore, it is common to require, say, two different versions of a library, or the same library for two different compilers. As an example, a machine I'm currently using has several modules for the FFTW library. Example: [...] So why am i ranting on about this? Well, basically find_package(FFTW3) does not find the fftw library, This module is not part of CMake, so you should complain somewhere else. Yes right but may be Paul could have a look at this thread http://www.cmake.org/pipermail/cmake/2012-January/048742.html where he can find some explaination about the interaction between module system and CMake. Since module plays with environment variable CMake may or may not be seing the environment change depending on how it is called. and other libraries I'm using (hdf5, mkl, ...) share the same fate. Previously I've just hand-added all sorts of include_directories and link_directories but I'm getting fed link_directories() is surely not the solution you need. In fact, it usually creates only more problems. But to have some useful information: set CMAKE_PREFIX_PATH to the path where the libraries can be found without the lib/ or include/ suffix, CMake will add them itself. Eike is right and I think you (Paul) should read the documentation of find_package more carefully: cmake --help-command find_package the algorithm used to search library, path, files etc... is explained in there. After that you can try: cmake --help-variable CMAKE_PREFIX_PATH cmake --help-variable CMAKE_INCLUDE_PATH cmake --help-variable CMAKE_LIBRARY_PATH cmake --help-variable CMAKE_PROGRAM_PATH ... Concerning the questions: 1) Is there a standard way for CMake to interact with modules? No, beside the fact that CMake do already use some PATH env var that module is playing with. 2) Is there a standard way to tell FindXXX.cmake (where XXX=fftw, hdf5, mkl, etc) where to search for libraries? Yes read find_package documentation. 3) Can I convince CMake to include link and include directores from the environment variables, like LIBRARY_PATH, FPATH etc? Yes you can using $ENV{ENV_VAR_NAME} in order to set some CMAKE_xxx_PATH variable. 4) How do I handle LIBRARY_PATHs with multiple entries, such as this one? I'm not sure I understand the question? CMake has builtin list support: cmake --help-command list if you replace the : by a ; (see cmake --help-command string) you'll get a CMake list and can use it in CMAKE__PATH var. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.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] Fwd: module and cmake
and other libraries I'm using (hdf5, mkl, ...) share the same fate. Previously I've just hand-added all sorts of include_directories and link_directories but I'm getting fed link_directories() is surely not the solution you need. In fact, it usually creates only more problems. I know, that's why I'm working on a more elegant solution :) Use target_link_libraries() with an absolute path to the library. But to have some useful information: set CMAKE_PREFIX_PATH to the path where the libraries can be found without the lib/ or include/ suffix, CMake will add them itself. So if you have fftw2 in /opt/fftw2/lib/libfftw2.a and fftw3 in /opt/fftw-3/lib/libfftw3.so just call: cmake -D CMAKE_PREFIX_PATH=/opt/fftw2 ... I know that this might be possible. However, I'd like to get CMake to read the environment directly, as everything is defined there. This will make it easier for other users to compile the code without -D CMAKE_PREFIX_PATH=/funny/path-... for several libraries. If there is a standard environment variable for a library then just put it into the Find*.cmake in the HINTS section (again: cmake --help-command find_library). Eike signature.asc Description: This is a digitally signed message part. -- 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] Fwd: module and cmake
Hi, On Sat, May 19, 2012 at 3:44 PM, Rolf Eike Beer e...@sf-mail.de wrote: But to have some useful information: set CMAKE_PREFIX_PATH to the path where the libraries can be found without the lib/ or include/ suffix, CMake will add them itself. So if you have fftw2 in /opt/fftw2/lib/libfftw2.a and fftw3 in /opt/fftw-3/lib/libfftw3.so just call: cmake -D CMAKE_PREFIX_PATH=/opt/fftw2 ... I know that this might be possible. However, I'd like to get CMake to read the environment directly, as everything is defined there. This will make it easier for other users to compile the code without -D CMAKE_PREFIX_PATH=/funny/path-... for several libraries. If there is a standard environment variable for a library then just put it into the Find*.cmake in the HINTS section (again: cmake --help-command find_library). Luckily CMAKE_PREFIX_PATH can also be set as environment variable, not just as cmake variable. So if you can teach the module system to set CMAKE_PREFIX_PATH (or the INCLUDE/LIBRARY variants) you should be good to go. Andreas -- 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] lapack-3.4.1-cmake testing error
On 2012-05-19 15:24+0100 luxInteg wrote: Greetings, I am trying to compile lapack -3.4.1 with cmake. lapack-3.4.1/TESTING/CMakeLists.txt has these lines at the end:- # execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_SOURCE_DIR}/lapack_testing.py ${LAPACK_BINARY_DIR}) add_test( NAME LAPACK_Test_Summary WORKING_DIRECTORY ${LAPACK_BINARY_DIR} COMMAND ${PYTHON_EXECUTABLE} lapack_testing.py ) #- running cmake ends like so:- --- CMake Error at TESTING/CMakeLists.txt:313 (add_test): add_test given unknown argument: WORKING_DIRECTORY -- Configuring incomplete, errors occurred! -- I dont want to disable the tests so advice would be appreciated. The ideal place to ask this question would be the lapack development list rather than the CMake list, but, nevertheless, I think I can help you out. According to the appropriate man pages, the WORKING_DIRECTORY option was added to the add_test command somewhere between cmake-2.8.2 and cmake-2.8.7. So, as you found out, the lapack build system just doesn't work properly for old cmake versions. The normal way to avoid such issues is for the lapack developers to update the cmake_minimum_required command for their build system so the user is told up front exactly the minimum cmake version that can be used. Meanwhile, you can work around this bug in the lapack build system by using a later version of cmake (e.g., cmake-2.8.7) that does honor the WORKING DIRECTORY option for the add_test command. 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] reset INCLUDE_DIRECTORIES?
Hi, I must in some case define a fresh set of include directories. AFAIK, INCLUDE_DIRECTORIES either appends or prepends. How can I remove a certain directory, or alternatively, query and clear the entries? Thanks Dominik -- 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] reset INCLUDE_DIRECTORIES?
Sorry, I forgot to add, I need the same thing with link_directories. Thanks Dominik On Sat, May 19, 2012 at 7:56 PM, Dominik Szczerba domi...@itis.ethz.ch wrote: Hi, I must in some case define a fresh set of include directories. AFAIK, INCLUDE_DIRECTORIES either appends or prepends. How can I remove a certain directory, or alternatively, query and clear the entries? Thanks Dominik -- 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 doesn't recognize custom templates
Hello Eric, hello David, sorry for the long response time. I noticed that the custom CPackConfig is not necessary if I use variable names beginning with CPACK_. So first I removed the custom file. Then the main problem... I don't use a changed NSIS.template.in file from the CMake installation. I use a NSIS script from a college and tried to use it under CPack. This means than I used CPACK variable names instead of hard coded values. However I'm a NSIS novice, so it seems that in a CPACK variable and/or in the original NSIS.template.in file are some commands which I didn't find. The only one I need is the command which copies the necessary files into the temporary CPack directory (_CPack_Packges). Which CPack variable and/or NSIS commands from the original template file are required to solve this? Thanks in advance Best Regards Am 09.05.2012 um 20:45 schrieb NoRulez noru...@me.com: By the way could you try 2.8.8 instead of 2.8.7 ? Yes, I will try it tomorrow (I read the changelog http://www.cmake.org/files/v2.8/CMakeChangeLog-2.8.8 but I can't find any details where this behavior may be fixed) Because on our Buildserver CMake 2.8.7 is installed and if no relevant changes are made in 2.8.8, then I would be happy if I could retain the CMake 2.8.7 installation (Never change a running system ;-)) But I will try 2.8.8 on the workstation and send you the output from 2.8.7 (--verbose --debug). Best Regards Am 09. Mai 2012 um 11:31 schrieb Eric Noulard eric.noul...@gmail.com: 2012/5/9 noru...@me.com: Is it the case? Is there any file in _CPack_Packages\win32\NSIS\MyProject ? No, there aren't any files Could you copy/paste the exact message you get and may be running cpack on the command line with ---verbose and --debug. Sure, but I can only do so tomorrow Nope normally you don't but what are you doing in your CPackConfig.cmake.in ? I only set the CPACK variables and additional variables which are used in the NSIS.template.in file. Because if I don't use the custom CPackConfig.cmake.in file then the variables in the NSIS.template.in files aren't resolved. Please send us those files. As usual the devil may be in the details. And do you have any INSTALL(CODE or INSTALL(SCRIPTS in your project? Yes, i use this for the BundleUtilities like in the BundleUtilities example INSTALL(CODE file(GLOB_RECURSE SHARED_LIBS \\${CMAKE_INSTALL_PREFIX}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\) include(BundleUtilities) fixup_bundle(\${APPS}\ \\${SHARED_LIBS}\ \${DIRS}\) COMPONENT Runtime) I'm not a BundleUtilities user but code like that may break with CPack because CPack may internally use DESTDIR to do its local installation so that one should usually write: $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX} rather than ${CMAKE_INSTALL_PREFIX} however since you have NO file at all in the local CPack install dir, the problem is elsewhere. By the way could you try 2.8.8 instead of 2.8.7 ? -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.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 -- 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] reset INCLUDE_DIRECTORIES?
Am Samstag, 19. Mai 2012, 20:01:55 schrieb Dominik Szczerba: Sorry, I forgot to add, I need the same thing with link_directories. That is easy. Don't use link_directories. Ever. Pass absolute paths to target_link_libraries(). signature.asc Description: This is a digitally signed message part. -- 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 doesn't recognize custom templates
CPack does a make install and puts your install tree underneath _CPack_Packages. THEN, it calls NSIS with the *.nsi script, and packages that up into an installer. There is nothing in the *.nsi file that copies anything into _CPack_Packages. That happens before makensis is ever called. Please post some code, so we can help you figure out what is going on here. Is this in an open source project where we can inspect the code? Or can you replicate your problem with the CMake/Tests/Tutorial/Step7 project? On Sat, May 19, 2012 at 2:02 PM, noru...@me.com wrote: Hello Eric, hello David, sorry for the long response time. I noticed that the custom CPackConfig is not necessary if I use variable names beginning with CPACK_. So first I removed the custom file. Then the main problem... I don't use a changed NSIS.template.in file from the CMake installation. I use a NSIS script from a college and tried to use it under CPack. This means than I used CPACK variable names instead of hard coded values. However I'm a NSIS novice, so it seems that in a CPACK variable and/or in the original NSIS.template.in file are some commands which I didn't find. The only one I need is the command which copies the necessary files into the temporary CPack directory (_CPack_Packges). Which CPack variable and/or NSIS commands from the original template file are required to solve this? Thanks in advance Best Regards Am 09.05.2012 um 20:45 schrieb NoRulez noru...@me.com: By the way could you try 2.8.8 instead of 2.8.7 ? Yes, I will try it tomorrow (I read the changelog http://www.cmake.org/files/v2.8/CMakeChangeLog-2.8.8 but I can't find any details where this behavior may be fixed) Because on our Buildserver CMake 2.8.7 is installed and if no relevant changes are made in 2.8.8, then I would be happy if I could retain the CMake 2.8.7 installation (Never change a running system ;-)) But I will try 2.8.8 on the workstation and send you the output from 2.8.7 (--verbose --debug). Best Regards Am 09. Mai 2012 um 11:31 schrieb Eric Noulard eric.noul...@gmail.com: 2012/5/9 noru...@me.com: Is it the case? Is there any file in _CPack_Packages\win32\NSIS\MyProject ? No, there aren't any files Could you copy/paste the exact message you get and may be running cpack on the command line with ---verbose and --debug. Sure, but I can only do so tomorrow Nope normally you don't but what are you doing in your CPackConfig.cmake.in ? I only set the CPACK variables and additional variables which are used in the NSIS.template.in file. Because if I don't use the custom CPackConfig.cmake.in file then the variables in the NSIS.template.in files aren't resolved. Please send us those files. As usual the devil may be in the details. And do you have any INSTALL(CODE or INSTALL(SCRIPTS in your project? Yes, i use this for the BundleUtilities like in the BundleUtilities example INSTALL(CODE file(GLOB_RECURSE SHARED_LIBS \\${CMAKE_INSTALL_PREFIX}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\) include(BundleUtilities) fixup_bundle(\${APPS}\ \\${SHARED_LIBS}\ \${DIRS}\) COMPONENT Runtime) I'm not a BundleUtilities user but code like that may break with CPack because CPack may internally use DESTDIR to do its local installation so that one should usually write: $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX} rather than ${CMAKE_INSTALL_PREFIX} however since you have NO file at all in the local CPack install dir, the problem is elsewhere. By the way could you try 2.8.8 instead of 2.8.7 ? -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.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 -- 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 doesn't recognize custom templates
Sorry, but the project is a commercial application. Did you mean this site? http://www.cmake.org/cmake/help/cmake_tutorial.html#s7 But there must something in the original *.nsi file, because if I use the original file then the files get copied (Without changing the CMakeLists.txt file) On the workstations we use VS instead of nmake. Is there a way do call CPack with the --verbose --debug options under VS without using nmake from the command line? Am 19.05.2012 um 20:26 schrieb David Cole david.c...@kitware.com: CPack does a make install and puts your install tree underneath _CPack_Packages. THEN, it calls NSIS with the *.nsi script, and packages that up into an installer. There is nothing in the *.nsi file that copies anything into _CPack_Packages. That happens before makensis is ever called. Please post some code, so we can help you figure out what is going on here. Is this in an open source project where we can inspect the code? Or can you replicate your problem with the CMake/Tests/Tutorial/Step7 project? On Sat, May 19, 2012 at 2:02 PM, noru...@me.com wrote: Hello Eric, hello David, sorry for the long response time. I noticed that the custom CPackConfig is not necessary if I use variable names beginning with CPACK_. So first I removed the custom file. Then the main problem... I don't use a changed NSIS.template.in file from the CMake installation. I use a NSIS script from a college and tried to use it under CPack. This means than I used CPACK variable names instead of hard coded values. However I'm a NSIS novice, so it seems that in a CPACK variable and/or in the original NSIS.template.in file are some commands which I didn't find. The only one I need is the command which copies the necessary files into the temporary CPack directory (_CPack_Packges). Which CPack variable and/or NSIS commands from the original template file are required to solve this? Thanks in advance Best Regards Am 09.05.2012 um 20:45 schrieb NoRulez noru...@me.com: By the way could you try 2.8.8 instead of 2.8.7 ? Yes, I will try it tomorrow (I read the changelog http://www.cmake.org/files/v2.8/CMakeChangeLog-2.8.8 but I can't find any details where this behavior may be fixed) Because on our Buildserver CMake 2.8.7 is installed and if no relevant changes are made in 2.8.8, then I would be happy if I could retain the CMake 2.8.7 installation (Never change a running system ;-)) But I will try 2.8.8 on the workstation and send you the output from 2.8.7 (--verbose --debug). Best Regards Am 09. Mai 2012 um 11:31 schrieb Eric Noulard eric.noul...@gmail.com: 2012/5/9 noru...@me.com: Is it the case? Is there any file in _CPack_Packages\win32\NSIS\MyProject ? No, there aren't any files Could you copy/paste the exact message you get and may be running cpack on the command line with ---verbose and --debug. Sure, but I can only do so tomorrow Nope normally you don't but what are you doing in your CPackConfig.cmake.in ? I only set the CPACK variables and additional variables which are used in the NSIS.template.in file. Because if I don't use the custom CPackConfig.cmake.in file then the variables in the NSIS.template.in files aren't resolved. Please send us those files. As usual the devil may be in the details. And do you have any INSTALL(CODE or INSTALL(SCRIPTS in your project? Yes, i use this for the BundleUtilities like in the BundleUtilities example INSTALL(CODE file(GLOB_RECURSE SHARED_LIBS \\${CMAKE_INSTALL_PREFIX}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\) include(BundleUtilities) fixup_bundle(\${APPS}\ \\${SHARED_LIBS}\ \${DIRS}\) COMPONENT Runtime) I'm not a BundleUtilities user but code like that may break with CPack because CPack may internally use DESTDIR to do its local installation so that one should usually write: $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX} rather than ${CMAKE_INSTALL_PREFIX} however since you have NO file at all in the local CPack install dir, the problem is elsewhere. By the way could you try 2.8.8 instead of 2.8.7 ? -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.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 -- 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] Fwd: module and cmake
Hello Paul, I don't know about your specific find_package file for FFTW, but we do use modules together with CMake, so I'll add my thoughts: As Eric already said, the modules command alters your environment. CMake doesn't know about shell modules, but most find_package commands provide some way to tell them about the location of a package by specifying an environment variable (normally something like PACKAGE_ROOT or PACKAGE_DIR). You'll have to look in the find-package script if this is the case with your FindFFTW.cmake script. If it's not written in the documentation on top of that file, search for $ENV. If your FindFFTW3.cmake does not examine any environment variable, you should fix it in your project (and file a bug with the original project, if it's not your project). If that's not an option, it's probably best if you just set whatever variable your findFFTW3.cmake script expects as a clue as parameter to cmake (e.g. cmake .. -DFFTW3_INCLUDE_DIR=$FFTW3_ROOT/include). So in summary, you should fix your module file to provide a suitable variable pointing to your installation root, and you should also fix poorly written FindXXX.cmake scripts circulating in the wild. Somewhat off-topic, because it's got nothing to do with cmake and your specific problem: it's probably a good idea to prepend PKG_CONFIG_PATH with the pkgconfig directory of fftw. That way, autotool-based projects will be able to find it as well. Cheers, Johannes On Saturday 19 May 2012 14:42:49 Paul Anton Letnes wrote: Hi all. I am currently trying to create a more tidy CMakeLists.txt script for a simulation code I'm working on. The target platforms are mac and linux desktops (for development) and HPC [0] servers (all linux or, in some hypothetical future, unix systems). For the desktop/laptop case, it's mostly easy enough, as one installs libraries in a standard location - /opt, /usr/local, or something of that sort. On HPC servers, it is very common to install software in modules. I am not sure how well aquainted the CMake crowd is with the module system [1] so I'll post a brief explanation. HPC servers often have a large amount of users with varying requirements. Therefore, it is common to require, say, two different versions of a library, or the same library for two different compilers. As an example, a machine I'm currently using has several modules for the FFTW library. Example: paulanto@rocks:~/Rayleigh2D $ module avail fftw fftw/2.1.5 fftw/3.2.2(default) So, there's two different fftw versions available, and I'm currently using the default one as such: paulanto@rocks:~/Rayleigh2D $ module load fftw paulanto@rocks:~/Rayleigh2D $ module list Currently Loaded Modulefiles: 1) fftw/3.2.2 There we go. Now what does it mean to load a module? Well, basically, the module command works by adjusting environment variables: paulanto@rocks:~/Rayleigh2D $ module show fftw /share/apps/modulefiles/fftw/3.2.2: prepend-path CPATH /share/apps/modulessoftware/fftw/fftw-3.2.2/include prepend-path FPATH /share/apps/modulessoftware/fftw/fftw-3.2.2/include prepend-path LD_LIBRARY_PATH /share/apps/modulessoftware/fftw/fftw-3.2.2/lib prepend-path LIBRARY_PATH /share/apps/modulessoftware/fftw/fftw-3.2.2/lib We see that the fftw module sets various paths, and that these will all be different based on the exact version I'm using on the current machine. Hence, I can't tell beforehand, in my CMakeLists.txt, where to search for, say, libfftw3.a. So why am i ranting on about this? Well, basically find_package(FFTW3) does not find the fftw library, and other libraries I'm using (hdf5, mkl, ...) share the same fate. Previously I've just hand-added all sorts of include_directories and link_directories but I'm getting fed up and want to use the more elegant find_package approach, at least where possible. So, what am I asking? 1) Is there a standard way for CMake to interact with modules? 2) Is there a standard way to tell FindXXX.cmake (where XXX=fftw, hdf5, mkl, etc) where to search for libraries? 3) Can I convince CMake to include link and include directores from the environment variables, like LIBRARY_PATH, FPATH etc? 4) How do I handle LIBRARY_PATHs with multiple entries, such as this one? paulanto@rocks:~/Rayleigh2D $ echo $LIBRARY_PATH /share/apps/modulessoftware/fftw/fftw-3.2.2/lib:/share/apps/modulessoftware /hdf5/hdf-5.1.8.5-intel/lib:/share/apps/modulessoftware/openmpi/openmpi-1.4 .3-intel/lib:/share/apps/modulessoftware/intel/compilers/11.1.059/lib/intel 64:/share/apps/modulessoftware/intel/compilers/11.1.059/ipp/em64t/lib:/shar e/apps/modulessoftware/intel/compilers/11.1.059//mkl/lib/em64t:/share/apps/ modulessoftware/intel/compilers/11.1.059/tbb/intel64/cc4.1.0_libc2.4_kernel 2.6.16.21/lib Perhaps I'm not asking the right questions, but hopefully, some can tell me what I _should_ be asking. Or even better, the answer. Cheers Paul
[Cmake-commits] CMake branch, master, updated. v2.8.8-195-g4742eec
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 4742eec96a115641033662fd1594a96cea15cef7 (commit) from e2d71bb69354facbdd1df4d487ee897cecb9f30e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4742eec96a115641033662fd1594a96cea15cef7 commit 4742eec96a115641033662fd1594a96cea15cef7 Author: Kitware Robot kwro...@kitware.com AuthorDate: Sun May 20 00:01:02 2012 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Sun May 20 00:01:02 2012 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 120f2b3..6f45c4f 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_PATCH 8) -SET(CMake_VERSION_TWEAK 20120519) +SET(CMake_VERSION_TWEAK 20120520) #SET(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits