[CMake] Get configuration-dependant LOCATION property

Michael Hertling mhertling at online.de
Mon Oct 4 09:24:17 EDT 2010


On 10/04/2010 10:53 AM, Mateusz Loskot wrote:
> On 04/10/10 07:33, J Decker wrote:
>> CMAKE_INSTALL_CONFIG_NAME I don't know if there's a simple flag like
>> 'project supports multiple targets' so I have an if(MSVC) set(
>> MULTI_TARGET) endif()  .... if( MULTI_TARGET ) Install( targets ...
>> ${CMAKE_INSTALL_CONFIG_NAME ) else() isntall( ... ${CMAKE_BUILD_TYPE}
> 
> 
> I need it before firing up install procedures.
> I build.
> I run tests (here I need to know location of build output per target).

Have you already taken a look at ADD_TEST()'s generator expressions like
$<TARGET_FILE_DIR:tgt>? AFAIK, they've been introduced quite exactly to
meet requirements such as yours.

Regards,

Michael


More information about the CMake mailing list