Re: [CMake] "Deep" variable expansion (or, replacing literal "${FOO}")

2013-04-01 Thread Petr Kmoch
Hi Braden, the purpose of CMAKE_CFG_INTDIR is to expand to something that is meaningful to the build system you're using. It's a way to transport information from CMake-time (when your CMakeLists are processed) to build-time (when you run a build). The exact value of CMAKE_CFG_INTDIR depends on t

Re: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories

2013-04-01 Thread Eric Noulard
2013/4/2 Saad Khattak > 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: > > exec

Re: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories

2013-04-01 Thread Eric Noulard
2013/4/2 Saad Khattak > 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: > > exec

Re: [CMake] The else() in CMAKE_TOOLCHAIN_FILE

2013-04-01 Thread Ashi
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

Re: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories

2013-04-01 Thread Saad Khattak
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 wrote: > Where does the extraction end up? > > Or does it fail regardless of the WORKING_DIRECTORY argum

Re: [CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories

2013-04-01 Thread David Cole
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 M

[CMake] CMake extracting tar via execute_process does not allow extraction in subdirectories

2013-04-01 Thread Saad Khattak
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 t

[CMake] Mixing non-CMake ExternalProjects using Visual Studio

2013-04-01 Thread Braden McDaniel
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 *_ variables (CMAKE_CXX_FLAGS_RELEASE, etc.)? Specifically, how do I propagate the build flags in the *_ variable

Re: [CMake] How to let the user select the compiler and compiler flags.

2013-04-01 Thread Daniel Carrera
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. Che

Re: [CMake] string(REGEX REPLACE …) syntax problem

2013-04-01 Thread Braden McDaniel
On Mar 30, 2013, at 11:29 PM, David Cole 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 al

Re: [CMake] copy_if_different on build

2013-04-01 Thread Matthew Woehlke
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

[CMake] iOS library out path

2013-04-01 Thread Saad Khattak
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 pa

Re: [CMake] non-png backgrounds for dmg packages

2013-04-01 Thread Jean-Christophe Fillion-Robin
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 wrote: > Hi, > > First, thanks for a great tool. >

Re: [CMake] How to let the user select the compiler and compiler flags.

2013-04-01 Thread David Cole
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

[CMake] Multiple platform targets (iOS and OSX)

2013-04-01 Thread Saad Khattak
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 manipula

[CMake] The else() in CMAKE_TOOLCHAIN_FILE

2013-04-01 Thread Ashi
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: $

Re: [CMake] Potential bug to set a working directory for test

2013-04-01 Thread Klaim - Joël Lamotte
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 F

[CMake] How to let the user select the compiler and compiler flags.

2013-04-01 Thread Daniel Carrera
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

[CMake] non-png backgrounds for dmg packages

2013-04-01 Thread Brian Milco
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