[CMake] Missing DLLs with CPack 2.8 on MSVC 10 beta 2
Hello, Currently we are experimenting with CMake 2.8 and MSVC 10 (beta 2). I belief that with CPack and MSVC 9.0 packed the DLL-files that resided in the redist directory (C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT) were packed together with the compiled binaries. When using CPack and MSVC 10 (beta 2), the redist DLLs in (C:\Program Files\Microsoft Visual Studio 10.0\VC\redist\x86\Microsoft.VC100.CRT) are not packed with the compiled binaries. In order to use CPack to create self contained distributable with MSVC 10, do I need to set a variable, incorporate the files myself (e.g. during install), or do something else? Any help would be appreciated. Kind Regards, Frank Stappers ___ 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] Missing DLLs with CPack 2.8 on MSVC 10 beta 2
Frank Stappers wrote: Hello, Currently we are experimenting with CMake 2.8 and MSVC 10 (beta 2). I belief that with CPack and MSVC 9.0 packed the DLL-files that resided in the redist directory (C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT) were packed together with the compiled binaries. When using CPack and MSVC 10 (beta 2), the redist DLLs in (C:\Program Files\Microsoft Visual Studio 10.0\VC\redist\x86\Microsoft.VC100.CRT) are not packed with the compiled binaries. In order to use CPack to create self contained distributable with MSVC 10, do I need to set a variable, incorporate the files myself (e.g. during install), or do something else? Any help would be appreciated. Modules/InstallRequiredSystemLibraries.cmake needs to be updated to handle VS 10. Please create a bug report. -Bill ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Mac and Win32 bundling
Hi my name is Filip Wänström and I'm new to this list. I have recently(a few months) started to use CMake for all my building. I find that it works well in most cases and probably is the best alternative on the market. Anyway, I like to stay cross platform for my projects so I personally develop on a Mac but mostly deliver on win32. Building works fine for me (using Makefile gen for mac and VS for win) but I have huge problems with the bundling process. On the Mac I want to deliver an app using regular drag and drop as a self contained bundle and on windows I want to deliver an installer. I have managed to get a win32 installer working using the NSIS facilities but it took a lot of extra scripting. On the Mac I have been able to create the dragndrop bundle installer but it doesn't really work. I assume there are some issues with rpath/loader_path/executable_path. For reference the app is an Openscenegraph app that is dependant on quite a few libraries that need to be bundled as dll:s on win and dylibs/.so on mac. The question is: what is the current best practices approaches on these platforms? I have found no complete examples. Finally: parts of my cmake test case for win32: THis works fine and creates a usable app that bundles the osg libs as well as a plugin and data. It just doesn't feel very neat for being user code. #Basic app test (packaging exercise) SET(TARGET_BASIC_APP_SRC BasicApp.cpp BasicAppMain.cpp) ADD_EXECUTABLE(BasicApp ${TARGET_BASIC_APP_SRC} ) TARGET_LINK_LIBRARIES(BasicApp ${MY_COMMON_LIBS}) IF(WIN32 AND NOT UNIX) SET(CPACK_GENERATOR NSIS) INSTALL( TARGETS BasicApp DESTINATION bin ) SET(OSG_DLL_DIR $ENV{OSG_ROOT}\\bin) FILE(TO_CMAKE_PATH ${OSG_DLL_DIR} OSG_DLL_DIR_CPATH) SET(CMAKE_INSTALL_DEBUG_LIBRARIES) INCLUDE(InstallRequiredSystemLibraries) SET(CPACK_PACKAGE_EXECUTABLES BasicApp Basic App) CONFIGURE_FILE( ${CMAKE_MODULE_PATH}/dependencies.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake @ONLY ) INSTALL(CODE set(input_file \\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/BasicApp.exe \)) INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake) SET(OSG_PLUGINS_DIR ${OSG_DLL_DIR_CPATH}/osgPlugins-${OPENSCENEGRAPH_VERSION}) MESSAGE(Installing plugins from: ${OSG_PLUGINS_DIR}) # Extra plugin installs that the dependency checker can't find INSTALL( FILES ${OSG_PLUGINS_DIR}/osgdb_obj.dll DESTINATION bin) # Install data that uses (at runtime) the plugin above INSTALL(FILES ${Dope_SOURCE_DIR}/data/models/clogo.obj ${Dope_SOURCE_DIR}/data/models/clogo.mtl DESTINATION data/models) # Create shortcuts usin NSIS commands SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS CreateShortCut '$INSTDIRshortcut.lnk' '$INSTDIRbinBasicApp.exe' ) # Install vc90 sp1 redist # windows update broke a lot of things so lets add an vcdist dependant installer INSTALL(FILES ${Dope_SOURCE_DIR}/external/win32_vc9/win_extras/vcredist_x86.exe DESTINATION win32_extras/) SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS ExecWait '$INSTDIRwin32_extrasvcredist_x86.exe') ENDIF(WIN32 AND NOT UNIX) # dependcies.cmake.in is: if(NOT DEFINED input_file) message(FATAL_ERROR input file is not defined) endif(NOT DEFINED input_file) message(Using ${input_file}) INCLUDE(GetPrerequisites) GET_PREREQUISITES(${input_file} DEPENDENCIES 1 1 ) FOREACH(DEPENDENCY ${DEPENDENCIES}) MESSAGE(DEPENDENCY: ${DEPENDENCY}) GET_FILENAME_COMPONENT(DEPENDENCY_NAME ${DEPENDENCY} NAME) GET_FILENAME_COMPONENT(DEPENDENCY_ACTUAL ${DEPENDENCY} REALPATH) MESSAGE(DEPENDENCY_NAME: ${DEPENDENCY_NAME}) MESSAGE(DEPENDENCY_ACTUAL: ${DEPENDENCY_ACTUAL}) FIND_FILE(${DEPENDENCY_NAME}_REAL_PATH ${DEPENDENCY_NAME} ) MESSAGE(DEPENDENCY_REAL_PATH: ${${DEPENDENCY_NAME}_REAL_PATH}) MESSAGE(installing into: ${CMAKE_INSTALL_PREFIX}/bin) FILE(COPY ${${DEPENDENCY_NAME}_REAL_PATH} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) #INSTALL(FILES ${DEPENDENCY_REAL_PATH} DESTINATION bin) ENDFOREACH() On the mac, I don't have any working code yet. I feel that I am close, but as it is, the code cannot load the right plugin IF (APPLE) SET(MACOSX_BUNDLE_INFO_STRING MACOSX_BUNDLE_INFO_STRING) SET(MACOSX_BUNDLE_ICON_FILE ) SET(MACOSX_BUNDLE_GUI_IDENTIFIER BasicAppGuiId) SET(MACOSX_BUNDLE_LONG_VERSION_STRING long ver string) SET(MACOSX_BUNDLE_BUNDLE_NAME BasicAPpBundleName) SET(MACOSX_BUNDLE_SHORT_VERSION_STRING short ver) # setup the bundle SET(BasicApp_BUNDLE_NAME BasicApp)
[CMake] enable_language( ... OPTIONAL) causes error or second cmake run
Hi all, I've been experimenting a bit with enable_language() and stumbled upon what I think is a bug. I have wanted to know how to properly handle a missing Fortran compiler. So, on a system without a working Fortran compiler I ran cmake twice. In the first cmake run, the Fortran compiler is searched and not found. However, the second run of cmake then causes an error, which IMHO should not happen. This happens with CMake 2.6.2 and 2.8.0 $ cat ../CMakeLists.txt project(Dummy) cmake_minimum_required(VERSION 2.6) enable_language(Fortran OPTIONAL) $ 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 -- The Fortran compiler identification is unknown -- Configuring done -- Generating done -- Build files have been written to: /tmp/loose/cmake/build $ cmake .. -- The Fortran compiler identification is unknown CMake Error at /dop131_0/loose/x86_64-linux/usr/share/cmake-2.8/Modules/CMakeFortranInformation.cmake:25 (GET_FILENAME_COMPONENT): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): CMakeLists.txt:3 (enable_language) -- Configuring incomplete, errors occurred! Best regards, Marcel Loose. ___ 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] Eclipse CDT 4.0 + CMake (2.8.0)
Hi to all, i recently start using eclipse in our project and am very happy how it works with the CMake Eclipse CDT 4.0 generator. Unfortunately, every time i recall cmake it writes the .project (+.cproject) file for eclipse and overwrites my personal settings within that file prior set, like when i set extra make parameters (../gmake -j X -k). It is kind of annoying since i have to call it every now and then and must reset those settings. I thought about writing my own script which is called after cmake and retains those settings but i figured it could be something cmake does. Maybe i overlooked a special flag i must set for cmake to keep certain settings in the project file if it already exsists but i haven't found anything related to my problem in the internetz. You could discuss if its something, eclipse shouldnt store in the project file to begin with, but i would like to have a workaround. Any help would be appreciated and thank you in advanced. -- Mit freundlichen Grüßen / Kind regards, Peter Kluger ___ Kluger Peter DevelopmentSIMPACK AG Phone: + 49 8105 77266-62 Friedrichshafener Strasse 1 Fax:+ 49 8105 77266-11 82205 Gilching, Germany E-Mail: peter.klu...@simpack.dei...@simpack.de Web:www.simpack.com Simulation Software SIMPACK - Consulting - Training ___ Executive Board: Dr. Alexander Eichberger, Dr. Lutz Mauer; Chair of Supervisory Board: Silvia Förster (CPA); Commercial Register München HRB 181 229 ___ 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 / UNC and long path
Hi there, Does anyone knows how to create a directory on Win32 system ? I tried: http://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/11/CMakeLists.txt But it fails on my WinXP 32bits system. Suggestion *very* welcome Thanks, -- Mathieu ___ 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] Eclipse CDT 4.0 + CMake (2.8.0)
You may want to try option #2 from the following page: http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial This would solve your problem as the .project and .cproject files are never actually generated. It is up to you to generate those files. But this means that you can customize the project in any way you would like and CMake will never mess with those files. I personally use this technique on a daily basis and it seems to work very well. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Nov 24, 2009, at 10:00 AM, Peter Kluger wrote: Hi to all, i recently start using eclipse in our project and am very happy how it works with the CMake Eclipse CDT 4.0 generator. Unfortunately, every time i recall cmake it writes the .project (+.cproject) file for eclipse and overwrites my personal settings within that file prior set, like when i set extra make parameters (../gmake -j X -k). It is kind of annoying since i have to call it every now and then and must reset those settings. I thought about writing my own script which is called after cmake and retains those settings but i figured it could be something cmake does. Maybe i overlooked a special flag i must set for cmake to keep certain settings in the project file if it already exsists but i haven't found anything related to my problem in the internetz. You could discuss if its something, eclipse shouldnt store in the project file to begin with, but i would like to have a workaround. Any help would be appreciated and thank you in advanced. -- Mit freundlichen Grüßen / Kind regards, Peter Kluger ___ Kluger Peter DevelopmentSIMPACK AG Phone: + 49 8105 77266-62 Friedrichshafener Strasse 1 Fax:+ 49 8105 77266-11 82205 Gilching, Germany E-Mail: peter.klu...@simpack.dei...@simpack.de Web:www.simpack.com Simulation Software SIMPACK - Consulting - Training ___ Executive Board: Dr. Alexander Eichberger, Dr. Lutz Mauer; Chair of Supervisory Board: Silvia Förster (CPA); Commercial Register München HRB 181 229 ___ 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
[CMake] problem about Fortran and C mixing
Hi all, I have decided to mix Fortran with C, due to a library that only has C interface. Here is the scienario: suppose there are several programs, file1.f90, file2.f90, file3.c and a C library lib. 1. file1.f90 calls file2.f90 to generate a executable 2. file2.f90 calls file3.c to generate a module mod 3. file3.c calls lib so how to setup CMakeLists.txt? Thanks for Help! Best regards, DONG Li ___ 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 / UNC and long path
On Tue, Nov 24, 2009 at 04:15:18PM +0100, Mathieu Malaterre wrote: Does anyone knows how to create a directory on Win32 system ? I tried: http://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/11/CMakeLists.txt But it fails on my WinXP 32bits system. Use execute_process() or a custom_command with 'cmake -E make_directory'. However if you're running into a limitation of 32-bit xp or whatever filesystem you're using, CMake isn't going to be able to help you. tyler ___ 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] set_target_properties - compile flags problem II
On Sat, Nov 21, 2009 at 12:08:38PM +0100, Sören Freudiger wrote: Okay, after using google again I figured out that unlike LINK_FLAGS_CONFIG the COMPILE_FLAG property does not support COMPILE_FLAG_CONFIG. Looks like Philip suggested a patch from the bug tracker. Did you try it out? Changing the global CMAKE_CXX_FLAGS_CONFIG for that purpose is not an option because I need different flags for different project and different configurations. I believe the value of CMAKE_CXX_FLAGS* is read each time you add a target. So use something like this: set (CMAKE_CXX_FLAGS_DEBUG_ORIG ${CMAKE_CXX_FLAGS_DEBUG}) set (CMAKE_CXX_FLAGS_DEBUG myflag1) add_library(mylib1 ...) set (CMAKE_CXX_FLAGS_DEBUG myflag2) add_library(mylib2 ...) set (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_ORIG}) tyler ___ 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 / UNC and long path
On Tue, Nov 24, 2009 at 4:22 PM, Tyler Roscoe ty...@cryptio.net wrote: On Tue, Nov 24, 2009 at 04:15:18PM +0100, Mathieu Malaterre wrote: Does anyone knows how to create a directory on Win32 system ? I tried: http://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/11/CMakeLists.txt But it fails on my WinXP 32bits system. Use execute_process() or a custom_command with 'cmake -E make_directory'. However if you're running into a limitation of 32-bit xp or whatever filesystem you're using, CMake isn't going to be able to help you. I have not tried, but just from a CMake design point of view I /would/ think that cmake -E make_directory is identical to calling file(MAKE_DIRECTORY ...). I think they share the same code base. Did you try on your system and one is working but not the other ? Thanks, -- Mathieu ___ 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] setting CMAKE_BINARY_DIR has no effect
command line cmake (2.6.4) is always putting the generated build files under the current working directory from which cmake is executed, regardless of the value of CMAKE_BINARY_DIR. I have this directory tree; the names are symbolic, not absolute: parent (current working dir) | | top-level-cmake (project root contains top-level CMakeLists.txt) I execute this command from within parent: cmake.exe -G Visual Studio 8 2005 \ -C top-level-cmake\init_cache.txt top-level-cmake The file init_cache.txt contains the command: set (CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR}/top-level-cmake CACHE STRING FORCE) The value of CMAKE_BINARY_DIR before the set command is 'parent' The value of CMAKE_BINARY_DIR after the set command is 'parent/top-level-cmake' cmake executes and finishes with the output: -- Build files have been written to: parent I have also tried setting the values for CMAKE_SOURCE_DIR, PROJECT_SOURCE_DIR, PROJECT_BINARY_DIR in various combinations, but with no effect. I have read the 2.6 manpage, the cmake wiki and several mailing list postings, but I have not found a solution to this problem. This is important to us because we want to evolve our workflow so that cmake is executed from within another build script. Thanks, Shane Voisard ___ 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] setting CMAKE_BINARY_DIR has no effect
You can't set any of those variables. They are all determined by CMake. The CMAKE_BINARY_DIR is the current working directory when you run cmake or ccmake for the very first time. Or, if you are running cmake-gui, you can set it to a value before the first configure. After that, it is set in stone for that build tree and cannot be set like other cmake variables. Same for all _BINARY_DIR and _SOURCE_DIR variables. They are calculated and should never be set. HTH, David On Tue, Nov 24, 2009 at 12:24 PM, Voisard, Shane S CIV NSWCDD, K54 christopher.vois...@navy.mil wrote: command line cmake (2.6.4) is always putting the generated build files under the current working directory from which cmake is executed, regardless of the value of CMAKE_BINARY_DIR. I have this directory tree; the names are symbolic, not absolute: parent (current working dir) | | top-level-cmake (project root contains top-level CMakeLists.txt) I execute this command from within parent: cmake.exe -G Visual Studio 8 2005 \ -C top-level-cmake\init_cache.txt top-level-cmake The file init_cache.txt contains the command: set (CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR}/top-level-cmake CACHE STRING FORCE) The value of CMAKE_BINARY_DIR before the set command is 'parent' The value of CMAKE_BINARY_DIR after the set command is 'parent/top-level-cmake' cmake executes and finishes with the output: -- Build files have been written to: parent I have also tried setting the values for CMAKE_SOURCE_DIR, PROJECT_SOURCE_DIR, PROJECT_BINARY_DIR in various combinations, but with no effect. I have read the 2.6 manpage, the cmake wiki and several mailing list postings, but I have not found a solution to this problem. This is important to us because we want to evolve our workflow so that cmake is executed from within another build script. Thanks, Shane Voisard ___ 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
[CMake] Cmake support for Csharp?
Hello, any advice would be greatly appreciated. This question appears to have asked in the past. Has there been any new development in support for csharp? I have a project that is a mix of C, C++, and Csharp, and I would like to manage all builds from one tool: cmake. Your answers would be much appreciated. Thank you. Joe Sarbak This E-Mail (including any attachments) may contain privileged or confidential information. It is intended only for the addressee(s) indicated above. The sender does not waive any of its rights, privileges or other protections respecting this information. Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited. If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately. This E-Mail (including any attachments) has been scanned for viruses. It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened. However, it is the responsibility of the recipient to ensure that it is virus free. The sender accepts no responsibility for any loss or damage arising in any way from its use. E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel. Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information. IRS CIRCULAR 230 NOTICE: TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVISE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER. ___ 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 support for Csharp?
There has not been anything done in CMake itself related to C# development. I'm biased against putting in partial support for it without full blown generated *.csproj files that support resources, .NET strong name signatures, and everything, so it's a significant chunk of dev work. However, CMake is very good at building things via custom commands, and the C# compiler is pretty easy to get working with CMake custom commands. If you need something in the very short term, I'd recommend using custom commands. If you have a longer time frame and funding to make it happen, please contact me off-list for possible contractual arrangement to add C# support to CMake according to your schedule and funding ability. HTH, David Cole Kitware, Inc. On Tue, Nov 24, 2009 at 12:35 PM, Sarbak, Joseph joseph.sar...@rbccm.comwrote: Hello, any advice would be greatly appreciated. This question appears to have asked in the past. Has there been any new development in support for csharp? I have a project that is a mix of C, C++, and Csharp, and I would like to manage all builds from one tool: cmake. Your answers would be much appreciated. Thank you. Joe Sarbak This E-Mail (including any attachments) may contain privileged or confidential information. It is intended only for the addressee(s) indicated above. The sender does not waive any of its rights, privileges or other protections respecting this information. Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited. If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately. This E-Mail (including any attachments) has been scanned for viruses. It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened. However, it is the responsibility of the recipient to ensure that it is virus free. The sender accepts no responsibility for any loss or damage arising in any way from its use. E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel. Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information. IRS CIRCULAR 230 NOTICE: TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVISE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER. ___ 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] portable linux binaries?
On Tuesday 24 November 2009, j s wrote: The most interesting thing is to be able to set the relative RPATH. Is there a way to do this for a normal build, and not the install target? I never use the install target for my project, but I'd like to be able to set the relative path to my own copy of libstdc++. All of the RPATH settings in the man page for cmake 2.4 seem to be in terms of INSTALL. I think you can set the rpath relative to the containing ELF file using $ORIGIN in the path. If you want to build directly with the install (or custom) rpath, you can set BUILD_WITH_INSTALL_RPATH to TRUE and then set INSTALL_RPATH as you like. Alex ___ 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] enable_language( ... OPTIONAL) causes error or second cmake run
On Tuesday 24 November 2009, Marcel Loose wrote: Hi all, I've been experimenting a bit with enable_language() and stumbled upon what I think is a bug. Yes: http://public.kitware.com/Bug/view.php?id=9220 It's not trivial to make it work. Alex ___ 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] Parallel builds and Eclipse CDT4 generator
On Thursday 12 March 2009, Michael Jackson wrote: I think that is a CDT 5.x thing, I think. I have it on my CDT 5.x installation but didn't remember having it on CDT 4. If there is a way to set that checkbox during the CDT project file generation then CDT will figure out how many compile threads to use. Here is a screen shot from my installation: What effect does this checkbox have on the project files (.project and .cproject), i.e. how is this information stored in them ? Also, does optimal mean it will run make -j or will eclipse try to determine how many cores there are and then run make -j X ? Also, it would be nice if you could put this in the cmake bug tracker. Alex ___ 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] Eclipse CDT 4.0 + CMake (2.8.0)
On Tuesday 24 November 2009, Peter Kluger wrote: Hi to all, i recently start using eclipse in our project and am very happy how it works with the CMake Eclipse CDT 4.0 generator. Unfortunately, every time i recall cmake it writes the .project (+.cproject) file for eclipse and overwrites my personal settings within that file prior set, like when i set extra make parameters (../gmake -j X -k). Please put this as a feature request in the bugtracker. Alex ___ 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] Getting cmake to apply patches
So I am trying to get CMake to apply patches to third party source. First off can someone confirm (, I'm hoping I haven't missed the obvoius) that there isn't an inbuilt command to apply unified diffs. Secondly can anyone tell me how to stop CMake consuming the -i in following command: cmake -E netgen patch -p0 -i netgen-4.9.11.patch At the moment I am trying to achieve this on Windows Vista. Ta. ___ 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] search default paths BEFORE custom paths
I'm using CMAKE_PREFIX_PATH to specify some custom search paths. How can I make cmake search its default paths BEFORE searching my custom paths?___ 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] search default paths BEFORE custom paths
On 2009-11-24 13:04-0800 Kenneth Riddile wrote: I'm using CMAKE_PREFIX_PATH to specify some custom search paths. How can I make cmake search its default paths BEFORE searching my custom paths? Call FIND twice. The first time use NO_DEFAULT_PATH. 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] Getting cmake to apply patches
2009/11/24 Hugh Sorby h.so...@auckland.ac.nz: So I am trying to get CMake to apply patches to third party source. First off can someone confirm (, I'm hoping I haven't missed the obvoius) that there isn't an inbuilt command to apply unified diffs. Secondly can anyone tell me how to stop CMake consuming the -i in following command: cmake -E netgen patch -p0 -i netgen-4.9.11.patch I cannot understand that cmake -E syntax? Is supposed to apply netgen-4.9.11.patch patch file on the netgen source tree? -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] portable linux binaries?
Thanks, that should work. Regards, Juan 2009/11/24 Alexander Neundorf a.neundorf-w...@gmx.net On Tuesday 24 November 2009, j s wrote: The most interesting thing is to be able to set the relative RPATH. Is there a way to do this for a normal build, and not the install target? I never use the install target for my project, but I'd like to be able to set the relative path to my own copy of libstdc++. All of the RPATH settings in the man page for cmake 2.4 seem to be in terms of INSTALL. I think you can set the rpath relative to the containing ELF file using $ORIGIN in the path. If you want to build directly with the install (or custom) rpath, you can set BUILD_WITH_INSTALL_RPATH to TRUE and then set INSTALL_RPATH as you like. Alex ___ 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] Getting cmake to apply patches
Sorry about that missed a chdir should be cmake -E chdir netgen patch -p0 -i netgen-4.9.11.patch from following the documentation: cmake -E chdir dir cmd [args]... Eric Noulard wrote: 2009/11/24 Hugh Sorby h.so...@auckland.ac.nz: So I am trying to get CMake to apply patches to third party source. First off can someone confirm (, I'm hoping I haven't missed the obvoius) that there isn't an inbuilt command to apply unified diffs. Secondly can anyone tell me how to stop CMake consuming the -i in following command: cmake -E netgen patch -p0 -i netgen-4.9.11.patch I cannot understand that cmake -E syntax? Is supposed to apply netgen-4.9.11.patch patch file on the netgen source tree? ___ 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] non-set-able variables
I made my parent script cd into my binary_dir, execute (the command-line) cmake from there and all is well . except for another set command (in the top-level CMakeLists.txt) that is no longer effective: set (CMAKE_CONFIGURATION_TYPES Release CACHE STRING FORCE) I tried this alternative, with no effect, based upon online 2.6 documentation: set (CMAKE_CONFIGURATION_TYPES Release CACHE INTERNAL FORCE) Previously, when I ran cmake-gui.exe, setting this variable caused cmake to generate visual studio vcproj files with only the 'release' configuration. But the command-line cmake does not create this output in spite of this set command. I will hazard a guess that this is another cmake variable (including CMAKE_BINARY_DIR others) that is set-able in the GUI, before the 1st configuration, but not set-able in the command-line cmake ? Upon reflection, I think there is a major issue here: 1) Online documentation does not categorize set-able vs. non-set-able variables. 2) cmake-gui variable-setting behavior differs significantly from cmake-cmdline variable-setting behavior. 3) most importantly -- my efforts to debug via message() output did not help me to clarify this situation. I output these cmake variables' values before and after setting them, cmake reported these values had changed, but the values did not take effect. Currently, there is no way for me to know that cmake ignores these set commands. A fix could be: 1) cmake reports warning: readonly variable $(CMAKE_FOO) cannot be set 2) message() reports only the *effective* value of variables, indicating that such set commands are ignored. 3) the online documentation could categorize the variables and state their set-ability with respect to cmake-gui and cmake-cmdline. I went back and searched the cmake FAQ and the cmake bugtracker postings regarding 'variable(s)' and 'set(ting)', but I didn't find an question / issue like this one. Shane Voisard ___ 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] Getting cmake to apply patches
On 2009-11-25 11:00+1200 Hugh Sorby wrote: Sorry about that missed a chdir should be cmake -E chdir netgen patch -p0 -i netgen-4.9.11.patch I confirm that you have found a bug (at least with Debian stable Linux and a bootstrapped cmake version 2.8.0-rc6). Here is a simple demonstration with ls -i. softw...@raven ls -i config.h 4539478 config.h softw...@raven cmake -E chdir . ls -i config.h config.h In other words the ls -i option is consumed by CMake just like the patch -i option is consumed for you. Note that -i is an option for CMake itself (wizard mode) so there is probably some screwup in interpretation of the command line when cmake -E is being run. If I change the flag from -i to -l, then the flag is not consumed and you get the same results for ls -l config.h and cmake -E chdir . ls -l config.h. That's consistent with the idea that you will only have trouble with cmake consuming the option when it is an option it recognizes. (-l is not a cmake command option while -i is). I also confirm the bug occurs for cmake-2.6.0 (the Debian stable system version) which makes it a bug that has been around for quite a while. I suggest you go ahead and put it in the bugtracker (if you cannot find another report about the same issue there). Until this cmake -E option consuming bug is fixed I suggest you could avoid the -i option with patch by using, e.g., cmake -E chdir netgen patch -p0 netgen-4.9.11.patch 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
[CMake] cmake HEAD: cpack rpm generator seems broken on openSuse 11.2
I installed cmake CVS HEAD of 24-11-2009 because I need the post install script feature of issue 8988. When I create the most basic cmake project project: cmake_minimum_required(VERSION 2.8) project(rpmtest) add_executable(dummy src/main.cpp) install( TARGETS dummy RUNTIME DESTINATION bin ) set( CPACK_GENERATOR RPM ) set( CPACK_PACKAGE_DESCRIPTION_SUMMARY The Vidigo build system. ) set( CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/install/dummy_descr.txt ) set( CPACK_PACKAGE_VENDOR Vidigo ) set( CPACK_PACKAGE_VERSION_MAJOR 1 ) set( CPACK_PACKAGE_VERSION_MINOR 0 ) set( CPACK_PACKAGE_VERSION_PATCH 0 ) set( CPACK_RPM_PACKAGE_RELEASE 1 ) set( CPACK_RPM_PACKAGE_LICENSE Proprietary ) set( CPACK_RPM_PACKAGE_REQUIRES cmake=2.6 python=2.5 ) #set( CPACK_SET_DESTDIR ON ) include(CPack) creating the RPM package fails with the following errors: winfr...@kwlaptop:~/generated/testbuild cpack -D CPACK_RPM_PACKAGE_DEBUG=1 CPack: Create package using RPM CPack: Install projects CPack: - Run preinstall target for: rpmtest CPack: - Install project: rpmtest CPack: Compress package CPackRPM:Debug: rpmbuild version is 4.7.1 CPackRPM:Debug: User defined Requires: cmake=2.6;python=2.5 CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM CPackRPM:Debug: CPACK_TOPLEVEL_TAG= Linux CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME= rpmtest-1.0.0-Linux.rpm CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH= /home/winfried/generated/testbuild/rpmtest-1.0.0-Linux.rpm CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = rpmtest-1.0.0-Linux CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/SPECS/rpmtest.spec CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = rpmtest 1.0.0 CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux.rpm CPackRPM: Will use GENERATED spec file: /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/SPECS/rpmtest.spec CPackRPM:Debug: You may consult rpmbuild logs in: CPackRPM:Debug:- /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmbuild.err CPackRPM:Debug:- /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmbuild.out CPack: Finalize package CPack Error: Problem copying the package: /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux.rpm to /home/winfried/generated/testbuild/rpmtest-1.0.0-Linux.rpm CPack Error: Error when generating package: rpmtest the contents of the mentioned rpmbuild.err is: + umask 022 + cd /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/BUILD + mv /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/tmpBBroot + exit 0 + umask 022 + cd /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/BUILD + /bin/rm -rf /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux ++ dirname /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux + /bin/mkdir -p /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM + /bin/mkdir /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux + mv /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/tmpBBroot /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux + exit 0 error: File not found: /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux/usr/bin/dummy File not found: /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux/usr/bin/dummy When I revert to CMake 2.8.0, the RPM is generated correctly. O.S.: opensuse 11.2 (rpmbuild 4.7.1) regards, Winfried ps: I'm not sure if I am supposed to file bug reports against CVS versions ? ___ 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] Getting cmake to apply patches
For now, another workaround would be to write a script that calls patch with the -i argument and then invoke the script with execute_process or a different cmake -E command line... On Tue, Nov 24, 2009 at 7:43 PM, Hugh Sorby h.so...@auckland.ac.nz wrote: Thanks Alan, I will attempt to: 1) search the CMake bug tracker (not very good at this most never seem to find anything relevant) 2) add new bug if 1) fails to bear any fruit. Unfortunately the cmake -E chdir netgen patch -p0 netgen-4.9.11.patch doesn't work so well on Windows Vista which is why I was trying to use the -i option. Alan W. Irwin wrote: On 2009-11-25 11:00+1200 Hugh Sorby wrote: Sorry about that missed a chdir should be cmake -E chdir netgen patch -p0 -i netgen-4.9.11.patch I confirm that you have found a bug (at least with Debian stable Linux and a bootstrapped cmake version 2.8.0-rc6). Here is a simple demonstration with ls -i. softw...@raven ls -i config.h 4539478 config.h softw...@raven cmake -E chdir . ls -i config.h config.h In other words the ls -i option is consumed by CMake just like the patch -i option is consumed for you. Note that -i is an option for CMake itself (wizard mode) so there is probably some screwup in interpretation of the command line when cmake -E is being run. If I change the flag from -i to -l, then the flag is not consumed and you get the same results for ls -l config.h and cmake -E chdir . ls -l config.h. That's consistent with the idea that you will only have trouble with cmake consuming the option when it is an option it recognizes. (-l is not a cmake command option while -i is). I also confirm the bug occurs for cmake-2.6.0 (the Debian stable system version) which makes it a bug that has been around for quite a while. I suggest you go ahead and put it in the bugtracker (if you cannot find another report about the same issue there). Until this cmake -E option consuming bug is fixed I suggest you could avoid the -i option with patch by using, e.g., cmake -E chdir netgen patch -p0 netgen-4.9.11.patch 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 ___ 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] Getting cmake to apply patches
I found this http://www.cmake.org/Bug/view.php?id=6945 but didn't manage to reopen it so I submitted this bug report http://www.cmake.org/Bug/view.php?id=9965 ___ 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] Getting cmake to apply patches
On 2009-11-25 13:11+1200 Hugh Sorby wrote: I found this http://www.cmake.org/Bug/view.php?id=6945 but didn't manage to reopen it so I submitted this bug report http://www.cmake.org/Bug/view.php?id=9965 It is interesting that Bug 6945 was closed as fixed in CVS by Bill Hoffman more than a year ago. So I suspect the trouble is this fix never made it into a release (yet). 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] Getting cmake to apply patches
Thanks David, Following your advice I did the following: SET( PATCH_BATCH_FILE patch_wrap.bat ) FILE( WRITE ${PATCH_BATCH_FILE} ${PATCH_EXECUTABLE} -p0 -i ${LIB_DIR}.patch ) EXECUTE_PROCESS( COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} ${PATCH_BATCH_FILE} RESULT_VARIABLE RESULT_PATCH ) MESSAGE( STATUS Patch result: ${RESULT_PATCH}, PROF SOURCE DIR: ${PROJECT_SOURCE_DIR} ) FILE( REMOVE ${PATCH_BATCH_FILE} ) This worked (add in your own Windows checks) David Cole wrote: For now, another workaround would be to write a script that calls patch with the -i argument and then invoke the script with execute_process or a different cmake -E command line... On Tue, Nov 24, 2009 at 7:43 PM, Hugh Sorby h.so...@auckland.ac.nz mailto:h.so...@auckland.ac.nz wrote: Thanks Alan, I will attempt to: 1) search the CMake bug tracker (not very good at this most never seem to find anything relevant) 2) add new bug if 1) fails to bear any fruit. Unfortunately the cmake -E chdir netgen patch -p0 netgen-4.9.11.patch doesn't work so well on Windows Vista which is why I was trying to use the -i option. Alan W. Irwin wrote: On 2009-11-25 11:00+1200 Hugh Sorby wrote: Sorry about that missed a chdir should be cmake -E chdir netgen patch -p0 -i netgen-4.9.11.patch I confirm that you have found a bug (at least with Debian stable Linux and a bootstrapped cmake version 2.8.0-rc6). Here is a simple demonstration with ls -i. softw...@raven ls -i config.h 4539478 config.h softw...@raven cmake -E chdir . ls -i config.h config.h In other words the ls -i option is consumed by CMake just like the patch -i option is consumed for you. Note that -i is an option for CMake itself (wizard mode) so there is probably some screwup in interpretation of the command line when cmake -E is being run. If I change the flag from -i to -l, then the flag is not consumed and you get the same results for ls -l config.h and cmake -E chdir . ls -l config.h. That's consistent with the idea that you will only have trouble with cmake consuming the option when it is an option it recognizes. (-l is not a cmake command option while -i is). I also confirm the bug occurs for cmake-2.6.0 (the Debian stable system version) which makes it a bug that has been around for quite a while. I suggest you go ahead and put it in the bugtracker (if you cannot find another report about the same issue there). Until this cmake -E option consuming bug is fixed I suggest you could avoid the -i option with patch by using, e.g., cmake -E chdir netgen patch -p0 netgen-4.9.11.patch Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca http://astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net http://freeeos.sf.net); PLplot scientific plotting software package (plplot.org http://plplot.org); the libLASi project (unifont.org/lasi http://unifont.org/lasi); the Loads of Linux Links project (loll.sf.net http://loll.sf.net); and the Linux Brochure Project (lbproject.sf.net http://lbproject.sf.net). __ Linux-powered Science __ ___ Powered by www.kitware.com http://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] Getting cmake to apply patches
Alan W. Irwin wrote: On 2009-11-25 13:11+1200 Hugh Sorby wrote: I found this http://www.cmake.org/Bug/view.php?id=6945 but didn't manage to reopen it so I submitted this bug report http://www.cmake.org/Bug/view.php?id=9965 It is interesting that Bug 6945 was closed as fixed in CVS by Bill Hoffman more than a year ago. So I suspect the trouble is this fix never made it into a release (yet). Nope, just not fixed for this case Looks like -i and --system-information will not work with -E, both will be consumed by CMake... :( Should be easy to fix... Will have it fixed in 2.8.1. -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] problem with add_custom command
So I found this thread below and tried the command at the promp (Win7): cmake -E tar xvf CMake Error: Problem with tar_open(): No such file or directory CMake Error: Problem extracting tar: ${TARDIR}/mytar.tar cmake -E tar xvf openssl-0.9.8a.tar CMake Error: Problem with tar_open(): No such file or directory CMake Error: Problem extracting tar: openssl-0.9.8a.tar so I do a: CMake Error: cmake version 2.8.0 Usage: cmake -E [command] [arguments ...] Available commands: chdir dir cmd [args]... - run command in a given directory rename oldname newname- rename a file or directory (on one volume) copy file destination - copy file to destination (either file or directory) copy_if_different in-file out-file - copy file if input has changed copy_directory source destination - copy directory 'source' content to directory 'destination' compare_files file1 file2 - check if file1 is same as file2 echo [string]... - displays arguments as text echo_append [string]... - displays arguments as text but no new line environment - display the current enviroment make_directory dir- create a directory md5sum file1 [...]- compute md5sum of files remove_directory dir - remove a directory and its contents remove [-f] file1 file2 ... - remove the file(s), use -f to force it tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar archive time command [args] ... - run command and return elapsed time touch file- touch a file. touch_nocreate file - touch a file but do not create it. build build_dir - build the project in build_dir. write_regv key value - write registry value delete_regv key - delete registry value comspec - on windows 9x use this for RunCommand And I pay particular attention to tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar archive and notice no xvf option. Is tar xvf implemnted? If so why tar and no untar? Curious. Brian On 25. Mar, 2009, at 10:28, ankit jain wrote: 2009/3/25 Michael Wild themiwi-re5jqeeqqe8avxtiumw...@public.gmane.orgthemiwi-re5jqeeqqe8avxtiumw...@public.gmane.org On 25. Mar, 2009, at 9:33, ankit jain wrote: 2009/3/25 Michael Wild themiwi-re5jqeeqqe8avxtiumw...@public.gmane.orgthemiwi-re5jqeeqqe8avxtiumw...@public.gmane.org [...] What I usually do is this: add_custom_command( OUTPUT ${TARDIR}/t1 COMMAND ${CMAKE_COMMAND} -E tar xvf ${TARDIR}/mytar.tar WORKING_DIRECTORY ${TARDIR} COMMENT Extracting ${TARDIR}/mytar.tar VERBATIM ) add_custom_target( extract_mytar DEPENDS ${TARDIR}/t1 ) This tells CMake how to obtain the file ${TARDIR}/t1 by unpacking mytar.tar. Then it adds a target which depends on that file. You then can have other targets depend on that by using add_dependencies. Thanks for your suggestions it works but the problem is that iam making a library which requires some source files which will come after extracting it from tar. In that making an custom target for it and then add_dependencies to that library to this custom build target does not solve the purpose. then how to include those files which is required by the library which came from tar. if you add all the files from the tar archive to the OUTPUT list of add_custom_command, CMake should automatically set the GENERATED property of those file to TRUE. If you don't want to do that, you still can set that property manually, using e.g.: set_source_files_properties( ${TARDIR}/t1 ${TARDIR}/t2 PROPERTIES GENERATED TRUE ) you then can use those files in a normal add_library or add_executable command. if you use the first approach (listing all files in the OUTPUT list), you don't even need the custom target, since CMake then will know how to create these files (by invoking the custom command). Is there any way by which we just give the name of folder where files has extracted and add_library command will take it by some means it is becoz if we dont know what files will be genrated inside that folder or if there are large no.of files then listing them in OUTPUT is really cumbersome.. ankit you could use execute_process( COMMAND ${CMAKE_COMMAND} -E tar tf ${TARDIR}/mytar.tar OUTPUT_VARIABLE tar_files ) to get a list of files contained in the tar file. However, I don't recommend this. It is much safer to really write the files out. If it hurts your eyes to put it in the CMakeLists.txt file, you can put the list in e.g. a file called files.cmake and INCLUDE that one from your CMakeLists.txt. DON'T use file(GLOB ...) or similar. That's a pretty bad idea... 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:
Re: [CMake] cmake HEAD: cpack rpm generator seems broken on openSuse 11.2
2009/11/24 W. Dobbe winfried_...@xmsnet.nl: I installed cmake CVS HEAD of 24-11-2009 because I need the post install script feature of issue 8988. In your example you seems to be using CPACK_RPM_PACKAGE_REQUIRES and not CPACK_RPM_SPEC_POSTINSTALL When I create the most basic cmake project project: cmake_minimum_required(VERSION 2.8) project(rpmtest) add_executable(dummy src/main.cpp) install( TARGETS dummy RUNTIME DESTINATION bin ) set( CPACK_GENERATOR RPM ) set( CPACK_PACKAGE_DESCRIPTION_SUMMARY The Vidigo build system. ) set( CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/install/dummy_descr.txt ) set( CPACK_PACKAGE_VENDOR Vidigo ) set( CPACK_PACKAGE_VERSION_MAJOR 1 ) set( CPACK_PACKAGE_VERSION_MINOR 0 ) set( CPACK_PACKAGE_VERSION_PATCH 0 ) set( CPACK_RPM_PACKAGE_RELEASE 1 ) set( CPACK_RPM_PACKAGE_LICENSE Proprietary ) set( CPACK_RPM_PACKAGE_REQUIRES cmake=2.6 python=2.5 ) #set( CPACK_SET_DESTDIR ON ) include(CPack) creating the RPM package fails with the following errors: winfr...@kwlaptop:~/generated/testbuild cpack -D CPACK_RPM_PACKAGE_DEBUG=1 CPack: Create package using RPM CPack: Install projects CPack: - Run preinstall target for: rpmtest CPack: - Install project: rpmtest CPack: Compress package CPackRPM:Debug: rpmbuild version is 4.7.1 CPackRPM:Debug: User defined Requires: cmake=2.6;python=2.5 CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM CPackRPM:Debug: CPACK_TOPLEVEL_TAG = Linux CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = rpmtest-1.0.0-Linux.rpm CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = /home/winfried/generated/testbuild/rpmtest-1.0.0-Linux.rpm CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = rpmtest-1.0.0-Linux CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/SPECS/rpmtest.spec CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = rpmtest 1.0.0 CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux.rpm CPackRPM: Will use GENERATED spec file: /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/SPECS/rpmtest.spec CPackRPM:Debug: You may consult rpmbuild logs in: CPackRPM:Debug: - /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmbuild.err CPackRPM:Debug: - /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmbuild.out CPack: Finalize package CPack Error: Problem copying the package: /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux.rpm to /home/winfried/generated/testbuild/rpmtest-1.0.0-Linux.rpm CPack Error: Error when generating package: rpmtest the contents of the mentioned rpmbuild.err is: + umask 022 + cd /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/BUILD + mv /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/tmpBBroot + exit 0 + umask 022 + cd /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/BUILD + /bin/rm -rf /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux ++ dirname /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux + /bin/mkdir -p /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM + /bin/mkdir /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux + mv /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/tmpBBroot /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux + exit 0 error: File not found: /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux/usr/bin/dummy File not found: /home/winfried/generated/testbuild/_CPack_Packages/Linux/RPM/rpmtest-1.0.0-Linux/usr/bin/dummy Would you be able to send me (may be directly because other may not care about that) the spec file corresponding to the fail case? Moreover would you try to replace the current CPackRPM.cmake with the one I attach to this mail and retry with the very same CMakeLists.txt. O.S.: opensuse 11.2 (rpmbuild 4.7.1) regards, Winfried ps: I'm not sure if I am supposed to file bug reports against CVS versions ? In the bug tracker I don't know (may be Bill can tell that), However reporting on the ML is a good practice because it will makes better next release :-) -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org CPackRPM.cmake Description: Binary data ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep