> I'm not sure why you would recommend anything related to 
> CMAKE_BUILD_TYPE for the Visual Studio generators. I would be curious 
> to know exactly how you are using it, because internally, 
> CMAKE_BUILD_TYPE (to the best of my knowledge) is completely ignored by 
> the Visual Studio generators.

I had three issues with it, two seems solved with cmake 3.0
My project is organised in a form like 
root
 - common / libs / ..
 - programs / ..


1) Installation of files 
 In the installation ( install TARGET ...) i had to install some shared 
libraries from the common/libs targets
 with cmake 2.8.12 i was not able to use <TARGET_FILE:target>, so i solved with 
with properties, which always must consider if or not they are build with 
single or multi configuration
  e.g.
   if( WIN32 )
    if( MINGW)
      set_property( ...   ${CMAKE_CURRENT_BINARY_DIR}/x.dll)
    else()
      set_property( ...   ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/x.dll)
   else if( UNIX )

i think this is solved with cmake 3.0, i can use the <TARGET_FILE:target> 
directly in install calls

2) use programs/libs from build for running tests
In CMake 2.8 i was not able to use the <TARGET_PATH:target> notation in calls 
to set_test_properties() so i had to differ here the files paths too. This is 
solved with cmake 3.0

3) using imported location
my project is used for developer and customer build (customer gets sourcecode). 
But he does not get all source code, some of the libaries he only gets binary.
To use same cmake files in programs/, i use the set_target_properties( .. 
IMPORTED_LOCATION ...). Depending on how we build it (mingw, devstudio etc), i 
differ between the paths like above. No other solution found here... 
find_package, find_programs and so on is here no alternative, cause i want to 
use the TARGETS.

4) installation
i have one installation target. install( TARGET ... LOCATION ..) if i build 
debug, this contains debug, if i build release, this contains release. So it 
gets mixed and i have to differ location...


So i think 2 out of 4 issues are solved with cmake 3.0

As newbee to cmake i only could not understand why this single / multi 
configuration stuff is supported. it makes it more complicated, but i assume it 
is like always: historical grown.

I personally would totaly accept seperated vs solutions for debug and release 
in different build directories, only relying on CMAKE_BUILD_TYPE at cmake 
configuration time, with output in same directory structure (without 
debug/release) like e.g. with nmake.

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to