Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2015-01-03 Thread Paul Smith
On Mon, 2014-12-29 at 02:03 +, Fraser Hutchison wrote: I'd have thought the following replacement would work the same: function(stageobj target dir) add_custom_target(stage_${target} ALL COMMAND ${CMAKE_COMMAND} -E make_directory ${DESTDIR}/${dir} COMMAND

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-30 Thread Stephen Kelly
Fraser Hutchison wrote: Alternatively, you can tell CMake to allow the use of the LOCATION target property by setting the relevant policy to use the old behaviour temporarily Please don't do that. Please don't encourage others to do it either. Policies are not feature toggles.

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-30 Thread Stephen Kelly
Paul Smith wrote: I've thought about many ways to do this, but I can't seem to get around the fact that generator expressions like $TARGET_FILE... are only available within the commands of the target. It would probably help to have an sscce to experiment with. Thanks, Steve. -- Powered

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-30 Thread Fraser Hutchison
Yup - fair enough. I downgrade my Alternatively to As a last resort. Thanks, Fraser. On 30/12/2014 12:13, Stephen Kelly wrote: Fraser Hutchison wrote: Alternatively, you can tell CMake to allow the use of the LOCATION target property by setting the relevant policy to use the old behaviour

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-28 Thread Fraser Hutchison
Hi Paul, I'd have thought the following replacement would work the same:   function(stageobj target dir)       add_custom_target(stage_${target} ALL           COMMAND "${CMAKE_COMMAND}" -E make_directory "${DESTDIR}/${dir}"       COMMAND

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-24 Thread Paul Smith
On Tue, 2014-12-23 at 16:59 -0500, David Cole wrote: Are you sure there's a problem using TARGET_FILE in your original context? You should be able to use that in a custom command in your custom stage_tgt target... You have to give the name of the target for the TARGET_FILE generator

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-24 Thread Paul Smith
On Tue, 2014-12-23 at 21:32 +, Parag Chandra wrote: Have you tried the CMake variables LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH? I¹ve been using them to accomplish much the same thing. Well, I don't want ALL my executables and libraries to go into these locations. Only specific

[CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-23 Thread Paul Smith
Hi all. I need a pointer or two. In my environment I need to have my executables and binaries copied to another location; this has to happen as part of the default all target: it can't be required to run install for example (we use the install rule for a real install step, for one thing). What

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-23 Thread Parag Chandra
Have you tried the CMake variables LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH? I¹ve been using them to accomplish much the same thing. Parag Chandra Software Engineer, Mobile Team Mobile: +1.919.824.1410 https://ionic.com Ionic Security Inc. 1170 Peachtree St. NE STE 2285, Atlanta, GA

Re: [CMake] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-23 Thread David Cole via CMake
Paul, Are you sure there's a problem using TARGET_FILE in your original context? It seems to me it should work... From http://www.cmake.org/cmake/help/v3.1/manual/cmake-generator-expressions.7.html : $TARGET_FILE:tgt Full path to main file (.exe, .so.1.2, .a) where tgt is the name of a