[cmake-developers] automoc: Use a pre-build event in VS = 7
Alex, Steve, I just made this automoc change: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20c99b1d in response to discussion here: http://www.cmake.org/Bug/view.php?id=13900#c32710 In addition to working around a VS 2012 bug, it also makes projects look nicer in the VS IDE by not loading *_automoc targets. Instead it uses PRE_BUILD events in the respective original targets. IIUC VS runs these events when starting a target if and only iff any of the rules in the target are out of date. Therefore when headers or sources change that require any re-compilation in a target it will be re-automoc-ed again. -Brad -- 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] Creating Windows 7 manifests with mingw builds
On 03/30/2013 02:17 PM, Ralf Habacker wrote: Because gnu linker is not able to add manifests directly, an additional step is required. The following approach should work for this case as far as i can see. - add the the mt binary to ${CMAKE_ROOT}/Binaries/ so that it is not in the search path (to not conflict with msvc provided mt) Yes, we can find a place to install it that is not next to cmake.exe so it won't be in the PATH. We could also build it into CMake as cmake -E mt or something since we can fold in the generously licensed implementation. - add the macro below to ${CMAKE_ROOT}/Modules/Platform/Windows-GNU.cmake The macro-replacement of builtin commands is a debugging feature. We can find another way to execute this. Basically it just needs to be run right after the linker, right? Thanks, -Brad -- 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] usr-move v. cross-compiling
Alex, Please look at this issue: http://www.cmake.org/Bug/view.php?id=14041 Our usr-move changes to hard-code the /usr prefix conflicts with cross-compiling cases where the host side relocates a package under some new root and finds it with CMAKE_FIND_ROOT_PATH. Thanks, -Brad -- 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 0014054]: Add link to current release
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=14054 == Reported By:Jean-Christophe Fillion-Robin Assigned To: == Project:CMake Issue ID: 14054 Category: Documentation Reproducibility:have not tried Severity: minor Priority: normal Status: new == Date Submitted: 2013-04-01 19:45 WAST Last Modified: 2013-04-01 19:45 WAST == Summary:Add link to current release Description: On the download page of cmake.org, there are no link to obtain the release candidate. Updating the section Current development distribution by adding a link to the following page would be helpful: http://www.cmake.org/files/v2.8/?C=M;O=D This is related to http://public.kitware.com/Bug/view.php?id=13921 == Issue History Date ModifiedUsername FieldChange == 2013-04-01 19:45 Jean-Christophe Fillion-RobinNew 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-developers] Creating Windows 7 manifests with mingw builds
Am 01.04.2013 16:13, schrieb Brad King: On 03/30/2013 02:17 PM, Ralf Habacker wrote: Because gnu linker is not able to add manifests directly, an additional step is required. The following approach should work for this case as far as i can see. - add the the mt binary to ${CMAKE_ROOT}/Binaries/ so that it is not in the search path (to not conflict with msvc provided mt) Yes, we can find a place to install it that is not next to cmake.exe so it won't be in the PATH. We could also build it into CMake as cmake -E mt or something since we can fold in the generously licensed implementation. - add the macro below to ${CMAKE_ROOT}/Modules/Platform/Windows-GNU.cmake The macro-replacement of builtin commands is a debugging feature. We can find another way to execute this. Basically it just needs to be run right after the linker, right? yes Ralf -- 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 0014055]: Qt4ConfigDependentSettings.cmake CMAKE_THREAD_PREFER_PTHREADS
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=14055 == Reported By:Marcin Wojdyr Assigned To: == Project:CMake Issue ID: 14055 Category: Modules Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2013-04-01 15:56 EDT Last Modified: 2013-04-01 15:56 EDT == Summary:Qt4ConfigDependentSettings.cmake CMAKE_THREAD_PREFER_PTHREADS Description: In Qt4ConfigDependentSettings.cmake we have: set(CMAKE_THREAD_PREFER_PTHREADS 1) find_package(Threads) but FindThreads.cmake checks CMAKE_THREAD_PREFER_PTHREAD (without 'S'). It may be related to http://www.cmake.org/Bug/view.php?id=11136 == Issue History Date ModifiedUsername FieldChange == 2013-04-01 15:56 Marcin Wojdyr 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] non-png backgrounds for dmg packages
Hi, First, thanks for a great tool. I was trying to add a pdf image as a background to my dmg file and I noticed that png is hard coded in the source. So I've attached a small patch that keeps the extension from the original file. Without this patch the pdf file does not load as the background image. This patch was tested against 2.8.10.2. Thanks for your time, -Brian dmg-background-ext.patch Description: Binary data -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to let the user select the compiler and compiler flags.
Hi all, I am just getting started with CMake. Here is my question: Is there a good way to have an external config file that specifies both the compiler an compile flags? The program is compiled many times, and it makes sense to have the compiler and flags in a config file rather than have them in the command line. I am hoping to use CMake itself as the language of the config file. For example: # - myprogram.cmake - # Local configuration file. set (CMAKE_Fortran_COMPILER mpif90) set (CMAKE_Fortran_FLAGS -fdefault-real-8) set (CMAKE_Fortran_FLAGS_DEBUG -O0 -g -fbounds-check) set (CMAKE_Fortran_FLAGS_RELEASE -O3) set (CMAKE_BUILD_TYPE RELEASE) I think this would be a useful config file and I can just include it in CMakeLists.txt. The problem is that the compiler must be specified before I run project(), while the compile flags must be specified AFTER project(): cmake_minimum_required (VERSION 2.8) include (path/to/myprogram.cmake) enable_language (Fortran) project (MyProgram) At this point all the compile flags have been overwritten by enable_language() and project(). Can anyone suggest a good solution? I have a few ideas, but I am not sure about them: 1) I could give up on the idea of using CMake in the config file. The config file could be a shell script that sets some environment variables. My understanding is that this will work, but you would lose the flexibility of CMake. 2) I could load the config file twice. Once before, and once after project(). I am not sure if this would have any unexpected side-effects. 3) I could store the flags in the cache. But I am not sure if overwriting the cache is a good idea or not. 4) I could use a shell script to split the config file into the compiler part and everything else, and then load them separately. I think I like this option, but I am not fully aware of the side-effects. Does anyone have any words of advice or wisdom to share with me? Cheers, Daniel. -- Lord of the rings calendar in your Linux/Unix/Mac terminal: cat /usr/share/calendar/calendar.lotr -- 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] Potential bug to set a working directory for test
No feedback yet, so I suppose I should post a issue ticket. Joel Lamotte -- 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] The else() in CMAKE_TOOLCHAIN_FILE
Hi all, I've a problem in using else() in CMAKE_TOOLCHAIN_FILE, all files are: #==CMakeLists.txt== message(TEST) #==config.cmake== if(A) message(A) elseif(B) message(B) elseif(C) message(C) else() message(FATAL_ERROR NONE) endif() and I run the cmake: $ cmake -DCMAKE_TOOLCHAIN_FILE=./config.cmake -DA=true . cmake returns: A A -- The C compiler identification is GNU 4.7.2 -- The CXX compiler identification is GNU 4.7.2 -- Check for working C compiler: /usr/bin/gcc CMake Error at /home/zhongwei/projects/cmake_test/config.cmake:8 (message): NONE Call Stack (most recent call first): /home/zhongwei/projects/cmake_test/build/CMakeFiles/CMakeSystem.cmake:1 (INCLUDE) CMakeLists.txt:2 (PROJECT) CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Configuring incomplete, errors occurred! My problem is why the else() statement is still run when A=true? Thanks, ashi -- 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] Multiple platform targets (iOS and OSX)
Hi, I am using CMake to build a solution consisting of several projects (using Visual Studio lingo here) where some of them are libraries, some executables. Some executables can run only on the OS (i.e. OSX and Windows) and will not work correctly on iOS. We have one such executable that manipulates a version file in the repository each time there is a build. This executable must be part of the same XCode project, otherwise it will not run. I am aware that I can separate this out into a new project and have CMake run the file but that requires more maintainance (as the user now has to not only create/build the main project via CMake but also the above mentioned project). In CMake for iOS builds, I set CMAKE_OSX_SYSROOT in the root CMakeLists.txt file to iphoneos. It turns out I cannot change it again (for the above mentioned project). XCode is capable of allowing targets to be a mixture of iOS and OSX. Is that possible with CMake? Thanks, Saad -- 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] How to let the user select the compiler and compiler flags.
Do use CACHE with your set statements to put them in the cache, and then use the -C command line argument to prime the cache with your file, rather than including it in your CMakeLists file. That should have the effect you're seeking... HTH, David C. On Apr 1, 2013, at 3:54 AM, Daniel Carrera dcarr...@gmail.com wrote: Hi all, I am just getting started with CMake. Here is my question: Is there a good way to have an external config file that specifies both the compiler an compile flags? The program is compiled many times, and it makes sense to have the compiler and flags in a config file rather than have them in the command line. I am hoping to use CMake itself as the language of the config file. For example: # - myprogram.cmake - # Local configuration file. set (CMAKE_Fortran_COMPILER mpif90) set (CMAKE_Fortran_FLAGS -fdefault-real-8) set (CMAKE_Fortran_FLAGS_DEBUG -O0 -g -fbounds-check) set (CMAKE_Fortran_FLAGS_RELEASE -O3) set (CMAKE_BUILD_TYPE RELEASE) I think this would be a useful config file and I can just include it in CMakeLists.txt. The problem is that the compiler must be specified before I run project(), while the compile flags must be specified AFTER project(): cmake_minimum_required (VERSION 2.8) include (path/to/myprogram.cmake) enable_language (Fortran) project (MyProgram) At this point all the compile flags have been overwritten by enable_language() and project(). Can anyone suggest a good solution? I have a few ideas, but I am not sure about them: 1) I could give up on the idea of using CMake in the config file. The config file could be a shell script that sets some environment variables. My understanding is that this will work, but you would lose the flexibility of CMake. 2) I could load the config file twice. Once before, and once after project(). I am not sure if this would have any unexpected side-effects. 3) I could store the flags in the cache. But I am not sure if overwriting the cache is a good idea or not. 4) I could use a shell script to split the config file into the compiler part and everything else, and then load them separately. I think I like this option, but I am not fully aware of the side-effects. Does anyone have any words of advice or wisdom to share with me? Cheers, Daniel. -- Lord of the rings calendar in your Linux/Unix/Mac terminal: cat /usr/share/calendar/calendar.lotr -- 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] non-png backgrounds for dmg packages
Hi Brian, Thanks for contributing. Looks good to me Would it be possible to create a topic and push it into our staging area ? See http://www.cmake.org/Wiki/CMake/Git/Develop#Share_a_Topic Thanks Jc On Mon, Apr 1, 2013 at 3:14 AM, Brian Milco bcmi...@gmail.com wrote: Hi, First, thanks for a great tool. I was trying to add a pdf image as a background to my dmg file and I noticed that png is hard coded in the source. So I've attached a small patch that keeps the extension from the original file. Without this patch the pdf file does not load as the background image. This patch was tested against 2.8.10.2. Thanks for your time, -Brian -- 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 -- +1 919 869 8849 -- 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] iOS library out path
Hi, If I set the LIBRARY_OUTPUT_PATH for iOS projects like this: someDir/lib/ then the final directory for the library outputs is: someDir/lib/debug assuming I am building the debug configuration. But if I now specify the directories for linking: link_directories(someDir/lib) in Xcode the path becomes: someDir/lib/debug-iphonesimulator If I do not set LIBRARY_OUTPUT_PATH then CMake correct sets the output directory to build/src/debug-iphonesimulator So it appears that CMake does not add -iphonesimulator (or doesn't let Xcode add it - not sure as my knowledge of CMake is limited) for custom library output paths. Is this a bug? If not, what am I doing wrong? Thanks, Saad -- 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] copy_if_different on build
On 2013-03-29 17:07, Skippy VonDrake wrote: I'll look closer at add_custom_command. I want the file to copy over if it has changed - at build time. Not cmake time. And not copy if it hasn't changed. But that may not be doable. Seems like every StackOverflow post I see has a different take on how to do this simple process. That's a little surprising... as you say, this shouldn't be complicated. I believe what you want is: add_custom_command( OUTPUT ${output} DEPENDS ${input} COMMAND ${CMAKE_COMMAND} -E copy ${input} ${output} ...which is roughly equivalent to a Makefile rule like: output: input cp input output IOW, the file ${output} depends on the file ${input} (so the target will only run when ${input} is newer than ${output}), and will be created by copying ${input} to ${output} (using 'cmake -E' for portability). Don't forget to have an actual target depend on ${output} :-). (Probably you are using it as a source file for a library or executable, so there is no problem.) You may also want to use 'copy_if_different' instead of just 'copy', which won't change the time stamp of ${output} if the contents are the same as ${input}. On the plus side, this means that large targets depending on ${output} won't be needlessly rebuilt/relinked. On the down side, the copy_if_different will remain out of date, and as a result still think it needs to run after a successful build. -- Matthew -- 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] string(REGEX REPLACE …) syntax problem
On Mar 30, 2013, at 11:29 PM, David Cole dlrd...@aol.com wrote: REGEX REPLACE will replace this with that in the entire input string, everywhere it matches. If you want to limit it to just the one bit that matches inside the parenthesis, you have to match the entire string, too, so that it will also be replaced. In your example, the \\1 is being set to Release and the /build Release is being replaced with \\1 in the entire input string. So in effect, you erased the /build from in front of it. What you want is to erase the whole string, except for the Release, right? This should work: string(REGEX REPLACE ^.*/build ([A-Za-z]+).*$ \\1 BUILD_CONFIG ${FOO}) I just added ^.* at the beginning, and .*$ at the end, so it matches the entire input string. Thank you... That makes sense, now that I think about it. -- Braden McDaniel bra...@endoframe.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] How to let the user select the compiler and compiler flags.
Hi David, Thanks. That seems to work well. I tweaked your idea to allow the user to have two different config files. To do that, instead of using -C, I have two include lines in my CMakeLists.txt. It seems to work well. I just have to make sure I explain clearly which file takes precedence. Cheers, Daniel. On 1 April 2013 16:34, David Cole dlrd...@aol.com wrote: Do use CACHE with your set statements to put them in the cache, and then use the -C command line argument to prime the cache with your file, rather than including it in your CMakeLists file. That should have the effect you're seeking... HTH, David C. On Apr 1, 2013, at 3:54 AM, Daniel Carrera dcarr...@gmail.com wrote: Hi all, I am just getting started with CMake. Here is my question: Is there a good way to have an external config file that specifies both the compiler an compile flags? The program is compiled many times, and it makes sense to have the compiler and flags in a config file rather than have them in the command line. I am hoping to use CMake itself as the language of the config file. For example: # - myprogram.cmake - # Local configuration file. set (CMAKE_Fortran_COMPILER mpif90) set (CMAKE_Fortran_FLAGS -fdefault-real-8) set (CMAKE_Fortran_FLAGS_DEBUG -O0 -g -fbounds-check) set (CMAKE_Fortran_FLAGS_RELEASE -O3) set (CMAKE_BUILD_TYPE RELEASE) I think this would be a useful config file and I can just include it in CMakeLists.txt. The problem is that the compiler must be specified before I run project(), while the compile flags must be specified AFTER project(): cmake_minimum_required (VERSION 2.8) include (path/to/myprogram.cmake) enable_language (Fortran) project (MyProgram) At this point all the compile flags have been overwritten by enable_language() and project(). Can anyone suggest a good solution? I have a few ideas, but I am not sure about them: 1) I could give up on the idea of using CMake in the config file. The config file could be a shell script that sets some environment variables. My understanding is that this will work, but you would lose the flexibility of CMake. 2) I could load the config file twice. Once before, and once after project(). I am not sure if this would have any unexpected side-effects. 3) I could store the flags in the cache. But I am not sure if overwriting the cache is a good idea or not. 4) I could use a shell script to split the config file into the compiler part and everything else, and then load them separately. I think I like this option, but I am not fully aware of the side-effects. Does anyone have any words of advice or wisdom to share with me? Cheers, Daniel. -- Lord of the rings calendar in your Linux/Unix/Mac terminal: cat /usr/share/calendar/calendar.lotr -- 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 -- Lord of the rings calendar in your Linux/Unix/Mac terminal: cat /usr/share/calendar/calendar.lotr -- 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] Mixing non-CMake ExternalProjects using Visual Studio
When mixing a CMake Visual Studio build that has ExternalProjects (that is, via ExternalProject_Add) that use non-CMake makefile builds, how does one resolve the mismatch between the *_config variables (CMAKE_CXX_FLAGS_RELEASE, etc.)? Specifically, how do I propagate the build flags in the *_config variables down to the ExternalProject? I can't seem to find a way in CMake that will let me pick which variable to propagate (that is, CMAKE_CXX_FLAGS_DEBUG when I'm building the Debug configuration, CMAKE_CXX_FLAGS_RELEASE when building the Release configuration, etc.). One option seems to be just to build the makefile-based ExternalProject four times--one for each configuration CMake generates in its project files. But that, too, has a problem: what if the makefile-based ExternalProject has a dependency on another ExternalProject with a CMake build? Are there any good solutions to these sorts of problems? -- Braden McDaniel bra...@endoframe.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
[CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories
Hi, If I have the following command: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) the extraction works and extracts the tar in the current directory. But this: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/someSubdirectory ) fails to extract into 'someDirectory' (even if it already exists - although it 'should' create the directory for me). Am I misunderstanding some commands? Thanks, Saad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories
Where does the extraction end up? Or does it fail regardless of the WORKING_DIRECTORY argument? Use : execute_process(... RESULT_VARIABLE rv) message(rv='${rv}') to see what the return value of CMake is. Is there an error message when trying to extract the tar file? -Original Message- From: Saad Khattak saadrus...@gmail.com To: CMake Mailing List cmake@cmake.org Sent: Mon, Apr 1, 2013 6:06 pm Subject: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories Hi, If I have the following command: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) the extraction works and extracts the tar in the current directory. But this: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/someSubdirectory ) fails to extract into 'someDirectory' (even if it already exists - although it 'should' create the directory for me). Am I misunderstanding some commands? Thanks, Saad -- 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] CMake extracting tar via execute_process does not allow extraction in subdirectories
As far as I can tell, it does not extract at all. The return code when it is able to extract is 0, when it is not able to extract, it is 1 - Saad On Mon, Apr 1, 2013 at 6:12 PM, David Cole dlrd...@aol.com wrote: Where does the extraction end up? Or does it fail regardless of the WORKING_DIRECTORY argument? Use : execute_process(... RESULT_VARIABLE rv) message(rv='${rv}') to see what the return value of CMake is. Is there an error message when trying to extract the tar file? -Original Message- From: Saad Khattak saadrus...@gmail.com To: CMake Mailing List cmake@cmake.org Sent: Mon, Apr 1, 2013 6:06 pm Subject: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories Hi, If I have the following command: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) the extraction works and extracts the tar in the current directory. But this: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/**someSubdirectory ) fails to extract into 'someDirectory' (even if it already exists - although it 'should' create the directory for me). Am I misunderstanding some commands? Thanks, Saad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/** opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/**listinfo/cmakehttp://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] The else() in CMAKE_TOOLCHAIN_FILE
I think I find something to explain this: the config.cmake(the CMAKE_TOOLCHAIN_FILE) is reloaded several times. on first-load, the A is set, but on second-load and later-load, the A is not set. I think I can get around this problem when A is kept set. However, I don't know how can I keep the value set in cmake. Could anyone give me some suggestion? Thanks! On Mon, Apr 1, 2013 at 7:47 PM, Ashi ashi08...@gmail.com wrote: Hi all, I've a problem in using else() in CMAKE_TOOLCHAIN_FILE, all files are: #==CMakeLists.txt== message(TEST) #==config.cmake== if(A) message(A) elseif(B) message(B) elseif(C) message(C) else() message(FATAL_ERROR NONE) endif() and I run the cmake: $ cmake -DCMAKE_TOOLCHAIN_FILE=./config.cmake -DA=true . cmake returns: A A -- The C compiler identification is GNU 4.7.2 -- The CXX compiler identification is GNU 4.7.2 -- Check for working C compiler: /I usr/bin/gcc CMake Error at /home/zhongwei/projects/cmake_test/config.cmake:8 (message): NONE Call Stack (most recent call first): /home/zhongwei/projects/cmake_test/build/CMakeFiles/CMakeSystem.cmake:1 (INCLUDE) CMakeLists.txt:2 (PROJECT) CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Configuring incomplete, errors occurred! My problem is why the else() statement is still run when A=true? Thanks, ashi -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories
2013/4/2 Saad Khattak saadrus...@gmail.com Hi, If I have the following command: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) the extraction works and extracts the tar in the current directory. But this: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/someSubdirectory ) fails to extract into 'someDirectory' (even if it already exists - although it 'should' create the directory for me). No it shouldn't. Am I misunderstanding some commands? Yes I think you misunderstand WORKING_DIRECTORY argument of execute_process command. The WORKING_DIRECTORY MUST exists beforehand and it is NOT the job of execute_process to create it. A WORKING_DIRECTORY is **always** supposed to exists when used by the cmake command providing this option like: add_custom_command, add_test or execute_process. If you need to create a directory you can cmake -E make_directory or file(MAKE_DIRECTORY ...) That said cmake -E tar xzf mySDK.tar.gz will create any directory found in the archive as expected. working directory for untar and [possibly] top-level directory created nby untar are not the same. -- 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] CMake extracting tar via execute_process does not allow extraction in subdirectories
2013/4/2 Saad Khattak saadrus...@gmail.com Hi, If I have the following command: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) the extraction works and extracts the tar in the current directory. But this: execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/someSubdirectory ) fails to extract into 'someDirectory' (even if it already exists - although it 'should' create the directory for me). In which context do you run this piece of CMake script? Is it inside a CMakeLists.txt or is it in a separate script? Could you try: execute_process( COMMAND ${CMAKE_COMMAND} -E echo WD = ${CMAKE_CURRENT_SOURCE_DIR}/ someSubdirectory COMMAND ${CMAKE_COMMAND} -E tar xzf mySDK.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/someSubdirectory ) and check the value of WD = ... -- 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
[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2695-gb01cd26
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 b01cd269cc17018e091b418d22c1e99c797bcd53 (commit) via 20c99b1dbcdf87e9bf43f216c6903157c826e036 (commit) via 969a7fde7a82b17cae4bb6955435665eb5d3e979 (commit) from b9762ee25023eb526d916c422c0e04ade666c476 (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=b01cd269cc17018e091b418d22c1e99c797bcd53 commit b01cd269cc17018e091b418d22c1e99c797bcd53 Merge: b9762ee 20c99b1 Author: Brad King brad.k...@kitware.com AuthorDate: Mon Apr 1 09:59:46 2013 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Mon Apr 1 09:59:46 2013 -0400 Merge topic 'automoc-vs11-workaround' into next 20c99b1 automoc: Use a pre-build event in VS = 7 969a7fd CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20c99b1dbcdf87e9bf43f216c6903157c826e036 commit 20c99b1dbcdf87e9bf43f216c6903157c826e036 Author: Brad King brad.k...@kitware.com AuthorDate: Fri Mar 29 15:56:13 2013 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Fri Mar 29 15:58:21 2013 -0400 automoc: Use a pre-build event in VS = 7 In VS IDE generators add a pre-build event to perform automoc instead of using a separate custom target. This reduces the number of targets in the .sln that need to be loaded by the IDE. This also works around a VS 11 bug as discussed in issue 13900. Suggested-by: Hauke Heibel hauke.hei...@gmail.com diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index c7060b0..a1fa31f 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -17,6 +17,10 @@ #include cmSourceFile.h #include cmSystemTools.h +#if defined(_WIN32) !defined(__CYGWIN__) +# include cmLocalVisualStudioGenerator.h +#endif + #include cmsys/Terminal.h #include cmsys/ios/sstream @@ -182,14 +186,44 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) std::string automocComment = Automoc for target ; automocComment += targetName; - cmTarget* automocTarget = makefile-AddUtilityCommand( - automocTargetName.c_str(), true, - workingDirectory.c_str(), depends, - commandLines, false, automocComment.c_str()); - // inherit FOLDER property from target (#13688) - copyTargetProperty(automocTarget, target, FOLDER); - - target-AddUtility(automocTargetName.c_str()); +#if defined(_WIN32) !defined(__CYGWIN__) + bool usePRE_BUILD = false; + cmGlobalGenerator* gg = localGen-GetGlobalGenerator(); + if(strstr(gg-GetName(), Visual Studio)) +{ +cmLocalVisualStudioGenerator* vslg = + static_castcmLocalVisualStudioGenerator*(localGen); +// Under VS = 7 use a PRE_BUILD event instead of a separate target to +// reduce the number of targets loaded into the IDE. +// This also works around a VS 11 bug that may skip updating the target: +// https://connect.microsoft.com/VisualStudio/feedback/details/769495 +usePRE_BUILD = vslg-GetVersion() = cmLocalVisualStudioGenerator::VS7; +} + if(usePRE_BUILD) +{ +// Add the pre-build command directly to bypass the OBJECT_LIBRARY +// rejection in cmMakefile::AddCustomCommandToTarget because we know +// PRE_BUILD will work for an OBJECT_LIBRARY in this specific case. +std::vectorstd::string no_output; +cmCustomCommand cc(makefile, no_output, depends, + commandLines, automocComment.c_str(), + workingDirectory.c_str()); +cc.SetEscapeOldStyle(false); +cc.SetEscapeAllowMakeVars(true); +target-GetPreBuildCommands().push_back(cc); +} + else +#endif +{ +cmTarget* automocTarget = makefile-AddUtilityCommand( +automocTargetName.c_str(), true, +workingDirectory.c_str(), depends, +commandLines, false, automocComment.c_str()); +// inherit FOLDER property from target (#13688) +copyTargetProperty(automocTarget, target, FOLDER); + +target-AddUtility(automocTargetName.c_str()); +} // configure a file to get all information to automoc at buildtime: std::string _moc_files; --- Summary of changes: Source/CMakeVersion.cmake |2 +- Source/cmQtAutomoc.cxx| 50 +--- 2 files changed, 43 insertions(+), 9 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list
[Cmake-commits] CMake branch, master, updated. v2.8.10.2-968-g3423915
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 3423915720c10caf2531698d2482a4058d53293a (commit) from 8869c0febd20bf39da2263d95c2d1d4d21f04a1a (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=3423915720c10caf2531698d2482a4058d53293a commit 3423915720c10caf2531698d2482a4058d53293a Author: Kitware Robot kwro...@kitware.com AuthorDate: Tue Apr 2 00:01:09 2013 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Tue Apr 2 00:01:09 2013 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 11d1fa7..83eff6d 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 10) -set(CMake_VERSION_TWEAK 20130401) +set(CMake_VERSION_TWEAK 20130402) #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