[cmake-developers] [CMake 0013354]: CMake hangs generating XCode project file when CXXFLAGS contains -g in a flag
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13354 == Reported By:Jens Bäckman Assigned To: == Project:CMake Issue ID: 13354 Category: CMake Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 2012-06-27 08:14 EDT Last Modified: 2012-06-27 08:14 EDT == Summary:CMake hangs generating XCode project file when CXXFLAGS contains -g in a flag Description: When adding the compiler flag -Wno-global-constructors, Steps to Reproduce: Add the following line to an existing CMakeLists.txt file: set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wno-global-constructors) Run cmake -G Xcode. You will be left with the message Generating done, and no project file generated. Additional Information: Might be related to the bug discussed here: http://comments.gmane.org/gmane.comp.programming.tools.cmake.user/40319 == Issue History Date ModifiedUsername FieldChange == 2012-06-27 08:14 Jens Bäckman New Issue == -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] help finding where file installs from
I have a file that gets installed with a bunch of other files. Only the file in question is getting installed a couple times. I know where the one is coming from, but I cannot find where the other is. I've updated to using general things like INSTALL( DIRECTORY ... ) so there's no references to the file directly except in the install.manifest file. How can I find where it's getting a second copy from? There's only one copy in the source tree, there's only one copy up to the point this project builds in the build tree... this project should be using the one in the build tree, from a prior project that has been built, and should be the only one. Heck, I don't even know where it could be finding this file that is a different timestamp on the system. mingw, make VERBOSE=1 doesn't help, watcom and visual studio both have no sign of the file in question in build projects -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] help finding where file installs from
Sorry nevermind, there was a file added in the sources. On Wed, Jun 27, 2012 at 9:20 AM, J Decker d3c...@gmail.com wrote: I have a file that gets installed with a bunch of other files. Only the file in question is getting installed a couple times. I know where the one is coming from, but I cannot find where the other is. I've updated to using general things like INSTALL( DIRECTORY ... ) so there's no references to the file directly except in the install.manifest file. How can I find where it's getting a second copy from? There's only one copy in the source tree, there's only one copy up to the point this project builds in the build tree... this project should be using the one in the build tree, from a prior project that has been built, and should be the only one. Heck, I don't even know where it could be finding this file that is a different timestamp on the system. mingw, make VERBOSE=1 doesn't help, watcom and visual studio both have no sign of the file in question in build projects -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [CMake] CMake 2.8.9-rc1 ready for testing!
On 26.06.2012 23:00, Bill Hoffman wrote: On 6/26/2012 2:42 PM, Claus Klein wrote: yes, sure, On Darwin, I simply do: cmake -G 'Eclipse CDT4 - Ninja' -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=1 ../LMX That works with any cmake project I work. Nightly build on uname -a Darwin claus-kleins-macbook-pro.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386 MacBookPro5,1 Darwin Can you run cmake in gdb with a debug build and get the exact location of the crash? It is working on my windows box... Works also here on Windows, Ubuntu 12.04, and Mac 10.8 (gcc-4.2, i386), at least when I use cmake as sources. Are you sure your sources are up to date? Recently I fixed another(?) crash reported by you: https://github.com/syntheticpp/CMake/commit/2fb07fc44c49da70a609fbc0df013c0301e9f36a#Source/cmExtraEclipseCDT4Generator.cxx -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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0013357]: CPACK macros in own copy of NSIS.template.in are still generated even though they are commented out
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13357 == Reported By:David Sandberg Assigned To: == Project:CMake Issue ID: 13357 Category: CPack Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2012-06-27 22:32 EDT Last Modified: 2012-06-27 22:32 EDT == Summary:CPACK macros in own copy of NSIS.template.in are still generated even though they are commented out Description: The parser of NSIS.template.in generates output for CPACK macros that are commented out (for example @CPACK_NSIS_CREATE_ICONS@). The parser only comments out the first row of the macro's output. Here's an example: CMakeLists.txt: set(CPACK_COMPONENTS_ALL APP1 APP2) NSIS.template.in (don't want it to install default icons because I need to use arguments in the shortcut collected during installation): ;@CPACK_NSIS_CREATE_ICONS@ This will generate the following output in project.nsi: ; CreateShortCut $SMPROGRAMS\$STARTMENU_FOLDER\APP1.lnk $INSTDIR\bin\APP1.exe CreateShortCut $SMPROGRAMS\$STARTMENU_FOLDER\APP2.lnk $INSTDIR\bin\APP2.exe == Issue History Date ModifiedUsername FieldChange == 2012-06-27 22:32 David Sandberg New Issue == -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [CMake] Ninja fails, Make succeeds...
Sigh, now I sent you the code from the wrong directory, but the code for the Backend component is virtually identical. I don't know how to use functions with CMake, so I simply made a verbatim copy of the below code in each subfolder and edited it to match the subfolder. So the Backend project looks like this: project(Backend) set(PublicHeaders Backend.hpp Context.hpp ) set(PublishedHeaders ) foreach(Header IN LISTS PublicHeaders) get_filename_component(HeaderFilename ${Header} NAME) set(Source ${CMAKE_CURRENT_SOURCE_DIR}/${Header}) set(Output ${CMAKE_CURRENT_BINARY_DIR}/${HeaderFilename}) list(APPEND PublishedHeaders ${Output}) add_custom_command( OUTPUT ${Output} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${Source} ${Output} MAIN_DEPENDENCY ${Source} COMMENT Publishing ${HeaderFilename} VERBATIM ) Why don't you simply use configure_file(... COPYONLY) here? endforeach() add_custom_target( publish_backend_headers ALL DEPENDS ${PublishedHeaders} SOURCES ${PublicHeaders} ) include_directories(${CMAKE_BINARY_DIR}/../) This is almost certainly wrong. Guess my build dir is /tmp/foo, why on earth do you want to include /tmp? I could understand if it would be ${CMAKE_CURRENT_BINARY_DIR}/.. if you are in a subdirectory, but otherwise this is likely completely bogus. include_directories($ENV{LLVM}/include) add_definitions(-D__STDC_CONSTANT_MACROS) add_definitions(-D__STDC_LIMIT_MACROS) add_library(Backend Backend.cpp ) add_dependencies(Backend publish_backend_headers) I think you can avoid the whole add_custom_target/add_library by just writing add_library(Backend Backend.cpp ${PublishedHeaders}) (Untested. May only reliably work if you use configure_file. ymmv). Eike -- 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] CPack and NSIS failure
Hello, I try to use CPack to create a Windows package using NSIS, it fails with: [100%] Built target sd-tris Run CPack packaging tool... CPack: Create package using NSIS CPack: Install projects CPack: - Run preinstall target for: sd-tris CPack: - Install project: sd-tris CPack: Create package CPack Error: Problem running NSIS command: C:/Program Files (x86)/NSIS/makensis.exe C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/project.nsi Please check C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/NSISOutput.log for errors CPack Error: Problem compressing the directory CPack Error: Error when generating package: sd-tris mingw32-make: *** [package] Error 1 And the NSISOutput.log tail: Section: -Core installation SetOutPath: $INSTDIR File: Returning to: C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32 File: C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32\*.* - no files found. Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] | /oname=outfile one_file_only) Error in script C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/project.nsi on line 640 -- aborting creation process There is no files under C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32, that's probably why it fails to build. I've attached the CMakeLists.txt, Cheers, -- Demelier David # # CMakeLists.txt -- CMake build system for sd-tris # # - # General CMake parameters # - # General settings. cmake_minimum_required(VERSION 2.8) project(sd-tris C) # CMake modules. include(CheckFunctionExists) include(CheckIncludeFile) # Global variables. set(CMAKE_MODULE_PATH ${sd-tris_SOURCE_DIR}/cmake) set(PREFIX ${CMAKE_INSTALL_PREFIX}) set(ROOTDIR ${sd-tris_SOURCE_DIR}) set(BINARYDIR ${sd-tris_BINARY_DIR}) set(EXTERNDIR ${sd-tris_SOURCE_DIR}/extern) # Users for unix. set(USER games) set(GROUP games) if (WIN32) set(PATH_INSTALL_BIN ${PREFIX}) set(PATH_INSTALL_NLS ${PREFIX}/lang) set(PATH_INSTALL_DATA ${PREFIX}) else () set(PATH_INSTALL_BIN ${PREFIX}/bin) set(PATH_INSTALL_NLS ${PREFIX}/share/locale) set(PATH_INSTALL_DATA ${PREFIX}/share/sdtris) set(PATH_INSTALL_SCORE /var/db/sdtris) endif () # Options option(NLS Enable native language support On) find_package(Wing REQUIRED) # # Enable NLS, if the library is not found the game won't link against it. # if (NLS) find_package(NLS) # If NLS is usable and found, link against it. if (NLS_FOUND) set(HAVE_NLS 1 CACHE INTERNAL Use of NLS FORCE) list(APPEND INCLUDES ${NLS_INCLUDE_DIR}) list(APPEND LIBRARIES ${NLS_LIBRARY}) endif () endif () # Create a make uninstall target. configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake IMMEDIATE @ONLY ) add_custom_target( uninstall ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake ) # - # Check of function, headers and so on # - # Check of asprintf(3) function. check_function_exists(asprintf HAVE_ASPRINTF) if (NOT HAVE_ASPRINTF) include_directories(${EXTERNDIR}/asprintf) list(APPEND EXTSOURCES ${EXTERNDIR}/asprintf/asprintf.c) endif () # Check of err(3) functions. check_function_exists(err HAVE_ERR) if (NOT HAVE_ERR) include_directories(${EXTERNDIR}/err) list(APPEND EXTSOURCES ${EXTERNDIR}/err/err.c) endif () # Check of getopt(3) function. check_function_exists(getopt HAVE_GETOPT) if (NOT HAVE_GETOPT) include_directories(${EXTERNDIR}/getopt) list(APPEND EXTSOURCES ${EXTERNDIR}/getopt/getopt.c) endif () # Check of setprogname(3) function. check_function_exists(setprogname HAVE_SETPROGNAME) if (NOT HAVE_SETPROGNAME) include_directories(${EXTERNDIR}/setprogname) list(APPEND EXTSOURCES ${EXTERNDIR}/setprogname/setprogname.c) endif () # random(3) is said to be better. check_function_exists(random HAVE_RANDOM) # c99 stdbool.h is still not supported on some platforms. check_include_file(stdbool.h HAVE_STDBOOL) if (NOT HAVE_STDBOOL) include_directories(${EXTERNDIR}/stdbool) endif () # We always use _FOREACH_SAFE. find_package(SysQueue) if (NOT SYSQUEUE_FOUND OR NOT SYSQUEUE_SLIST_FOREACH_SAFE OR NOT SYSQUEUE_STAILQ_FOREACH_SAFE OR NOT SYSQUEUE_LIST_FOREACH_SAFE OR NOT SYSQUEUE_TAILQ_FOREACH_SAFE) include_directories(BEFORE ${EXTERNDIR}/queue) endif () # unistd.h has some useful routines. check_include_file(unistd.h HAVE_UNISTD_H) configure_file(${ROOTDIR}/cmake/config.h.in
[CMake] How to remove symbolic link
Hi all. file(REMOVE ...) does not seem to be able to remove a file which is a symbolic link (neither on NFS nor on NTFS). Is there a platform-independent way to remove a symlink from within cmake, or do I have to resort to if() and execute_process()? Thanks for any replies. Petr -- 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] Can we control component package name in 2.8.8?
Hi, I've read some discussions posted ten months ago on http://cmake.3232098.n2.nabble.com/Component-Package-Name-td6976896.html where Eric Noulard pointed out that we could not control component package name for the reason of unique package name. I am currently running on 2.8.8 and generated very funny component package name: foo-1.1-1.0.el6.x86_64-FooComponent.rpm, it basically set by following format: ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-${COMPONENT_NAME}.rpm That is not a good format of rpm package name. Can we take control the component package name in 2.8.8? BTW, when I build two packages foo-1.1 and , the bin-1.2, the CPack generates an extra Unspecified package, theCPackConfig.cmake set: SET(CPACK_COMPONENTS_ALL foo-1.1-1.0.el6.x86_64;bin-1.2-1.el6.x86_6;Unspecified) Where the Unspecified come from and now can I fix it? Thank you. Jupiter -- View this message in context: http://cmake.3232098.n2.nabble.com/Can-we-control-component-package-name-in-2-8-8-tp7580641.html Sent from the CMake mailing list archive at Nabble.com. -- 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] Can we control component package name in 2.8.8?
The unspecified may come from an Install statement that does not have a component specified. Micha On 06/27/2012 01:44 PM, hce wrote: Hi, I've read some discussions posted ten months ago on http://cmake.3232098.n2.nabble.com/Component-Package-Name-td6976896.html where Eric Noulard pointed out that we could not control component package name for the reason of unique package name. I am currently running on 2.8.8 and generated very funny component package name: foo-1.1-1.0.el6.x86_64-FooComponent.rpm, it basically set by following format: ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-${COMPONENT_NAME}.rpm That is not a good format of rpm package name. Can we take control the component package name in 2.8.8? BTW, when I build two packages foo-1.1 and , the bin-1.2, the CPack generates an extra Unspecified package, theCPackConfig.cmake set: SET(CPACK_COMPONENTS_ALL foo-1.1-1.0.el6.x86_64;bin-1.2-1.el6.x86_6;Unspecified) Where the Unspecified come from and now can I fix it? Thank you. Jupiter -- View this message in context: http://cmake.3232098.n2.nabble.com/Can-we-control-component-package-name-in-2-8-8-tp7580641.html Sent from the CMake mailing list archive at Nabble.com. -- 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] Ninja fails, Make succeeds...
On Wed, Jun 27, 2012 at 2:59 AM, Rolf Eike Beer e...@sf-mail.de wrote: Sigh, now I sent you the code from the wrong directory, but the code for the Backend component is virtually identical. I don't know how to use functions with CMake, so I simply made a verbatim copy of the below code in each subfolder and edited it to match the subfolder. So the Backend project looks like this: project(Backend) set(PublicHeaders Backend.hpp Context.hpp ) set(PublishedHeaders ) foreach(Header IN LISTS PublicHeaders) get_filename_component(HeaderFilename ${Header} NAME) set(Source ${CMAKE_CURRENT_SOURCE_DIR}/${Header}) set(Output ${CMAKE_CURRENT_BINARY_DIR}/${HeaderFilename}) list(APPEND PublishedHeaders ${Output}) add_custom_command( OUTPUT ${Output} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${Source} ${Output} MAIN_DEPENDENCY ${Source} COMMENT Publishing ${HeaderFilename} VERBATIM ) Why don't you simply use configure_file(... COPYONLY) here? I prefer add_custom_command build-time copying over configure_file configure-time copying almost always. I don't want to add to the (serial, non-parallelizable) CMake configure time unnecessarily when I could be doing a make -j 8 or a ninja full-parallel build to achieve the same copy tasks 8x (or more!) faster... As a general rule of thumb, always defer things that take any significant time to build-time when possible. Just my opinion, but the custom command route is well proven when dependencies are specified correctly in the CMakeLists files. 2 cents, :-) David endforeach() add_custom_target( publish_backend_headers ALL DEPENDS ${PublishedHeaders} SOURCES ${PublicHeaders} ) include_directories(${CMAKE_BINARY_DIR}/../) This is almost certainly wrong. Guess my build dir is /tmp/foo, why on earth do you want to include /tmp? I could understand if it would be ${CMAKE_CURRENT_BINARY_DIR}/.. if you are in a subdirectory, but otherwise this is likely completely bogus. include_directories($ENV{LLVM}/include) add_definitions(-D__STDC_CONSTANT_MACROS) add_definitions(-D__STDC_LIMIT_MACROS) add_library(Backend Backend.cpp ) add_dependencies(Backend publish_backend_headers) I think you can avoid the whole add_custom_target/add_library by just writing add_library(Backend Backend.cpp ${PublishedHeaders}) (Untested. May only reliably work if you use configure_file. ymmv). Eike -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack and NSIS failure
It's because you're using (in essence): DESTINATION ${CMAKE_INSTALL_PREFIX} for your install rules. Try DESTINATION . instead. The DESTINATION is automatically under CMAKE_INSTALL_PREFIX when expressed as a relative path. When you express it as a full absolute path, the install rule puts it in the full absolute path rather than putting it underneath CMAKE_INSTALL_PREFIX. HTH, David On Wed, Jun 27, 2012 at 6:24 AM, David Demelier demelier.da...@gmail.com wrote: Hello, I try to use CPack to create a Windows package using NSIS, it fails with: [100%] Built target sd-tris Run CPack packaging tool... CPack: Create package using NSIS CPack: Install projects CPack: - Run preinstall target for: sd-tris CPack: - Install project: sd-tris CPack: Create package CPack Error: Problem running NSIS command: C:/Program Files (x86)/NSIS/makensis.exe C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/project.nsi Please check C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/NSISOutput.log for errors CPack Error: Problem compressing the directory CPack Error: Error when generating package: sd-tris mingw32-make: *** [package] Error 1 And the NSISOutput.log tail: Section: -Core installation SetOutPath: $INSTDIR File: Returning to: C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32 File: C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32\*.* - no files found. Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] | /oname=outfile one_file_only) Error in script C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/project.nsi on line 640 -- aborting creation process There is no files under C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32, that's probably why it fails to build. I've attached the CMakeLists.txt, Cheers, -- Demelier David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- 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] Using $ORIGIN as rpath for third party configure script
Currently I am setting RPATH using following syntax SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:$ORIGIN/../lib) It is working for the binary build using cmake. Problem is that it is not working for third party binary I am building using cmake using their auto-configure script. I am using following command for configure add_custom_target( third_party_bin ALL COMMAND ./configure --with-ld-opt=\-Wl,-rpath,${CMAKE_INSTALL_RPATH}\ --prefix=${CMAKE_INSTALL_PREFIX} ) Make file generated by third path configure look likes * -Wl,-rpath,':RIGIN/../lib' -lstdc++* I think I need to escape ${CMAKE_INSTALL_RPATH} correctly. What is the correct way to escape ${CMAKE_INSTALL_RPATH} for other third party configure? regards Vivek Goel -- 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] cache behaviour
Hello CMakers, I saw this question turning around several times but I do not really understand why the explanations do not suit with my problem. Sorry in advance for the redundancy. Here is my 'problem': I have a CMakeLists.txt file that starts with: ## cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR) option(GUI Build the GUI on top of the console programs. ON) if(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING FORCE) else() set(CMAKE_BUILD_TYPE Release CACHE STRING FORCE) endif() message(STATUS Setting build type to ${CMAKE_BUILD_TYPE}) if(DEFINED CMAKE_Fortran_COMPILER) set(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER} CACHE STRING FORCE) else() set(CMAKE_Fortran_COMPILER ifort CACHE STRING FORCE) endif() message(STATUS Setting compiler to ${CMAKE_Fortran_COMPILER}) project(sxtalsoft Fortran RC) bla bla bla ... ## When I run it a first time in an empty directory with cmake -GNMake Makefiles -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Release ..\..\. I get: -- Setting build type to Release -- Setting compiler to ifort -- The Fortran compiler identification is Intel -- Check for working Fortran compiler: C:/Intel/Composer XE/bin/ia32/ifort.exe -- Check for working Fortran compiler: C:/Intel/Composer XE/bin/ia32/ifort.exe -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether C:/Intel/Composer XE/bin/ia32/ifort.exe supports Fortran 90 -- Checking whether C:/Intel/Composer XE/bin/ia32/ifort.exe supports Fortran 90 -- yes -- Configuring done -- Generating done -- Build files have been written to: C:/Users/pellegrini/work/diffraction/sxtalsoft/build/ifort If a run it a second time WITHOUT deleting the CMakeCache.txt file with cmake -GNMake Makefiles -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug ..\..\. I get this time: -- Setting build type to Debug -- Setting compiler to ifort -- Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_Fortran_COMPILER= ifort -- Setting build type to Release -- Setting compiler to ifort -- The Fortran compiler identification is Intel -- Check for working Fortran compiler: C:/Intel/Composer XE/bin/ia32/ifort.exe -- Check for working Fortran compiler: C:/Intel/Composer XE/bin/ia32/ifort.exe -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether C:/Intel/Composer XE/bin/ia32/ifort.exe supports Fortran 90 -- Checking whether C:/Intel/Composer XE/bin/ia32/ifort.exe supports Fortran 90 -- yes -- Configuring done -- Generating done -- Build files have been written to: C:/Users/pellegrini/work/diffraction/sxtalsoft/build/ifort There are two things that puzzle me here. The first is: why cmake detect a change in the compiler type as it did not change its value in the command line between the two calls ? The second is why during the rerun the CMAKE_BUILD_TYPE is set back to Release and not to the value set in the command line i.e. Debug ? Is my implementation not correct or is this some cache behaviour that I still do not get ? thanks a lot Eric -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack and NSIS failure
2012/6/27 David Cole david.c...@kitware.com: It's because you're using (in essence): DESTINATION ${CMAKE_INSTALL_PREFIX} for your install rules. Try DESTINATION . instead. The DESTINATION is automatically under CMAKE_INSTALL_PREFIX when expressed as a relative path. When you express it as a full absolute path, the install rule puts it in the full absolute path rather than putting it underneath CMAKE_INSTALL_PREFIX. HTH, David Thanks, it works now, my project is still installed to ${CMAKE_INSTALL_PREFIX} and NSIS is working now. However there is just one issue now, the Windows menu entry executable points to ${CMAKE_INSTALL_PREFIX}/bin/sd-tris.exe while I installed the target directly in ${CMAKE_INSTALL_PREFIX} Cheers, On Wed, Jun 27, 2012 at 6:24 AM, David Demelier demelier.da...@gmail.com wrote: Hello, I try to use CPack to create a Windows package using NSIS, it fails with: [100%] Built target sd-tris Run CPack packaging tool... CPack: Create package using NSIS CPack: Install projects CPack: - Run preinstall target for: sd-tris CPack: - Install project: sd-tris CPack: Create package CPack Error: Problem running NSIS command: C:/Program Files (x86)/NSIS/makensis.exe C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/project.nsi Please check C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/NSISOutput.log for errors CPack Error: Problem compressing the directory CPack Error: Error when generating package: sd-tris mingw32-make: *** [package] Error 1 And the NSISOutput.log tail: Section: -Core installation SetOutPath: $INSTDIR File: Returning to: C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32 File: C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32\*.* - no files found. Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] | /oname=outfile one_file_only) Error in script C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/project.nsi on line 640 -- aborting creation process There is no files under C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32, that's probably why it fails to build. I've attached the CMakeLists.txt, Cheers, -- Demelier David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Demelier David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] (no subject)
On 06/27/2012 03:21 PM, David Henderson wrote: http://www.referralrecord.com/wp-content/themes/twentyten/rgpas.html -- 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 You just gave away so many informations about yourself you have to hope no one reading your emails will make a bad use of them. For your own good, if you read this please switch to a box that is not compromised and give up on any vulnerable software that might have caused your problem. Good luck! Michele -- 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] Can we control component package name in 2.8.8?
2012/6/27 hce jupiter@gmail.com: Hi, I've read some discussions posted ten months ago on http://cmake.3232098.n2.nabble.com/Component-Package-Name-td6976896.html where Eric Noulard pointed out that we could not control component package name for the reason of unique package name. I am currently running on 2.8.8 and generated very funny component package name: foo-1.1-1.0.el6.x86_64-FooComponent.rpm, it basically set by following format: ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-${COMPONENT_NAME}.rpm That is not a good format of rpm package name. Can we take control the component package name in 2.8.8? Not yet see: http://public.kitware.com/Bug/view.php?id=12997 Won't probably be in 2.8.9 either. I know it will be useful for many of us, I just lack time to go through it. The work is not that difficult but it has many potential impact so that we shall take time to do it carefully. BTW, when I build two packages foo-1.1 and , the bin-1.2, the CPack generates an extra Unspecified package, theCPackConfig.cmake set: SET(CPACK_COMPONENTS_ALL foo-1.1-1.0.el6.x86_64;bin-1.2-1.el6.x86_6;Unspecified) Where the Unspecified come from and now can I fix it? As Micha said, this comes from an INSTALL statement which does not contains COMPONENT. see http://www.vtk.org/Wiki/CMake:Component_Install_With_CPack#Specificying_components_and_groups or this recent discussion: http://www.cmake.org/pipermail/cmake/2012-June/050855.html -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] local and system installs that include python and shell scripts
I think it should be quite common case in KDE community, since GUI usually have resources, but I don't know if apps can run from build dir. We use custom commands for these purposes, something like this: get_filename_component(destPath ${destName} PATH) add_custom_command(OUTPUT ${destName} MAIN_DEPENDENCY ${source} COMMAND ${CMAKE_COMMAND} -E copy ${source} ${destPath} COMMENT Copying file ${source} VERBATIM ) (I don't remember if cmake can copy file with renaming or it's our legacy code) If your scripts aren't attached to any target, you may create custom one for them. On build server you don't usually need this (because it uses install), then you can control the behavior via special switches to allow running locally from build directory. I also suggest wrapping all such stuff into macros. CMakeParseArguments helps significantly in writing macros with informative and self-descriptive calls. On Sat, Jun 23, 2012 at 1:29 AM, Ateljevich, Eli e...@water.ca.gov wrote: Hi again, My project is set up so that the compiled targets naturally get output to a structure that looks like a development mode installation: /myproj /build /bin /lib /include This is convenient for some users ... it is the sort of code people tinker with, and I think a lot of my users will actually want to keep it local. I will offer a more typical install as well. In addition, I have some python and shell scripts mixed in with my source code in subdirectories. These don’t naturally get moved anywhere during the build and I would like to do so to complete the development installation idea: /myproj /build /bin /lib /include /scripts something.sh /pylib scripts and python shared libraries How is this best done? Should I treat this as a case of “install”? In that case when development mode is on I would install to the local directory. Strangely, for 90% of the project the source and destination will be the same – which is what makes it seem weird. Or should I just use command with cmake -E style copying locally and only use install for the system install? It may be that either will work, but it seems from my last post or two that I don't always see the usual idioms and it could be neither of my guesses is a good one. Thanks, Eli -- 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] cache behaviour
Hello Eric, I am a relative beginner with cmake, but I have done a lot of experimenting to try to figure out the relative precedence of things with the cache. At the very least I will bump your topic and get a real answer. On my setup (2.6), the -D option seems to trump other initialization. For instance (I'm just documenting my own trail here), -D takes precedence over -C for initializing the cache regardless of whether I use set( ... FORCE) in initial-cache. It also seems to automatically carry a FORCE in the sense that it will always update the cache and install a new value even if cmake has already been run. Within the CMakeLists.txt (now onto your case) the -D value will prevail unless a set is made with FORCE in which case the variable is set and the cache is updated -- the question may be one of scope and timing. So, you seem to have done the one thing that actually will have an effect, but you just set the variable to itself so it seems like a no-op on value but an op in terms of registering a change. Your message() statements suggest that the variables are set correctly in that location. Your woes have to either be because 1) the timing is wrong or 2) there is something bad about deliberately re-setting things ... for instance, by using FORCE you are probably setting CMAKE_Fortran_COMPILER redundantly to itself rather than seeing it is already set and leaving it alone -- and the compiler change warning is probably set to observe that. Does it work if you remove the IF statements and SET statements and just use the -D as your variable initialization? What is the motive for the IF and SET/FORCE? Eli -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of pellegrini Sent: Wednesday, June 27, 2012 5:53 AM To: CMake List Subject: [CMake] cache behaviour Hello CMakers, I saw this question turning around several times but I do not really understand why the explanations do not suit with my problem. Sorry in advance for the redundancy. Here is my 'problem': I have a CMakeLists.txt file that starts with: ## cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR) option(GUI Build the GUI on top of the console programs. ON) if(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING FORCE) else() set(CMAKE_BUILD_TYPE Release CACHE STRING FORCE) endif() message(STATUS Setting build type to ${CMAKE_BUILD_TYPE}) if(DEFINED CMAKE_Fortran_COMPILER) set(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER} CACHE STRING FORCE) else() set(CMAKE_Fortran_COMPILER ifort CACHE STRING FORCE) endif() message(STATUS Setting compiler to ${CMAKE_Fortran_COMPILER}) project(sxtalsoft Fortran RC) bla bla bla ... ## When I run it a first time in an empty directory with cmake -GNMake Makefiles -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Release ..\..\. I get: -- Setting build type to Release -- Setting compiler to ifort -- The Fortran compiler identification is Intel -- Check for working Fortran compiler: C:/Intel/Composer XE/bin/ia32/ifort.exe -- Check for working Fortran compiler: C:/Intel/Composer XE/bin/ia32/ifort.exe -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether C:/Intel/Composer XE/bin/ia32/ifort.exe supports Fortran 90 -- Checking whether C:/Intel/Composer XE/bin/ia32/ifort.exe supports Fortran 90 -- yes -- Configuring done -- Generating done -- Build files have been written to: C:/Users/pellegrini/work/diffraction/sxtalsoft/build/ifort If a run it a second time WITHOUT deleting the CMakeCache.txt file with cmake -GNMake Makefiles -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug ..\..\. I get this time: -- Setting build type to Debug -- Setting compiler to ifort -- Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_Fortran_COMPILER= ifort -- Setting build type to Release -- Setting compiler to ifort -- The Fortran compiler identification is Intel -- Check for working Fortran compiler: C:/Intel/Composer XE/bin/ia32/ifort.exe -- Check for working Fortran compiler: C:/Intel/Composer XE/bin/ia32/ifort.exe -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether C:/Intel/Composer XE/bin/ia32/ifort.exe supports Fortran 90 -- Checking whether C:/Intel/Composer XE/bin/ia32/ifort.exe supports Fortran 90 -- yes -- Configuring done -- Generating done -- Build files have been written to: C:/Users/pellegrini/work/diffraction/sxtalsoft/build/ifort There are two things that puzzle me here. The first is: why cmake
[CMake] How to force cmake to always give color o/p
CMake currently checks if it is writing to a TTY, and if not it switch off colors. Problem is that I am piping make o/p to sed command. One way to solve this problem is I can use unbuffer command. Is there any other solution to always force color output ? regards Vivek Goel -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack and NSIS failure
On Wed, Jun 27, 2012 at 9:07 AM, David Demelier demelier.da...@gmail.com wrote: 2012/6/27 David Cole david.c...@kitware.com: It's because you're using (in essence): DESTINATION ${CMAKE_INSTALL_PREFIX} for your install rules. Try DESTINATION . instead. The DESTINATION is automatically under CMAKE_INSTALL_PREFIX when expressed as a relative path. When you express it as a full absolute path, the install rule puts it in the full absolute path rather than putting it underneath CMAKE_INSTALL_PREFIX. HTH, David Thanks, it works now, my project is still installed to ${CMAKE_INSTALL_PREFIX} and NSIS is working now. However there is just one issue now, the Windows menu entry executable points to ${CMAKE_INSTALL_PREFIX}/bin/sd-tris.exe while I installed the target directly in ${CMAKE_INSTALL_PREFIX} Cheers, On Wed, Jun 27, 2012 at 6:24 AM, David Demelier demelier.da...@gmail.com wrote: Hello, I try to use CPack to create a Windows package using NSIS, it fails with: [100%] Built target sd-tris Run CPack packaging tool... CPack: Create package using NSIS CPack: Install projects CPack: - Run preinstall target for: sd-tris CPack: - Install project: sd-tris CPack: Create package CPack Error: Problem running NSIS command: C:/Program Files (x86)/NSIS/makensis.exe C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/project.nsi Please check C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/NSISOutput.log for errors CPack Error: Problem compressing the directory CPack Error: Error when generating package: sd-tris mingw32-make: *** [package] Error 1 And the NSISOutput.log tail: Section: -Core installation SetOutPath: $INSTDIR File: Returning to: C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32 File: C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32\*.* - no files found. Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] | /oname=outfile one_file_only) Error in script C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/project.nsi on line 640 -- aborting creation process There is no files under C:/Users/markand/Documents/sd-tris/_build_/_CPack_Packages/win32/NSIS/sd-tris-0.1.1-win32, that's probably why it fails to build. I've attached the CMakeLists.txt, Cheers, -- Demelier David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Demelier David You can try: set(CPACK_NSIS_EXECUTABLES_DIRECTORY .) before you include(CPack). This bug ( http://public.kitware.com/Bug/view.php?id=7828 ) was resolved by adding the CPACK_NSIS_EXECUTABLES_DIRECTORY variable in this commit: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=702c8f8ba7959179244ed47a5181fdf68a63 That change has been in CMake since version 2.8.4. HTH, David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] ctest timeout: getting backtraces
ctest uses the kwsys utilities to launch and monitor sub-processes. Theoretically, it goes like this, with variations in implementation from platform to platform: After a call to a kwsysProcessCreate function (which spawns a process asynchronously and returns control to ctest), we loop while calling either a WaitForData or WaitForExit function, collecting stdout and std err from the sub-process. Those wait functions may simply return a value to us that says hey, the timeout has expired and ctest does not even have to kill anything at that point. We hand the timeout value to the ProcessCreate function, so the system can kill it for us if it knows how to do that. If not, we also have a kwsysProcessKill function that we can call if necessary. So ... you can't use a sig trap reliably unless you know the implementation details of the whole system under the hood and you know for a fact that it's going to work on a given system. HTH, David On Tue, Jun 26, 2012 at 11:25 PM, Leif Walsh leif.wa...@gmail.com wrote: I'd like to be able to get a backtrace when a test times out with ctest, so I can analyze where the test was stuck, if at all. I tried writing a fake test to tell me what signal ctest was using to kill a timing out test, but it couldn't. I imagine this is because it uses SIGKILL and I can't trap that. Is this the case? Is there a way to change what ctest uses (perhaps SIGALRM, SIGPROF, or SIGUSR1/SIGUSR2) so I can have my tests trap that, dump a backtrace, and then abort? If not, could I request this feature? -- Cheers, Leif -- 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] ctest timeout: getting backtraces
Thanks. Who knows about kwsys? I only need this on a couple of platforms and don't mind doing it once for each. Sent from my iPhone On Jun 27, 2012, at 14:09, David Cole david.c...@kitware.com wrote: ctest uses the kwsys utilities to launch and monitor sub-processes. Theoretically, it goes like this, with variations in implementation from platform to platform: After a call to a kwsysProcessCreate function (which spawns a process asynchronously and returns control to ctest), we loop while calling either a WaitForData or WaitForExit function, collecting stdout and std err from the sub-process. Those wait functions may simply return a value to us that says hey, the timeout has expired and ctest does not even have to kill anything at that point. We hand the timeout value to the ProcessCreate function, so the system can kill it for us if it knows how to do that. If not, we also have a kwsysProcessKill function that we can call if necessary. So ... you can't use a sig trap reliably unless you know the implementation details of the whole system under the hood and you know for a fact that it's going to work on a given system. HTH, David On Tue, Jun 26, 2012 at 11:25 PM, Leif Walsh leif.wa...@gmail.com wrote: I'd like to be able to get a backtrace when a test times out with ctest, so I can analyze where the test was stuck, if at all. I tried writing a fake test to tell me what signal ctest was using to kill a timing out test, but it couldn't. I imagine this is because it uses SIGKILL and I can't trap that. Is this the case? Is there a way to change what ctest uses (perhaps SIGALRM, SIGPROF, or SIGUSR1/SIGUSR2) so I can have my tests trap that, dump a backtrace, and then abort? If not, could I request this feature? -- Cheers, Leif -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack and NSIS failure
2012/6/27 David Cole david.c...@kitware.com: Demelier David You can try: set(CPACK_NSIS_EXECUTABLES_DIRECTORY .) before you include(CPack). This bug ( http://public.kitware.com/Bug/view.php?id=7828 ) was resolved by adding the CPACK_NSIS_EXECUTABLES_DIRECTORY variable in this commit: In addition, and if you wonder about a variable usage you can do (since cpack 2.8.8): cpack --help-variable CPACK_NSIS_EXECUTABLES_DIRECTORY you can get the full list of documented CPack variable using: cpack --help-variables or dump it in html file: cpack --help-variables cpackvar.html then look for CPACK_NSIS_ in this and you'll get all CPack NSIS specific control vars. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] ctest timeout: getting backtraces
Never mind, I found it. SIGKILL is used. Oh well. Sent from my iPhone On Jun 27, 2012, at 14:54, Leif Walsh leif.wa...@gmail.com wrote: Thanks. Who knows about kwsys? I only need this on a couple of platforms and don't mind doing it once for each. Sent from my iPhone On Jun 27, 2012, at 14:09, David Cole david.c...@kitware.com wrote: ctest uses the kwsys utilities to launch and monitor sub-processes. Theoretically, it goes like this, with variations in implementation from platform to platform: After a call to a kwsysProcessCreate function (which spawns a process asynchronously and returns control to ctest), we loop while calling either a WaitForData or WaitForExit function, collecting stdout and std err from the sub-process. Those wait functions may simply return a value to us that says hey, the timeout has expired and ctest does not even have to kill anything at that point. We hand the timeout value to the ProcessCreate function, so the system can kill it for us if it knows how to do that. If not, we also have a kwsysProcessKill function that we can call if necessary. So ... you can't use a sig trap reliably unless you know the implementation details of the whole system under the hood and you know for a fact that it's going to work on a given system. HTH, David On Tue, Jun 26, 2012 at 11:25 PM, Leif Walsh leif.wa...@gmail.com wrote: I'd like to be able to get a backtrace when a test times out with ctest, so I can analyze where the test was stuck, if at all. I tried writing a fake test to tell me what signal ctest was using to kill a timing out test, but it couldn't. I imagine this is because it uses SIGKILL and I can't trap that. Is this the case? Is there a way to change what ctest uses (perhaps SIGALRM, SIGPROF, or SIGUSR1/SIGUSR2) so I can have my tests trap that, dump a backtrace, and then abort? If not, could I request this feature? -- Cheers, Leif -- 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] /STACK:10000000 being added to linker in Visual Studio?
This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.comwrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.comwrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
Put double quotes around the final ${flags} here, like this: string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) Otherwise, if ${flags} is empty, string(REGEX REPLACE will complain that it doesn't have any input string. Using the around it tells the command it really does have 6 arguments even if the final one is just the empty string. Even though the variable is named CMAKE_EXE_LINKER_FLAGS, I think it applies to dll targets, too, and that's the root source of the target property's initial value. So using my technique should obviate the need for this code. On Wed, Jun 27, 2012 at 3:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
Try my code, and tell us if it removes the generated /STACK from all your linker calls or not... Thx, David On Wed, Jun 27, 2012 at 3:22 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
I just tried your code and unfortunately /STACK still shows up for DLL targets, although for EXE targets it seems to be gone. On Wed, Jun 27, 2012 at 2:24 PM, David Cole david.c...@kitware.com wrote: Try my code, and tell us if it removes the generated /STACK from all your linker calls or not... Thx, David On Wed, Jun 27, 2012 at 3:22 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
Ah. I just read through Windows-cl.cmake again to refresh my memory Also do the same thing with these two variables: CMAKE_SHARED_LINKER_FLAGS for SHARED dll targets, and CMAKE_MODULE_LINKER_FLAGS for MODULE dll targets. That should take care of it. Whew. Maybe we should just remove it from CMake one of these days. Seems like a bit of an excessive stack size to have by default, doesn't it? :-) David On Wed, Jun 27, 2012 at 3:27 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I just tried your code and unfortunately /STACK still shows up for DLL targets, although for EXE targets it seems to be gone. On Wed, Jun 27, 2012 at 2:24 PM, David Cole david.c...@kitware.com wrote: Try my code, and tell us if it removes the generated /STACK from all your linker calls or not... Thx, David On Wed, Jun 27, 2012 at 3:22 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
Yeah certainly, especially since multicore is pretty much everywhere now and most applications are designed with parallelization in mind. Like every other compiler and linker flag out there, have the user manually set that up if they want it. CMake doesn't automatically add any other compiler flags for me, so /STACK shouldn't be any different IMHO. Thanks for your help, I will try using those new global variables. On Wed, Jun 27, 2012 at 2:35 PM, David Cole david.c...@kitware.com wrote: Ah. I just read through Windows-cl.cmake again to refresh my memory Also do the same thing with these two variables: CMAKE_SHARED_LINKER_FLAGS for SHARED dll targets, and CMAKE_MODULE_LINKER_FLAGS for MODULE dll targets. That should take care of it. Whew. Maybe we should just remove it from CMake one of these days. Seems like a bit of an excessive stack size to have by default, doesn't it? :-) David On Wed, Jun 27, 2012 at 3:27 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I just tried your code and unfortunately /STACK still shows up for DLL targets, although for EXE targets it seems to be gone. On Wed, Jun 27, 2012 at 2:24 PM, David Cole david.c...@kitware.com wrote: Try my code, and tell us if it removes the generated /STACK from all your linker calls or not... Thx, David On Wed, Jun 27, 2012 at 3:22 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
Here is my final code, this seems to work for both DLL and EXE targets: string( REGEX REPLACE /STACK:[0-9]+ CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} ) string( REGEX REPLACE /STACK:[0-9]+ CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} ) string( REGEX REPLACE /STACK:[0-9]+ CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} ) Thanks for the super quick help David! On Wed, Jun 27, 2012 at 2:38 PM, Robert Dailey rcdailey.li...@gmail.comwrote: Yeah certainly, especially since multicore is pretty much everywhere now and most applications are designed with parallelization in mind. Like every other compiler and linker flag out there, have the user manually set that up if they want it. CMake doesn't automatically add any other compiler flags for me, so /STACK shouldn't be any different IMHO. Thanks for your help, I will try using those new global variables. On Wed, Jun 27, 2012 at 2:35 PM, David Cole david.c...@kitware.comwrote: Ah. I just read through Windows-cl.cmake again to refresh my memory Also do the same thing with these two variables: CMAKE_SHARED_LINKER_FLAGS for SHARED dll targets, and CMAKE_MODULE_LINKER_FLAGS for MODULE dll targets. That should take care of it. Whew. Maybe we should just remove it from CMake one of these days. Seems like a bit of an excessive stack size to have by default, doesn't it? :-) David On Wed, Jun 27, 2012 at 3:27 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I just tried your code and unfortunately /STACK still shows up for DLL targets, although for EXE targets it seems to be gone. On Wed, Jun 27, 2012 at 2:24 PM, David Cole david.c...@kitware.com wrote: Try my code, and tell us if it removes the generated /STACK from all your linker calls or not... Thx, David On Wed, Jun 27, 2012 at 3:22 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] /STACK:10000000 being added to linker in Visual Studio?
You're welcome! Glad it worked well. On Wed, Jun 27, 2012 at 3:42 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Here is my final code, this seems to work for both DLL and EXE targets: string( REGEX REPLACE /STACK:[0-9]+ CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} ) string( REGEX REPLACE /STACK:[0-9]+ CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} ) string( REGEX REPLACE /STACK:[0-9]+ CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} ) Thanks for the super quick help David! On Wed, Jun 27, 2012 at 2:38 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Yeah certainly, especially since multicore is pretty much everywhere now and most applications are designed with parallelization in mind. Like every other compiler and linker flag out there, have the user manually set that up if they want it. CMake doesn't automatically add any other compiler flags for me, so /STACK shouldn't be any different IMHO. Thanks for your help, I will try using those new global variables. On Wed, Jun 27, 2012 at 2:35 PM, David Cole david.c...@kitware.com wrote: Ah. I just read through Windows-cl.cmake again to refresh my memory Also do the same thing with these two variables: CMAKE_SHARED_LINKER_FLAGS for SHARED dll targets, and CMAKE_MODULE_LINKER_FLAGS for MODULE dll targets. That should take care of it. Whew. Maybe we should just remove it from CMake one of these days. Seems like a bit of an excessive stack size to have by default, doesn't it? :-) David On Wed, Jun 27, 2012 at 3:27 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I just tried your code and unfortunately /STACK still shows up for DLL targets, although for EXE targets it seems to be gone. On Wed, Jun 27, 2012 at 2:24 PM, David Cole david.c...@kitware.com wrote: Try my code, and tell us if it removes the generated /STACK from all your linker calls or not... Thx, David On Wed, Jun 27, 2012 at 3:22 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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] Supplying different debug flags during compile and link stages for libraries and executables
Hi, On AIX using the XLC compiler I've determined the debug flag (-g) should be used for all compile stages but should only be supplied to the final link stage of an executable (not a library target), otherwise duplicate symbol errors result. For reference see: http://www.ibm.com/developerworks/forums/thread.jspa?threadID=438591tstart=0 Is there an easy way of supplying a different set of debug flags for the compile stage as opposed to the link stage? I could potentially override: CMAKE_C_FLAGS_DEBUG_INIT CMAKE_CXX_FLAGS_DEBUG_INIT but I can't really see where these are combined into the compile / link rules. Does anyone have any suggestions? Any guidance / help is appreciated. Thanks, -- Best Regards, Brett Delle Grazie -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack and NSIS failure
2012/6/27 Eric Noulard eric.noul...@gmail.com: 2012/6/27 David Cole david.c...@kitware.com: Demelier David You can try: set(CPACK_NSIS_EXECUTABLES_DIRECTORY .) before you include(CPack). This bug ( http://public.kitware.com/Bug/view.php?id=7828 ) was resolved by adding the CPACK_NSIS_EXECUTABLES_DIRECTORY variable in this commit: In addition, and if you wonder about a variable usage you can do (since cpack 2.8.8): cpack --help-variable CPACK_NSIS_EXECUTABLES_DIRECTORY you can get the full list of documented CPack variable using: cpack --help-variables or dump it in html file: cpack --help-variables cpackvar.html then look for CPACK_NSIS_ in this and you'll get all CPack NSIS specific control vars. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org Thanks for your help, it worked! Now, the last problem, I noticed that CPACK_PACKAGE_EXECUTABLES you can't set an icon, thus I used my own CreateShortCut and Delete with respectively CPACK_NSIS_CREATE_ICONS_EXTRA and CPACK_NSIS_DELETE_ICONS_EXTRA. The first one works, but not the second. set(CPACK_NSIS_CREATE_ICONS_EXTRA CreateShortCut '$SMPROGRAMS$STARTMENU_FOLDER${PROJECT_NAME}.lnk' '$INSTDIRsd-tris.exe' '' '${ICONPATH}' ) set(CPACK_NSIS_DELETE_ICONS_EXTRA Delete '$SMPROGRAMS$STARTMENU_FOLDER${PROJECT_NAME}.lnk' ) When uninstalling, the window menu entry is still there and not removed at all. But the project.nsi has the line Delete \ '$SMPROGRAMS\$STARTMENU_FOLDER\sd-tris.lnk' But this command is not executed by the Uninstall.exe. Cheers, and thanks for your attention! -- Demelier David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Can we control component package name in 2.8.8?
Thanks Eric and Micha for the clarification. Jupiter On Thu, Jun 28, 2012 at 12:54 AM, Eric Noulard eric.noul...@gmail.comwrote: 2012/6/27 hce jupiter@gmail.com: Hi, I've read some discussions posted ten months ago on http://cmake.3232098.n2.nabble.com/Component-Package-Name-td6976896.html where Eric Noulard pointed out that we could not control component package name for the reason of unique package name. I am currently running on 2.8.8 and generated very funny component package name: foo-1.1-1.0.el6.x86_64-FooComponent.rpm, it basically set by following format: ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-${COMPONENT_NAME}.rpm That is not a good format of rpm package name. Can we take control the component package name in 2.8.8? Not yet see: http://public.kitware.com/Bug/view.php?id=12997 Won't probably be in 2.8.9 either. I know it will be useful for many of us, I just lack time to go through it. The work is not that difficult but it has many potential impact so that we shall take time to do it carefully. BTW, when I build two packages foo-1.1 and , the bin-1.2, the CPack generates an extra Unspecified package, theCPackConfig.cmake set: SET(CPACK_COMPONENTS_ALL foo-1.1-1.0.el6.x86_64;bin-1.2-1.el6.x86_6;Unspecified) Where the Unspecified come from and now can I fix it? As Micha said, this comes from an INSTALL statement which does not contains COMPONENT. see http://www.vtk.org/Wiki/CMake:Component_Install_With_CPack#Specificying_components_and_groups or this recent discussion: http://www.cmake.org/pipermail/cmake/2012-June/050855.html -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?
As an option you can set up all these flags manually. In my current project we don't have many compilers to support but we need fine-grained control over compiler options (due to legacy and compatibility reasons). CMake allows to set precisely required options: # Override default Compiler flags set(CMAKE_USER_MAKE_RULES_OVERRIDE MyCompilerFlags) project(MyProject) Where MyCompilerFlags contains something like this: if(MSVC) # Set default linker options. set(CMAKE_SHARED_LINKER_FLAGS_INIT /MACHINE:X86 /DEBUG) set(CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT /INCREMENTAL:NO) set(CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT /INCREMENTAL:NO) # Now use same options for all dynamic modules. set(CMAKE_EXE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT}) set(CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT}) set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT}) set(CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT}) set(CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT}) set(CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT}) set(CMAKE_CXX_FLAGS_INIT ${CMAKE_CXX_FLAGS_INIT} /Zi /D_WIN32_WINNT=0x0501) if(MSVC_VERSION GREATER 1200) set(CMAKE_CXX_FLAGS_INIT ${CMAKE_CXX_FLAGS_INIT} /WX /D_SCL_SECURE_NO_DEPRECATE /wd4251 /wd4275 /wd4503) endif() endif(MSVC) # # Tune compiler and linker flags. # if(CMAKE_COMPILER_IS_GNUCXX) # Our default policy: Treat all warnings as errors. # Build multi-threaded libraries and applications. set(CMAKE_C_FLAGS_INIT -fmessage-length=0 -pthread -D_REENTRANT -ggdb) # Enable C++ 0x support. set(CMAKE_CXX_FLAGS_INIT ${CMAKE_C_FLAGS_INIT} -std=c++0x) endif(CMAKE_COMPILER_IS_GNUCXX) On Wed, Jun 27, 2012 at 11:38 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Yeah certainly, especially since multicore is pretty much everywhere now and most applications are designed with parallelization in mind. Like every other compiler and linker flag out there, have the user manually set that up if they want it. CMake doesn't automatically add any other compiler flags for me, so /STACK shouldn't be any different IMHO. Thanks for your help, I will try using those new global variables. On Wed, Jun 27, 2012 at 2:35 PM, David Cole david.c...@kitware.com wrote: Ah. I just read through Windows-cl.cmake again to refresh my memory Also do the same thing with these two variables: CMAKE_SHARED_LINKER_FLAGS for SHARED dll targets, and CMAKE_MODULE_LINKER_FLAGS for MODULE dll targets. That should take care of it. Whew. Maybe we should just remove it from CMake one of these days. Seems like a bit of an excessive stack size to have by default, doesn't it? :-) David On Wed, Jun 27, 2012 at 3:27 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I just tried your code and unfortunately /STACK still shows up for DLL targets, although for EXE targets it seems to be gone. On Wed, Jun 27, 2012 at 2:24 PM, David Cole david.c...@kitware.com wrote: Try my code, and tell us if it removes the generated /STACK from all your linker calls or not... Thx, David On Wed, Jun 27, 2012 at 3:22 PM, Robert Dailey rcdailey.li...@gmail.com wrote: Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE /STACK:[0-9]+ flags ${flags} ) set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} ) endfunction() I call this once for each target I define. On Wed, Jun 27, 2012 at 2:17 PM, David Cole david.c...@kitware.com wrote: You could do: string(REPLACE /STACK:1000 CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) after the first project command in the top level CMakeLists file. (Or /STACK:some other number to change it, instead of the empty string to just remove it...) The /STACK string only appears in the two files: Modules/Platform/Windows-Intel.cmake Modules/Platform/Windows-cl.cmake HTH, David On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey rcdailey.li...@gmail.com wrote: This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- Powered by www.kitware.com Visit other Kitware open-source projects at
[Cmake-commits] CMake branch, next, updated. v2.8.8-3329-g5ddf0cd
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 5ddf0cddcc1fc600ef650217f1edc8d25a68030c (commit) via 92356038952df71894ea1c390f5b5902df8780be (commit) from 9da814b1b61b6cdafe30cb0e7d2bbf6a8b7f7fb3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ddf0cddcc1fc600ef650217f1edc8d25a68030c commit 5ddf0cddcc1fc600ef650217f1edc8d25a68030c Merge: 9da814b 9235603 Author: Stephen Kelly steve...@gmail.com AuthorDate: Wed Jun 27 10:42:55 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 27 10:42:55 2012 -0400 Merge topic 'fix-pie-clang-trunk' into next 9235603 Fix PositionIndependentTargets test with clang trunk. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92356038952df71894ea1c390f5b5902df8780be commit 92356038952df71894ea1c390f5b5902df8780be Author: Stephen Kelly steve...@gmail.com AuthorDate: Wed Jun 27 16:38:57 2012 +0200 Commit: Stephen Kelly steve...@gmail.com CommitDate: Wed Jun 27 16:39:24 2012 +0200 Fix PositionIndependentTargets test with clang trunk. The __PIE__ define might be set instead of __PIC__ if fPIE is used. http://llvm.org/bugs/show_bug.cgi?id=13221 diff --git a/Tests/PositionIndependentTargets/pic_test.h b/Tests/PositionIndependentTargets/pic_test.h index 3f64557..13cf8f7 100644 --- a/Tests/PositionIndependentTargets/pic_test.h +++ b/Tests/PositionIndependentTargets/pic_test.h @@ -1,7 +1,7 @@ #if defined(__ELF__) -# if !defined(__PIC__) -#error The POSITION_INDEPENDENT_CODE property should cause __PIC__ to be defined on ELF platforms. +# if !defined(__PIC__) !defined(__PIE__) +#error The POSITION_INDEPENDENT_CODE property should cause __PIC__ or __PIE__ to be defined on ELF platforms. # endif #endif --- Summary of changes: Tests/PositionIndependentTargets/pic_test.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.8-3331-g92aadd6
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 92aadd68345a3aa3df5a480465c4e28aca8d4a59 (commit) via 5f12424ebc9f810ef279d09f1e660e20558dd535 (commit) from 5ddf0cddcc1fc600ef650217f1edc8d25a68030c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92aadd68345a3aa3df5a480465c4e28aca8d4a59 commit 92aadd68345a3aa3df5a480465c4e28aca8d4a59 Merge: 5ddf0cd 5f12424 Author: Bill Hoffman bill.hoff...@kitware.com AuthorDate: Wed Jun 27 12:32:15 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 27 12:32:15 2012 -0400 Merge topic 'make_cldep_use_cmake_process_exec' into next 5f12424 Remove process execution code from cmcldeps and have it use cmake code. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f12424ebc9f810ef279d09f1e660e20558dd535 commit 5f12424ebc9f810ef279d09f1e660e20558dd535 Author: Bill Hoffman bill.hoff...@kitware.com AuthorDate: Wed Jun 27 12:28:12 2012 -0400 Commit: Bill Hoffman bill.hoff...@kitware.com CommitDate: Wed Jun 27 12:28:12 2012 -0400 Remove process execution code from cmcldeps and have it use cmake code. This simplifies the code in cmcldeps and avoids having yet another set of process execution code. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 2c6bc76..14af796 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -386,6 +386,7 @@ IF(CMAKE_ENABLE_NINJA) IF(WIN32 AND NOT CYGWIN AND NOT BORLAND) SET_SOURCE_FILES_PROPERTIES(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501) ADD_EXECUTABLE(cmcldeps cmcldeps.cxx) +TARGET_LINK_LIBRARIES(cmcldeps CMakeLib) INSTALL_TARGETS(/bin cmcldeps) ENDIF() ELSE() diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index 7d3c4bd..39f696f 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -1,8 +1,4 @@ -/* -ninja's subprocess.h -*/ - -// Copyright 2012 Google Inc. All Rights Reserved. +// Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. @@ -16,114 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NINJA_SUBPROCESS_H_ -#define NINJA_SUBPROCESS_H_ -#include string -#include vector -#include queue -#include cstdio -#include algorithm +// Wrapper around cl that adds /showIncludes to command line, and uses that to +// generate .d files that match the style from gcc -MD. +// +// /showIncludes is equivalent to -MD, not -MMD, that is, system headers are +// included. -#ifdef _WIN32 #include windows.h -#else -#include signal.h -#endif - - -#if defined(_WIN64) -typedef unsigned __int64 cmULONG_PTR; -#else -typedef unsigned long cmULONG_PTR; -#endif - -//#include exit_status.h -enum ExitStatus { - ExitSuccess, - ExitFailure, - ExitInterrupted -}; - -/// Subprocess wraps a single async subprocess. It is entirely -/// passive: it expects the caller to notify it when its fds are ready -/// for reading, as well as call Finish() to reap the child once done() -/// is true. -struct Subprocess { - ~Subprocess(); - - /// Returns ExitSuccess on successful process exit, ExitInterrupted if - /// the process was interrupted, ExitFailure if it otherwise failed. - ExitStatus Finish(); - - bool Done() const; - - const std::string GetOutput() const; - - int ExitCode() const { return exit_code_; } - - private: - Subprocess(); - bool Start(struct SubprocessSet* set, const std::string command, -const std::string dir); - void OnPipeReady(); - - std::string buf_; - -#ifdef _WIN32 - /// Set up pipe_ as the parent-side pipe of the subprocess; return the - /// other end of the pipe, usable in the child process. - HANDLE SetupPipe(HANDLE ioport); - - PROCESS_INFORMATION child_; - HANDLE pipe_; - OVERLAPPED overlapped_; - char overlapped_buf_[4 10]; - bool is_reading_; - int exit_code_; -#else - int fd_; - pid_t pid_; -#endif - - friend struct SubprocessSet; -}; - -/// SubprocessSet runs a ppoll/pselect() loop around a set of Subprocesses. -/// DoWork() waits for any state change in subprocesses; finished_ -/// is a queue of subprocesses as they finish. -struct SubprocessSet { - SubprocessSet(); - ~SubprocessSet(); - - Subprocess* Add(const std::string command, const std::string dir); - bool DoWork(); - Subprocess* NextFinished(); - void Clear(); - - std::vectorSubprocess* running_; - std::queueSubprocess* finished_; - -#ifdef
[Cmake-commits] CMake branch, next, updated. v2.8.8-3333-gd83c8d1
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via d83c8d16b7b2cceadc9e031283ffae9244e48fa4 (commit) via d7bc8dd6ea5fcecf613134764a040238cb115b4c (commit) from 92aadd68345a3aa3df5a480465c4e28aca8d4a59 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d83c8d16b7b2cceadc9e031283ffae9244e48fa4 commit d83c8d16b7b2cceadc9e031283ffae9244e48fa4 Merge: 92aadd6 d7bc8dd Author: Alexander Neundorf neund...@kde.org AuthorDate: Wed Jun 27 17:41:46 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 27 17:41:46 2012 -0400 Merge topic 'EclipseFixIncludeDirDetectionMinGW' into next d7bc8dd Eclipse: fix #13313, always set LANG to C, also if unset http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7bc8dd6ea5fcecf613134764a040238cb115b4c commit d7bc8dd6ea5fcecf613134764a040238cb115b4c Author: Alex Neundorf neund...@kde.org AuthorDate: Mon Jun 25 23:09:27 2012 +0200 Commit: Alex Neundorf neund...@kde.org CommitDate: Mon Jun 25 23:09:27 2012 +0200 Eclipse: fix #13313, always set LANG to C, also if unset Otherwise include dir detection does not work with MinGW on french systems. Alex diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake index 1b4532d..455f95f 100644 --- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake +++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake @@ -80,15 +80,10 @@ ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang) SET(_orig_lc_all $ENV{LC_ALL}) SET(_orig_lc_messages $ENV{LC_MESSAGES}) SET(_orig_lang$ENV{LANG}) -IF(_orig_lc_all) - SET(ENV{LC_ALL} C) -ENDIF() -IF(_orig_lc_messages) - SET(ENV{LC_MESSAGES} C) -ENDIF() -IF(_orig_lang) - SET(ENV{LANG}C) -ENDIF() + +SET(ENV{LC_ALL} C) +SET(ENV{LC_MESSAGES} C) +SET(ENV{LANG}C) # Now check for C, works for gcc and Intel compiler at least IF (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS) @@ -109,12 +104,6 @@ IF (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS) ENDIF () # Restore original LC_ALL, LC_MESSAGES, and LANG -IF(_orig_lc_all) - SET(ENV{LC_ALL} ${_orig_lc_all}) -ENDIF() -IF(_orig_lc_messages) - SET(ENV{LC_MESSAGES} ${_orig_lc_messages}) -ENDIF() -IF(_orig_lang) - SET(ENV{LANG}${_orig_lang}) -ENDIF() +SET(ENV{LC_ALL} ${_orig_lc_all}) +SET(ENV{LC_MESSAGES} ${_orig_lc_messages}) +SET(ENV{LANG}${_orig_lang}) --- Summary of changes: ...atorDetermineCompilerMacrosAndIncludeDirs.cmake | 25 +-- 1 files changed, 7 insertions(+), 18 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.8-3336-g11db89a
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 11db89a27de99758d69bdd8c027516c5485bf0e2 (commit) via ee158b367c00682aabdcecee080f662af2ffafc3 (commit) via 61dbddd8afe9e3db96d54a10bc426a5592ea0c3c (commit) from d83c8d16b7b2cceadc9e031283ffae9244e48fa4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11db89a27de99758d69bdd8c027516c5485bf0e2 commit 11db89a27de99758d69bdd8c027516c5485bf0e2 Merge: d83c8d1 ee158b3 Author: Rolf Eike Beer e...@sf-mail.de AuthorDate: Wed Jun 27 17:45:06 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 27 17:45:06 2012 -0400 Merge topic 'variable-doc-spaces' into next ee158b3 fix 2 space bugs in variable documentation 61dbddd CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee158b367c00682aabdcecee080f662af2ffafc3 commit ee158b367c00682aabdcecee080f662af2ffafc3 Author: Rolf Eike Beer e...@sf-mail.de AuthorDate: Wed Jun 27 23:44:54 2012 +0200 Commit: Rolf Eike Beer e...@sf-mail.de CommitDate: Wed Jun 27 23:44:54 2012 +0200 fix 2 space bugs in variable documentation diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index 592d931..77aaffc 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -218,7 +218,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) Full path to ctest command installed with cmake., This is the full path to the CTest executable ctest which is useful from custom commands that want - to use the cmake -E option for portable system + to use the cmake -E option for portable system commands.,false, Variables that Provide Information); @@ -355,7 +355,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) If this is set to TRUE, then the rpath information is not added to compiled executables. The default is to add rpath information if the platform supports it. - This allows for easy running from the build tree. To omit RPATH + This allows for easy running from the build tree. To omit RPATH in the install step, but not the build step, use CMAKE_SKIP_INSTALL_RPATH instead.,false, Variables that Provide Information); --- Summary of changes: Source/CMakeVersion.cmake |2 +- Source/cmDocumentVariables.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v2.8.8-418-g3cb7eef
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 3cb7eefd55cada0e334bbe4adf3b2ca4b3dfd70d (commit) from 61dbddd8afe9e3db96d54a10bc426a5592ea0c3c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cb7eefd55cada0e334bbe4adf3b2ca4b3dfd70d commit 3cb7eefd55cada0e334bbe4adf3b2ca4b3dfd70d Author: Kitware Robot kwro...@kitware.com AuthorDate: Thu Jun 28 00:01:05 2012 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Thu Jun 28 00:01:05 2012 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 190dc49..09fb8b6 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_PATCH 8) -SET(CMake_VERSION_TWEAK 20120627) +SET(CMake_VERSION_TWEAK 20120628) #SET(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits