[CMake] Some issues with visual studio

Renato Utsch renatoutsch at gmail.com
Sun Jan 8 19:47:38 EST 2012


Don't know if you read all the emails, but I already found a solution
to the problem with all exe's with one output dir.

If you are right about the list of solution configs, so my search ends
here, but I alredy solved the real problem, so it's ok...

Renato

2012/1/8 Fraser Hutchison <fraser.hutchison at googlemail.com>:
> Hi Renato,
>
> If you mean the drop-down list of solution configs in the Visual Studio IDE,
> I think they're listed alphabetically with the first selected, regardless of
> how the .sln file is laid out.  I don't think there's anything CMake can do
> about this.
>
> BTW, I'd agree with the previous comments which advise against relocating
> all exes to a single output dir.  Having tried it in the past, bottom line -
> it made life more difficult and wasted a good bit of developer time.  You
> could consider copying the exe once built to a different directory - that
> should minimise the pain.  There's a thread here where Michael Hertling
> provides the correct command for this:
> http://www.cmake.org/pipermail/cmake/2011-April/043946.html
>
> Adding a postfix to each target's name could help too:
> SET_TARGET_PROPERTIES(foo PROPERTIES DEBUG_OUTPUT_NAME foo-d
> RELWITHDEBINFO_OUTPUT_NAME foo-rwdi MINSIZEREL_OUTPUT_NAME foo-msr).
>
> However, best option is to just go with the VS flow :-)
>
> Cheers,
>
> Fraser.
>
>
>
> On 08/01/2012 23:08, Renato Utsch wrote:
>
> CLIFFORD MAN, IT WORKED!
>
>
>
>
> This was everything I was looking for. Thanks:
>
>
>
>
>        # Configure the release changes (optimization)
>        set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
>
>
>
>
>        foreach( CONF_TYPE ${CMAKE_CONFIGURATION_TYPES} )
>                string( TOUPPER "${CONF_TYPE}" CONF_TYPE )
>                set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE}
> "${CMAKE_BINARY_DIR}" )
>        endforeach()
>
>
>
>
> Now is only the problem from the default to be "Release" or
> "RelMinSize", I don't know if the problem is with CMake, but I think
> that when setting CMAKE_BUILD_TYPE to "ReMinSize" it should set the
> standard to it. Sad it doesn't do that :(
>
>
>
>
> So, anyone knows any other way? Like the variable that cmake sets when
> using --config Release when calling it from the command line ?
>
>
>
>
> Renato
>
> 2012/1/8 Renato Utsch <renatoutsch at gmail.com>:
>
> CLIFFORD MAN, IT WORKED!
>
> This was everything I was looking for. Thanks:
>
>        # Configure the release changes (optimization)
>        set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
>
>        foreach( CONF_TYPE ${CMAKE_CONFIGURATION_TYPES} )
>                string( TOUPPER "${CONF_TYPE}" CONF_TYPE )
>                set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE}
> "${CMAKE_BINARY_DIR}" )
>        endforeach()
>
> Now is only the problem from the default to be "Release" or
> "RelMinSize", I don't know if the problem is with CMake, but I think
> that when setting CMAKE_BUILD_TYPE to "ReMinSize" it should set the
> standard to it. Sad it doesn't do that :(
>
> So, anyone knows any other way? Like the variable that cmake sets when
> using --config Release when calling it from the command line ?
>
> Renato
>
> 2012/1/8 Clifford Yapp <cliffyapp at gmail.com>:
>
> Hmm - that looks interesting.  I didn't know about
> SUPPORTS_PARALLEL_BUILD_TYPE - I'll have to review my setup with that
> in mind.
>
> Thanks!
>
> On Sun, Jan 8, 2012 at 4:52 PM, J Decker <d3ck0r at gmail.com> wrote:
>
>      if( SUPPORTS_PARALLEL_BUILD_TYPE )  # will be set in visual
> studio type projects...
>        INSTALL( FILES ... DESTINATION ...${CMAKE_INSTALL_CONFIG_NAME}
> ... ) #CMAKE_INSTALL_CONFIG_NAME will be set for the build type you're
> doing.
>
> --
>
> 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


More information about the CMake mailing list