Whoops, I forgot the cmake output:
Lib is called: C:/Devel/SVN/trunk/build/test/qqq/Hello/Hello.lib Vs nmake output: Linking CXX static library Hello_d.lib Joe From: Josef Karthauser Sent: 21 December 2007 09:05 To: Josef Karthauser; [email protected] Subject: Bug in GET_TARGET_PROPERTY? (was CMAKE_CONFIG_POSTFIX vs GET_TARGET_PROPERTY(FILE foo LOCATION) ) It wasn't just the office party talking, I've rechecked today and it definitely isn't working as I'd expect: SET(CMAKE_DEBUG_POSTFIX "_d") Project(Hello) add_library (Hello hello.cxx hello.h) get_target_property(FILE Hello LOCATION) message("Lib is called: ${FILE}") Run cmake on this and I get the output: $ nmake Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. [100%] Building CXX object CMakeFiles/Hello.dir/hello.obj hello.cxx Linking CXX static library Hello_d.lib [100%] Built target Hello Am I misunderstanding the usage of get_target_property or is there a bug here? Joe From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josef Karthauser Sent: 20 December 2007 17:11 To: [email protected] Subject: [CMake] CMAKE_CONFIG_POSTFIX vs GET_TARGET_PROPERTY(FILE fooLOCATION) Am I going mad? (could be, it was the office party last night). I want to add a '_d' to the end of debug libraries, which it appears that I can do using something like: SET(CMAKE_DEBUG_WIN32_POSTFIX "_d" CACHE INTERNAL "Postfix for debug library names" FORCE) Later deep in some macros the code wants to find the filename associated with a given library: GET_TARGET_PROPERTY(FILE ${LIBNAME} LOCATION) Strangely, although the build makes a 'LIBNAME_d.lib' library, the get target property appears to return the name of the library without the _d. Am I hallucinating? Joe p.s. this is with 2.4.7.
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
