Re: [CMake] Different configurations with Visual Studio

2010-08-26 Thread Mark Van Peteghem
2010/7/5 John Drescher dresche...@gmail.com

  I see, thanks. I intend to write a Python script that adds the extra
  platform solution, because we really need that. Visual Studio and
  Code::Blocks project files are XML files, so it shouldn't be too hard.
 

 What is wrong with different build folders for each compiler / ide?


(sorry for picking this up again so late)

We do have different build folders for each compiler / ide, but I mean
'build folder' as the folder where the object files and executable ends. We
just want one project file with different platform solutions, so we don't
have to reload the project file when we want to switch. Having two project
files in the same solution also is not an option, because the source files
and many settings are the same. Besides, this is a big solution file with
over 50 project files, so doubling that would make things a lot harder.

I don't really understand why some find this an awkward way of doing things,
it is simply convenient to have both platforms in one project file, e.g. it
is easy to build everything at once. I don't see any drawbacks.

Mark
___
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] Different configurations with Visual Studio

2010-08-26 Thread Mike McQuaid
On 26 August 2010 10:17, Mark Van Peteghem mar...@gmail.com wrote:
 We do have different build folders for each compiler / ide, but I mean
 'build folder' as the folder where the object files and executable ends. We
 just want one project file with different platform solutions, so we don't
 have to reload the project file when we want to switch. Having two project
 files in the same solution also is not an option, because the source files
 and many settings are the same. Besides, this is a big solution file with
 over 50 project files, so doubling that would make things a lot harder.

 I don't really understand why some find this an awkward way of doing things,
 it is simply convenient to have both platforms in one project file, e.g. it
 is easy to build everything at once. I don't see any drawbacks.

In that case, use various if/else statements depending on your
platform and just use a different build directory for each platform,
then each will have a different build folder but also a different
CMake cache so the variables will be parsed differently.
-- 
Cheers,
Mike McQuaid
http://mikemcquaid.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] Different configurations with Visual Studio

2010-07-06 Thread Tyler Roscoe
On Mon, Jul 05, 2010 at 01:31:41PM +0200, Mark Van Peteghem wrote:
 I see, thanks. I intend to write a Python script that adds the extra
 platform solution, because we really need that. Visual Studio and
 Code::Blocks project files are XML files, so it shouldn't be too hard.

If possible, I would be interested in seeing/using this script.

Thanksm,
tyler
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Different configurations with Visual Studio

2010-07-06 Thread Tyler Roscoe
On Mon, Jul 05, 2010 at 10:47:32AM -0400, John Drescher wrote:
 What is wrong with different build folders for each compiler / ide?

I'm interested in an answer to this question as well.

For me, the biggest thing is that it's what VS developers are accustomed
to. I've been educating it out of them, but if both win32 and win64
configurations could be made available through a robust configure-time
process, that might be better.

Thanks,
tyler
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Different configurations with Visual Studio

2010-07-05 Thread Mark Van Peteghem
I see, thanks. I intend to write a Python script that adds the extra
platform solution, because we really need that. Visual Studio and
Code::Blocks project files are XML files, so it shouldn't be too hard.

2010/7/2 aaron.mead...@thomsonreuters.com

  *I don’t believe this is possible.  There was actually a discussion about
 this, simultaneous to your question, regarding x86 and x64 builds in the
 same solution files.  The answer given was that it is not possible, and it
 is better to have an x86 build tree and an x64 build tree.  There was a link
 given to a deeper discussion: **
 http://www.cmake.org/pipermail/cmake/2009-June/029897.html*

 * *

 *The thread yesterday has the subject: Generating a combined x86 and x64
 Visual Studio project*

 * *

 *HTH!*

 * *

 *Aaron C. Meadows*
   --

 *From:* cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] *On
 Behalf Of *Mark Van Peteghem
 *Sent:* Thursday, July 01, 2010 2:13 AM
 *To:* cmake@cmake.org
 *Subject:* Re: [CMake] Different configurations with Visual Studio



 Thanks, this works. Actually

 if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES Debug Release DebugMX31 ReleaseMX31)

set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE
 STRING

  Reset the configurations to what we need FORCE)
  endif()

 also works for me. I've added it to the FAQ of the Wiki. But this is only
 half of what need. I actually need to make this generate settings for a
 different platform as well, I mean 'platform' in the Visual Studio sense,
 also called 'solution platform' in Visual Studios configuration manager,
 which is Win32 by default, but I need it for both Win32 and MX31.

 Can this be done with CMake? I'm afraid not, but if it is possible, how? In
 the project file it is written as something like Debug|MX31, but using that
 in CMake doesn't work.

 Mark

 2010/6/28 Michael Wild them...@gmail.com


 On 28. Jun, 2010, at 15:17 , Mark Van Peteghem wrote:

  Hi,
 
  I am using CMake to generate Visual Studio project files, later also for
  CodeBlocks.
 
  It seems that CMake generates four different configurations for Visual
  Studio: Debug, Release, MinSizeRel and RelWithDebInfo. However, I need
 other
  configuations, Debug and Release, both for Win32 and MX3, in one project
  file. How do I change this?
 
  I tried this by changing *CMAKE_CONFIGURATION_TYPES *and
 CMAKE_BUILD_TYPES,
  e.g.
 
  SET(CMAKE_BUILD_TYPES Debug Release DebugMX31 ReleaseMX31)
 
  but I have the impression that these variables cannot be changed.
 
  --
  Mark

 You have to change CMAKE_CONFIGURATION_TYPES in the cache. Here is some
 template I use:

 # Xcode generator is buggy (linker flags are not inherited from compile
 flags
 # and custom configurations don't work with shared libraries)
 if(NOT CMAKE_GENERATOR STREQUAL Xcode)
  set(CMAKE_C_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the compiler during super-duper builds)
  set(CMAKE_EXE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for executables during super-duper
 builds)
  set(CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for shared libraries during super-duper
 builds)
  set(CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for loadable modules during super-duper
 builds)
  mark_as_advanced(CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_SUPERDUPER
CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER
 CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER)
  # This variable is only set for multi-config IDE generators
  if(CMAKE_CONFIGURATION_TYPES)
list(APPEND CMAKE_CONFIGURATION_TYPES SuperDuper)
list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE
 STRING
  Semicolon separated list of supported configuration types
 [Debug|Release|MinSizeRel|RelWithDebInfo|SuperDuper]
  FORCE)
  endif()
 endif()

 HTH

 Michael



 This email was sent to you by Thomson Reuters, the global news and
 information company.
 Any views expressed in this message are those of the individual sender,
 except where the sender specifically states them to be the views of Thomson
 Reuters.

 ___
 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] Different configurations with Visual Studio

2010-07-05 Thread John Drescher
 I see, thanks. I intend to write a Python script that adds the extra
 platform solution, because we really need that. Visual Studio and
 Code::Blocks project files are XML files, so it shouldn't be too hard.


What is wrong with different build folders for each compiler / ide?

John
___
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] Different configurations with Visual Studio

2010-07-02 Thread aaron.meadows
I don't believe this is possible.  There was actually a discussion about
this, simultaneous to your question, regarding x86 and x64 builds in the
same solution files.  The answer given was that it is not possible, and
it is better to have an x86 build tree and an x64 build tree.  There was
a link given to a deeper discussion:
http://www.cmake.org/pipermail/cmake/2009-June/029897.html

 

The thread yesterday has the subject: Generating a combined x86 and x64
Visual Studio project

 

HTH!

 

Aaron C. Meadows 



From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
Of Mark Van Peteghem
Sent: Thursday, July 01, 2010 2:13 AM
To: cmake@cmake.org
Subject: Re: [CMake] Different configurations with Visual Studio

 

Thanks, this works. Actually

if(CMAKE_CONFIGURATION_TYPES)
   set(CMAKE_CONFIGURATION_TYPES Debug Release DebugMX31 ReleaseMX31)

   set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE
STRING

 Reset the configurations to what we need FORCE)
 endif()

also works for me. I've added it to the FAQ of the Wiki. But this is
only half of what need. I actually need to make this generate settings
for a different platform as well, I mean 'platform' in the Visual Studio
sense, also called 'solution platform' in Visual Studios configuration
manager, which is Win32 by default, but I need it for both Win32 and
MX31.

Can this be done with CMake? I'm afraid not, but if it is possible, how?
In the project file it is written as something like Debug|MX31, but
using that in CMake doesn't work.

Mark

2010/6/28 Michael Wild them...@gmail.com


On 28. Jun, 2010, at 15:17 , Mark Van Peteghem wrote:

 Hi,

 I am using CMake to generate Visual Studio project files, later also
for
 CodeBlocks.

 It seems that CMake generates four different configurations for Visual
 Studio: Debug, Release, MinSizeRel and RelWithDebInfo. However, I need
other
 configuations, Debug and Release, both for Win32 and MX3, in one
project
 file. How do I change this?

 I tried this by changing *CMAKE_CONFIGURATION_TYPES *and
CMAKE_BUILD_TYPES,
 e.g.

 SET(CMAKE_BUILD_TYPES Debug Release DebugMX31 ReleaseMX31)

 but I have the impression that these variables cannot be changed.

 --
 Mark

You have to change CMAKE_CONFIGURATION_TYPES in the cache. Here is some
template I use:

# Xcode generator is buggy (linker flags are not inherited from compile
flags
# and custom configurations don't work with shared libraries)
if(NOT CMAKE_GENERATOR STREQUAL Xcode)
 set(CMAKE_C_FLAGS_SUPERDUPER --super --duper CACHE
   STRING Flags used by the compiler during super-duper builds)
 set(CMAKE_EXE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
   STRING Flags used by the linker for executables during super-duper
builds)
 set(CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
   STRING Flags used by the linker for shared libraries during
super-duper builds)
 set(CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
   STRING Flags used by the linker for loadable modules during
super-duper builds)
 mark_as_advanced(CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_SUPERDUPER
   CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER
CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER)
 # This variable is only set for multi-config IDE generators
 if(CMAKE_CONFIGURATION_TYPES)
   list(APPEND CMAKE_CONFIGURATION_TYPES SuperDuper)
   list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
   set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE
STRING
 Semicolon separated list of supported configuration types
[Debug|Release|MinSizeRel|RelWithDebInfo|SuperDuper]
 FORCE)
 endif()
endif()

HTH

Michael

 



This email was sent to you by Thomson Reuters, the global news and information 
company.
Any views expressed in this message are those of the individual sender, except 
where the sender specifically states them to be the views of Thomson Reuters.

___
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] Different configurations with Visual Studio

2010-07-01 Thread Mark Van Peteghem
Thanks, this works. Actually

if(CMAKE_CONFIGURATION_TYPES)
   set(CMAKE_CONFIGURATION_TYPES Debug Release DebugMX31 ReleaseMX31)
   set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE STRING
 Reset the configurations to what we need FORCE)
 endif()

also works for me. I've added it to the FAQ of the Wiki. But this is only
half of what need. I actually need to make this generate settings for a
different platform as well, I mean 'platform' in the Visual Studio sense,
also called 'solution platform' in Visual Studios configuration manager,
which is Win32 by default, but I need it for both Win32 and MX31.

Can this be done with CMake? I'm afraid not, but if it is possible, how? In
the project file it is written as something like Debug|MX31, but using that
in CMake doesn't work.

Mark

2010/6/28 Michael Wild them...@gmail.com


 On 28. Jun, 2010, at 15:17 , Mark Van Peteghem wrote:

  Hi,
 
  I am using CMake to generate Visual Studio project files, later also for
  CodeBlocks.
 
  It seems that CMake generates four different configurations for Visual
  Studio: Debug, Release, MinSizeRel and RelWithDebInfo. However, I need
 other
  configuations, Debug and Release, both for Win32 and MX3, in one project
  file. How do I change this?
 
  I tried this by changing *CMAKE_CONFIGURATION_TYPES *and
 CMAKE_BUILD_TYPES,
  e.g.
 
  SET(CMAKE_BUILD_TYPES Debug Release DebugMX31 ReleaseMX31)
 
  but I have the impression that these variables cannot be changed.
 
  --
  Mark

 You have to change CMAKE_CONFIGURATION_TYPES in the cache. Here is some
 template I use:

 # Xcode generator is buggy (linker flags are not inherited from compile
 flags
 # and custom configurations don't work with shared libraries)
 if(NOT CMAKE_GENERATOR STREQUAL Xcode)
  set(CMAKE_C_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the compiler during super-duper builds)
  set(CMAKE_EXE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for executables during super-duper
 builds)
  set(CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for shared libraries during super-duper
 builds)
  set(CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for loadable modules during super-duper
 builds)
  mark_as_advanced(CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_SUPERDUPER
CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER
 CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER)
  # This variable is only set for multi-config IDE generators
  if(CMAKE_CONFIGURATION_TYPES)
list(APPEND CMAKE_CONFIGURATION_TYPES SuperDuper)
list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE
 STRING
  Semicolon separated list of supported configuration types
 [Debug|Release|MinSizeRel|RelWithDebInfo|SuperDuper]
  FORCE)
  endif()
 endif()

 HTH

 Michael


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Different configurations with Visual Studio

2010-06-29 Thread Mark Van Peteghem
I found another problem with CMAKE_CONFIGURATION_TYPES, it doesn't work with
Code::Blocks, even though you can have different configurations in
Code::Blocks. Is there a way to make this work for Code::Blocks, or is it
not yet implemented?

-- 
Mark
___
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] Different configurations with Visual Studio

2010-06-28 Thread Mark Van Peteghem
Hi,

I am using CMake to generate Visual Studio project files, later also for
CodeBlocks.

It seems that CMake generates four different configurations for Visual
Studio: Debug, Release, MinSizeRel and RelWithDebInfo. However, I need other
configuations, Debug and Release, both for Win32 and MX3, in one project
file. How do I change this?

I tried this by changing *CMAKE_CONFIGURATION_TYPES *and CMAKE_BUILD_TYPES,
e.g.

SET(CMAKE_BUILD_TYPES Debug Release DebugMX31 ReleaseMX31)

but I have the impression that these variables cannot be changed.

-- 
Mark
___
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] Different configurations with Visual Studio

2010-06-28 Thread Michael Wild

On 28. Jun, 2010, at 15:17 , Mark Van Peteghem wrote:

 Hi,
 
 I am using CMake to generate Visual Studio project files, later also for
 CodeBlocks.
 
 It seems that CMake generates four different configurations for Visual
 Studio: Debug, Release, MinSizeRel and RelWithDebInfo. However, I need other
 configuations, Debug and Release, both for Win32 and MX3, in one project
 file. How do I change this?
 
 I tried this by changing *CMAKE_CONFIGURATION_TYPES *and CMAKE_BUILD_TYPES,
 e.g.
 
 SET(CMAKE_BUILD_TYPES Debug Release DebugMX31 ReleaseMX31)
 
 but I have the impression that these variables cannot be changed.
 
 -- 
 Mark

You have to change CMAKE_CONFIGURATION_TYPES in the cache. Here is some 
template I use:

# Xcode generator is buggy (linker flags are not inherited from compile flags
# and custom configurations don't work with shared libraries)
if(NOT CMAKE_GENERATOR STREQUAL Xcode)
  set(CMAKE_C_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the compiler during super-duper builds)
  set(CMAKE_EXE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for executables during super-duper builds)
  set(CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for shared libraries during super-duper 
builds)
  set(CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE
STRING Flags used by the linker for loadable modules during super-duper 
builds)
  mark_as_advanced(CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_SUPERDUPER
CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER)
  # This variable is only set for multi-config IDE generators
  if(CMAKE_CONFIGURATION_TYPES)
list(APPEND CMAKE_CONFIGURATION_TYPES SuperDuper)
list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE STRING
  Semicolon separated list of supported configuration types 
[Debug|Release|MinSizeRel|RelWithDebInfo|SuperDuper]
  FORCE)
  endif()
endif()

HTH

Michael

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake