Re: [CMake] Create executable with no dynamic dependency at all
Hello So my question is how to avoid any dynamic linking at all. I found this bug report http://www.vtk.org/Bug/view.php?id=1644 that says that this has been implemented - but how? I am not sure, how you get -Wl,-Bstatic and so on. Here is how I get static executable: $ /usr/bin/c++ -O2 -fomit-frame-pointer -fPIC -s -static \ CMakeFiles/DispatcherExe.dir/DispatcherMain.cc.o \ -o DispatcherExe \ -rdynamic ../../Generic/libGeneric.a \ ../../CorbaUtil/libCorbaUtil.a -lmico2.3.13 -lmicocoss2.3.13 -lssl - lcrypto -lpthread -ldl $ ldd DispatcherExe not a dynamic executable Here is how I link it: ADD_LIBRARY(Generic STATIC ${GENERIC_SRCS}) ADD_LIBRARY(CorbaUtil STATIC ${CORBAUTIL_SRCS}) TARGET_LINK_LIBRARIES(CorbaUtil ${MICO_LIBRARY} ${MICO_COSS_LIBRARY} ssl crypto pthread dl) ADD_EXECUTABLE(DispatcherExe ${OPERDISPATCHER_SRCS}) TARGET_LINK_LIBRARIES(DispatcherExe CorbaUtil Generic) May I ask what platform you are using? I just tried the following simplest example on FreeBSD 6 and on Ubuntu 8.10. On both platforms I do not manage to get a non-dyanamic executable. How do I get the -static flag set? Regards James $ cat CMakeLists.txt add_library(mylib STATIC mylib.cpp) add_executable(static static.cpp) target_link_libraries(static mylib) $ cat mylib.h void f(); $ cat mylib.cpp #include iostream #include mylib.h void f() { std::cout mylib speaking... std::endl; } $ cat static.cpp #include mylib.h int main() { f(); return 0; } $ cmake . -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: /home/james/test/cmake $ make VERBOSE=1 /usr/local/bin/cmake -H/home/james/test/cmake -B/home/james/test/cmake --check-build-system CMakeFiles/Makefile.cmake 0 /usr/local/bin/cmake -E cmake_progress_start /home/james/test/cmake/CMakeFiles /home/james/test/cmake/CMakeFiles/progress.make make -f CMakeFiles/Makefile2 all make -f CMakeFiles/mylib.dir/build.make CMakeFiles/mylib.dir/depend cd /home/james/test/cmake /usr/local/bin/cmake -E cmake_depends Unix Makefiles /home/james/test/cmake /home/james/test/cmake /home/james/test/cmake /home/james/test/cmake /home/james/test/cmake/CMakeFiles/mylib.dir/DependInfo.cmake --color= Dependee /home/james/test/cmake/CMakeFiles/mylib.dir/DependInfo.cmake is newer than depender /home/james/test/cmake/CMakeFiles/mylib.dir/depend.internal. Scanning dependencies of target mylib make -f CMakeFiles/mylib.dir/build.make CMakeFiles/mylib.dir/build /usr/local/bin/cmake -E cmake_progress_report /home/james/test/cmake/CMakeFiles 1 [ 50%] Building CXX object CMakeFiles/mylib.dir/mylib.cpp.o /usr/bin/c++ -o CMakeFiles/mylib.dir/mylib.cpp.o -c /home/james/test/cmake/mylib.cpp Linking CXX static library libmylib.a /usr/local/bin/cmake -P CMakeFiles/mylib.dir/cmake_clean_target.cmake /usr/local/bin/cmake -E cmake_link_script CMakeFiles/mylib.dir/link.txt --verbose=1 /usr/bin/ar cr libmylib.a CMakeFiles/mylib.dir/mylib.cpp.o /usr/bin/ranlib libmylib.a /usr/local/bin/cmake -E cmake_progress_report /home/james/test/cmake/CMakeFiles 1 [ 50%] Built target mylib make -f CMakeFiles/static.dir/build.make CMakeFiles/static.dir/depend cd /home/james/test/cmake /usr/local/bin/cmake -E cmake_depends Unix Makefiles /home/james/test/cmake /home/james/test/cmake /home/james/test/cmake /home/james/test/cmake /home/james/test/cmake/CMakeFiles/static.dir/DependInfo.cmake --color= Dependee /home/james/test/cmake/CMakeFiles/static.dir/DependInfo.cmake is newer than depender /home/james/test/cmake/CMakeFiles/static.dir/depend.internal. Scanning dependencies of target static make -f CMakeFiles/static.dir/build.make CMakeFiles/static.dir/build /usr/local/bin/cmake -E cmake_progress_report /home/james/test/cmake/CMakeFiles 2 [100%] Building CXX object CMakeFiles/static.dir/static.cpp.o /usr/bin/c++ -o CMakeFiles/static.dir/static.cpp.o -c /home/james/test/cmake/static.cpp Linking CXX executable static /usr/local/bin/cmake -E cmake_link_script CMakeFiles/static.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC CMakeFiles/static.dir/static.cpp.o -o static libmylib.a /usr/local/bin/cmake -E cmake_progress_report /home/james/test/cmake/CMakeFiles 2 [100%] Built target static /usr/local/bin/cmake -E cmake_progress_start /home/james/test/cmake/CMakeFiles 0 $ ldd static static: libstdc++.so.5 = /usr/lib/libstdc++.so.5 (0x2807a000) libm.so.4 = /lib/libm.so.4 (0x28145000) libc.so.6 = /lib/libc.so.6 (0x2815b000) $ ./static mylib speaking...
Re: [CMake] foreach() bug?
Ok, thanks for the info. Can I expect this IN mode to be delivered in 2.6.5? Alexandre -Original Message- From: Brad King [mailto:brad.k...@kitware.com] alexandre.feb...@thomsonreuters.com wrote: foreach(arg ${list}) [snip] The empty element has been discarded by foreach(). Is this the wanted behaviour? If it is, how can I manage empty elements when I need them? The foreach command never even sees the empty arguments. By the time ${list} is evaluated the empty elements are gone. This is for language consistency. No one would want add_executable(myexe ${srcs}) to try to add as a source file if srcs has an empty element. In CMake HEAD from CVS there is an IN mode for foreach that supports explicitly named lists: set(my_list a;b;;c;d) foreach(arg IN LISTS my_list) ... endforeach() For now you need to use the list() command. You can iterate over a range of the list size with foreach(arg RANGE ...). -Brad This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters. ___ 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] Create executable with no dynamic dependency at all
Jean-Pierre, I set -static flag in the top level CMakeLists.txt: SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} -static) before ADD_SUBDIRECTORY. I didn't find any error in your files, I would do the same with exception to -static flag. Denis May I ask what platform you are using? I just tried the following simplest example on FreeBSD 6 and on Ubuntu 8.10. On both platforms I do not manage to get a non-dyanamic executable. How do I get the -static flag set? ___ 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] Add Project Group command
In Bugtracker http://public.kitware.com/Bug/view.php?id=3796 you could read: Groovounet: I'm so glade to see this patch coming out ... Does this mean, that this feature is now implemented (2.6.4) and, if so, exists there an example how to use it? greetings Micha ___ 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] Implicity CMAKE_CURRENT_BINARY_DIR include_directories
I'm sure I read some time about some option you could set in a CMake project that would always implicitly do include_directories(${CMAKE_CURRENT_BINARY_DIR}) in child CMakeLists.txt without the need to do so manually. Searched the documentation to no avail. Did I just imagine this option or is it there somewhere? Thanks! -- Cheers, Mike Arthur http://mikearthur.co.uk/ ___ 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] Create executable with no dynamic dependency at all
I set -static flag in the top level CMakeLists.txt: SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} -static) before ADD_SUBDIRECTORY. I now tried: set_target_properties(ui PROPERTIES LINK_FLAGS -static) This helps so that -static is used when linking. Good. Now the only problem I have is that -Wl,-Bdynamic -Wl,-rpath,/usr/local/lib is still added to the end of the linker commandline - which is a bug, since no dynamic libs are linked. Any ideas how to work-around this or how to track down why and where this empty -Wl,-Bdynamic flag is added? Thanks James May I ask what platform you are using? I just tried the following simplest example on FreeBSD 6 and on Ubuntu 8.10. On both platforms I do not manage to get a non-dyanamic executable. How do I get the -static flag set? ___ 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] Create executable with no dynamic dependency at all
James, I took a look again at our source and notices, that we set CMAKE_BUILD_TYPE to Custom, so no default options migrate into our environment. I think you receive -Wl,-Bdynamic from cmake/Modules/Platform/Linux.cmake:25: SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS -Wl,-Bdynamic) My system is Gentoo Linux. Cmake is 2.6.4. find /usr/share/cmake/Modules/Platform -type f | xargs grep -n -H '\-Wl\,\-Bdynamic' Denis Now the only problem I have is that -Wl,-Bdynamic -Wl,-rpath,/usr/local/lib is still added to the end of the linker commandline - which is a bug, since no dynamic libs are linked. Any ideas how to work-around this or how to track down why and where this empty -Wl,-Bdynamic flag is added? ___ 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] Automatic libraries stripping
Zitat von roze...@volny.cz: I would like to ask you, if (and how, if so) it is possible to set CMake to strip (/usr/bin/strip) the generated libraries. Hint: make help | grep strip HS ___ 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] Problem with cygwin and CodeSourcery's ARM Toolchain
Zitat von Thomas Kindler mail+cm...@t-kindler.de: cmake tries to use cygwin-style absolute /home/tkindler.. paths, which arm-none-eabi-gcc doesn't seem to like (being a native win32 program). My old makefile used relative paths to invoke the compiler. How can I do this in cmake generated makefiles?! Prepending c:/cygwin/ to all paths should also solve the problem. If you have a native compiler, use the native compiled cmake. If you have a compiler/tool that depends on cygwin, use the cygwin-compiled cmake. Living in both worlds (native vs. cygwin) is a major pain. Just don't. HS ___ 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] How do I generate a preprocessed file?
Hello, my problem is as follow. I have a project composed of four directories: base, io, rt and vm. The first three of them are being built in a normal way, but the last one has some fancy requirements. Namely, in the directory vm I want to generate a file called inc.cpp, which is composed of all the header files from base, io and rt, preprocessed by the C++ compiler. So, in vm/CMakeLists.txt I specify: ADD_DEFINITIONS(-DCONFIG_BUILDING_VM) ADD_LIBRARY(vm SHARED inc.cpp) Next, I indicate that inc.cpp is generated: SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/inc.cpp PROPERTIES GENERATED 1) Then I create a list of all the header files of interest: FILE( GLOB _runtime_header_list RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/base/*.h ${PROJECT_SOURCE_DIR}/io/*.h ${PROJECT_SOURCE_DIR}/rt/*.h) And specify a command to generate the file: ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/inc.cpp COMMAND YYY inc.cpp DEPENDS ${_runtime_header_list} ) but what shoud YYY be in order to achieve the following goal: 1. all the entries from _runtime_header_list are enumerated and a single temporary file t1.cpp is created as follows: #include entry_1 #include entry_2 ... #include entry_n 2. t1 is sent to the C++ compiler (with all its options, definitions and include paths set as for a normal build), but for preprocessing stage only (i.e. g++ -E). The resulting C++ file is my inc.cpp. How can I achieve that goal using CMake? Of course it doesn't need to be done the way I specified above, as I am pretty new to CMake. A functional equivalent is all what I need, in particular I don't need t1.cpp. Best regards Piotr Wyderski ___ 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] find_libary
If I use FIND_LIBRARY(_result name1), I have a strange effect, which I do not understand. E.g FIND_LIBRARY(_result tiff) works as it should. FIND_LIBRARY(_result gs) fails. An inspection with nautilus shows libgs.so is located in /usr/lib. glib, fontconfig, pango etc. could be found. graph, gsm, glitz-glx not. (All in /usr/lib) What is the criteria that FIND_LIBRARY can find a library? Micha ___ 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] Problem with cygwin and CodeSourcery's ARM Toolchain
Hendrik Sattler wrote: Zitat von Thomas Kindler mail+cm...@t-kindler.de: cmake tries to use cygwin-style absolute /home/tkindler.. paths, which arm-none-eabi-gcc doesn't seem to like (being a native win32 program). My old makefile used relative paths to invoke the compiler. How can I do this in cmake generated makefiles?! Prepending c:/cygwin/ to all paths should also solve the problem. If you have a native compiler, use the native compiled cmake. If you have a compiler/tool that depends on cygwin, use the cygwin-compiled cmake. Living in both worlds (native vs. cygwin) is a major pain. Just don't. Ok.. that part seems to work after installing the native windows cmake. The resulting binary is still not usable -- cmake inserts an -fPIC linker flag. arm-none-eabi-gcc.exe -fPIC $(stm32test_OBJECTS) [..] How can I switch that off? I also need to specify a special linker script for my target. In my plain old makefile I just added -Tstm32f10x.ld to my linker command line. What's the official cmake way to add custom linker flags?! Adding it to target_link_libraries( .. ) seems to work, but feels wrong. Also: Right now, I have to invoke cmake by this lengthy command: cmake -DCMAKE_TOOLCHAIN_FILE=CodeSourcery.cmake -GUnix Makefiles . when compiling the project for the first time. How can I specify a default toolchain and generator in the CMakeLists.txt itself? -- Dipl.-Inform. Thomas Kindler mail+cm...@t-kindler.de Zuse, Zuse sprach die Tante, als das Rechenzimmer brannte ___ 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] Problem with cygwin and CodeSourcery's ARM Toolchain
Am Donnerstag 07 Mai 2009 18:15:40 schrieb Thomas Kindler: Hendrik Sattler wrote: Zitat von Thomas Kindler mail+cm...@t-kindler.de: cmake tries to use cygwin-style absolute /home/tkindler.. paths, which arm-none-eabi-gcc doesn't seem to like (being a native win32 program). My old makefile used relative paths to invoke the compiler. How can I do this in cmake generated makefiles?! Prepending c:/cygwin/ to all paths should also solve the problem. If you have a native compiler, use the native compiled cmake. If you have a compiler/tool that depends on cygwin, use the cygwin-compiled cmake. Living in both worlds (native vs. cygwin) is a major pain. Just don't. Ok.. that part seems to work after installing the native windows cmake. The resulting binary is still not usable -- cmake inserts an -fPIC linker flag. arm-none-eabi-gcc.exe -fPIC $(stm32test_OBJECTS) [..] How can I switch that off? $ cmake --help-property ENABLE_EXPORTS [...] ENABLE_EXPORTS Specify whether an executable exports symbols for loadable modules. Normally an executable does not export any symbols because it is the final program. It is possible for an executable to export symbols to be used by loadable modules. When this property is set to true CMake will allow other targets to link to the executable with the TARGET_LINK_LIBRARIES command. On all platforms a target-level dependency on the executable is created for targets that link to it. For non-DLL platforms the link rule is simply ignored since the dynamic loader will automatically bind symbols when the module is loaded. For DLL platforms an import library will be created for the exported symbols and then used for linking. All Windows-based systems including Cygwin are DLL platforms. I guess that the default is true, contrary to the help message. I think this is a bug. Setting it to false should get rid of the -fPIC, maybe. I also need to specify a special linker script for my target. In my plain old makefile I just added -Tstm32f10x.ld to my linker command line. Use the LINK_FLAGS/LINK_FLAGS_CONFIG target properties. Or actually better, this obviously belongs to the toolchain file. Try SET ( CMAKE_EXE_LINKER_FLAGS_INIT -T/an/absolute/path/to/stm32f10x.ld ) And yes, the path must be absolute. What's the official cmake way to add custom linker flags?! Adding it to target_link_libraries( .. ) seems to work, but feels wrong. Also: Right now, I have to invoke cmake by this lengthy command: cmake -DCMAKE_TOOLCHAIN_FILE=CodeSourcery.cmake -GUnix Makefiles . when compiling the project for the first time. How can I specify a default toolchain and generator in the CMakeLists.txt itself? No. But you can write a small batch file and give it a good name. Good old methods never die. HS ___ 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 Solaris 10
Hello, i cant find any workaround for compiling cmake under solaris 10. I just saw threads or mails to the list regarding my problem compiling cmake on solaris 10 where there is the problem with the static linked library. (libcmsys.a) I´d be open for any solution. Regards Oliver -- Oliver Trebbe Department of Neurology University of Muenster 48129 Muenster, Germany ___ 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] FindQt4.cmake returns too much irrelevant information
I have just discovered that for -DCMAKE_BUILD_TYPE=Debug, the combination of FindQt4.cmake and UseQt4.cmake inserts the keywords debug, optimized, AND general into the QT_LIBRARIES list to divide the list into three sections. But only the debug section of that list is used by target_link_libraries for the -DCMAKE_BUILD_TYPE=Debug case. Could we have a cleaner design that doesn't specify the target_link_libraries keywords and which simply returns in QT_LIBRARIES whatever is relevant for the CMAKE_BUILD_TYPE that is specified? A clean design matters in a practical sense because QT_LIBRARIES has other uses than just for target_link_libraries. For example, in PLplot, we use QT_LIBRARIES to configure a *.pc file containing pkg-config information for PLplot users. Therefore, I am going to have to write a parsing routine to dump all the irrelevant information from QT_LIBRARIES for whatever CMAKE_BUILD_TYPE is specified. I am stuck with this task regardless since some of our users still have cmake-2.6.0. Neverthess, I thought I would plea for a clean design of the combination of FindQt4.cmake and UseQt4.cmake here for the ultimate benefit of users of later CMake versions. 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 __ ___ 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 RPM problems
2009/5/7 Florent Lagaye florent.lag...@inrialpes.fr: Florent, Try not to drop CMake ML when answering. Eric Noulard a écrit : Could you explain us (or point the appropriate documentation) on how the freedesktop file should work? Freedesktop is The standard used by gnome and kde to specify desktop entries which in fact are application launchers. That's why when you install a KDE app, the menu entry is also present in gnome menus. http://standards.freedesktop.org/desktop-entry-spec/latest/index.html OK I'll read this. - How can I tell CPack to put instruction to create and associate new mime-types ? For mime-types and icons I got a little further. The icon is in data_dir/share/icons/hicolor/scalable/apps/v4d.svg I built an xml file according to : http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html The file is in data_dir/share/mime/packages/viewer4d.mime.xml Now I should add in the RPM SPEC file the three commands needed to update the desktop database (update-desktop-database as root), the mime (update-mime-database) database and the icon database (gtk-update-icon-cache) in the %post and %postun sections. Would CPack allow to use a template SPEC file, which it would fill (much more like UseRpmTools), instead of creating a plain new one from scratch each time ? CPackRPM should be able to work with a custom spec file, SET(CPACK_RPM_USER_BINARY_SPECFILE your_custom.spec) The specified file will be CONFIGURE_FILE( ... @ONLY) the current state of the feature is not tested, thus most probably not working :-) I should have time tomorrow for working on this, what I'll most probably be doing is to offer two ways to do this: 1) Add more CPACK_RPM_XXX specific var such like: CPACK_RPM_POST_INSTALL_SCRIPT_FILE CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE which may be used to specify the corresponding scripts that will be embedded in the generated spec file. 2) Effectively support the custom spec file usage. I'd like to support both because it's not that intuitive to write a proper spec file which works with CPack because it's a kind of short-cutted one. Have a look of the spec file currently generated and you'll see. (no %prep, %build nor %install sections). -- Erk ___ 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 Solaris 10
Oliver Trebbe wrote: Hello, i cant find any workaround for compiling cmake under solaris 10. I just saw threads or mails to the list regarding my problem compiling cmake on solaris 10 where there is the problem with the static linked library. (libcmsys.a) I´d be open for any solution. The only problem that was reported was if you did an in-source build twice it breaks. So, what is the exact error you are getting? Also, did you do an out of source build? What version of CMake are you building? -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
Re: [CMake] FindQt4.cmake returns too much irrelevant information
Alan W. Irwin schrieb: I have just discovered that for -DCMAKE_BUILD_TYPE=Debug, the combination of FindQt4.cmake and UseQt4.cmake inserts the keywords debug, optimized, AND general into the QT_LIBRARIES list to divide the list into three sections. But only the debug section of that list is used by target_link_libraries for the -DCMAKE_BUILD_TYPE=Debug case. Could we have a cleaner design that doesn't specify the target_link_libraries keywords and which simply returns in QT_LIBRARIES whatever is relevant for the CMAKE_BUILD_TYPE that is specified? CMAKE_BUILD_TYPE is not set for MSVC and other IDE generators so this will not work. This would also mean that you can't change the buildtype without doing a complete research of the existing libraries. And CMAKE_BUILD_TYPE isn't use for some generators + is not set when you run cmake on a clean builddir without any options. Christian ___ 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] Have make clean run a script?
In addition to deleting files, is it possible to get the generated clean target to run a script? I want to do everything make clean does but also insert a call to a sanity script. thanks b. ___ 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] Multiple calls to PROJECT() not diagnosed [was:2.6.4 add_subdirectory with same argument broken?]
Hello Brad, Brad King wrote: Carsten Neumann wrote: It does so by performing multiple passes over the source tree [snip] This all works fine with cmake 2.6.x (x 4), but the latest version complains in the OSGSETUP pass on the first call to ADD_SUBDIRECTORY in that pass (see attachment for more details): [snip] Is this intended behavior, should I file a bug report, any ideas how to make this or something similar work again? Adding the same build directory multiple times even from the same source tree is not allowed, but was not enforced until now. When you did this before CMake would generate the build files over and over again. It just happened that the last time wrote the files you want. ok, thanks for the clarification. I suggest moving the meta-information into a separate file in each subdirectory which you can load with a normal include() command. Then you only need to add each subdirectory once. yes, I did something along those lines to fix the build. While doing so I noticed that when INCLUDEing the per-library files into the top level CMakeLists.txt essentially PROJECT() was called more than once for the same directory, which generated a broken solution file for VS 2005/8. I opened feature request 8984 asking for PROJECT() to detect and error out in this case. Thanks and kind regards, Carsten ___ 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] FindQt4.cmake returns too much irrelevant information
On 2009-05-07 22:45+0200 Christian Ehrlicher wrote: Alan W. Irwin schrieb: I have just discovered that for -DCMAKE_BUILD_TYPE=Debug, the combination of FindQt4.cmake and UseQt4.cmake inserts the keywords debug, optimized, AND general into the QT_LIBRARIES list to divide the list into three sections. But only the debug section of that list is used by target_link_libraries for the -DCMAKE_BUILD_TYPE=Debug case. Could we have a cleaner design that doesn't specify the target_link_libraries keywords and which simply returns in QT_LIBRARIES whatever is relevant for the CMAKE_BUILD_TYPE that is specified? CMAKE_BUILD_TYPE is not set for MSVC and other IDE generators so this will not work. I thought that was a good argument at first, but when I looked deeper it turns out not to be relevant to this particular case since the setting of the debug and optimized keywords in FindQt4.cmake occurs inside a IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) logic block. This would also mean that you can't change the buildtype without doing a complete research of the existing libraries. I think that should be FindQt.cmake's job (i.e., return the correct library results depending on whether and how CMAKE_BUILD_TYPE is set). I think it should be straightforward to avoid re-searching the libraries each time. (Get cached library search results and return what is relevant depending on CMAKE_BUILD_TYPE.) Or did you mean something else? And CMAKE_BUILD_TYPE isn't use for some generators + is not set when you run cmake on a clean builddir without any options. Actually, I have no complaints about FindQt4.cmake when CMAKE_BUILD_TYPE is _not_ set. But I do think it is a good idea to provide clean results when CMAKE_BUILD_TYPE _is_ specified rather than a messy combination of everything that _might_ be relevant. 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 __ ___ 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