Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-15 Thread clinton
Does that result in building the code 3 times? And why would you need to repeat the install directives? I've attached a CMakeLists.txt file for an example project that works for me without repeating install directives. Clint - Original Message - > Here's a follow-up. > I was unabl

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-14 Thread Patrick Johnmeyer
Slight correction below. CMAKE_GENERATOR is a separate argument to the ExternalProject_Add function, and I had embedded it incorrectly as a -G option in CMAKE_ARGS. On Thu, Feb 14, 2013 at 11:21 AM, Patrick Johnmeyer wrote: > > # > include(ExternalProject) > > ExternalProject_Add(MyProjectDeb

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-14 Thread Patrick Johnmeyer
Here's a follow-up. I was unable to get Jean-Christophes modification of Ansis' solution working. (I definitely did not want to repeat the install directives in this rather large project.) The "-DCMAKE_BUILD_TYPE" lines don't really accomplish anything when building with Visual Studio. I was makin

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-08 Thread Yngve Inntjore Levinsen
On 7/2/13 7:54 PM, Patrick Johnmeyer wrote: On Thu, Feb 7, 2013 at 12:41 PM, Yngve Inntjore Levinsen mailto:yngve.levin...@gmail.com>> wrote: I think you are fighting the tool in any case, because you are asking to build multiple configurations in one build folder (?). Normally you

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-07 Thread Clinton Stimpson
On Wednesday, February 06, 2013 01:09:20 PM Patrick Johnmeyer wrote: > I have looked through the CMake wikis and several mailing list threads that > the following google search returned, and I have not found a definitive > answer to my question. > > [site:www.cmake.org/pipermail/cmake CPack multip

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-07 Thread Patrick Johnmeyer
On Thu, Feb 7, 2013 at 12:41 PM, Yngve Inntjore Levinsen < yngve.levin...@gmail.com> wrote: > I think you are fighting the tool in any case, because you are asking to > build multiple configurations in one build folder (?). Normally you would > create one build folder per configuration.. Which I g

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-07 Thread Jean-Christophe Fillion-Robin
The approach suggested by Ansis looks interesting. Instead of using "install(FILES ...), you could use CPACK_INSTALL_CMAKE_PROJECTS [1][2]. For an example, see [3] and [4] [1] http://www.cmake.org/cmake/help/v2.8.8/cpack.html#variable:CPACK_INSTALL_CMAKE_PROJECTS [2] http://www.cmake.org/Wiki/CMak

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-07 Thread Yngve Inntjore Levinsen
Hi, I think you are fighting the tool in any case, because you are asking to build multiple configurations in one build folder (?). Normally you would create one build folder per configuration.. Which I guess is what you are doing today. Instead of specifying the compile flags manually you can in

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-07 Thread Ansis Māliņš
How about something like this: if(${CMAKE_BUILD_TYPE STREQUAL DebugAndRelease) include(ExternalProject) ExternalProject_Add(MEDEBUG CMAKE_FLAGS -DCMAKE_BUILD_TYPE Debug) ExternalProject_Add(MERELEASE CMAKE_FLAGS -DCMAKE_BUILD_TYPE Release) install(FILES ...) #et

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-07 Thread Patrick Johnmeyer
On Thu, Feb 7, 2013 at 3:12 AM, Yngve Inntjore Levinsen < yngve.levin...@gmail.com> wrote: > Did you try to create two targets and add per-target compile flags? > > What you suggest is replacing configurations with targets. That may be possible, but runs counter to how CMake natively works. I fee

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-07 Thread Yngve Inntjore Levinsen
Did you try to create two targets and add per-target compile flags? Something along the lines of add_library(mylib_rel ${sources}) add_library(mylib_dbg ${sources}) set_target_properties(mylib_rel PROPERTIES COMPILE_FLAGS -O3) set_target_properties(mylib_dbg PROPERTIES COMPILE_FLAGS -O0 -g) Not e

[CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-06 Thread Patrick Johnmeyer
I have looked through the CMake wikis and several mailing list threads that the following google search returned, and I have not found a definitive answer to my question. [site:www.cmake.org/pipermail/cmake CPack multiple configurations in one package] My team delivers debug and release libraries