MantisBT - CMake
View Issue Details
0011919CMakeCMakepublic2011-03-02 17:092016-06-10 14:31
Pere Mato 
Kitware Robot 
normalmajoralways
closedmoved 
WIN32Windows XP
CMake 2.8.4 
 
0011919: PRE_LINK custom command is not working to generate .DEF files
Migrating from CMake 2.8.3 to 2.8.4 makes the following example to fail with
NMAKE : fatal error U1073: don't know how to make 'gen.def'
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

add_library(mylib SHARED foo.cxx gen.def)
set_source_files_properties(gen.def PROPERTIES GENERATED 1)
add_custom_command(TARGET mylib PRE_LINK
                   COMMAND copy
                   ARGS ${CMAKE_CURRENT_SOURCE_DIR}/bar.def gen.def )
No tags attached.
Issue History
2011-03-02 17:09Pere MatoNew Issue
2011-05-25 18:05Mikhail TitovNote Added: 0026601
2012-08-11 11:09David ColeStatusnew => backlog
2012-08-11 11:09David ColeNote Added: 0030258
2016-06-10 14:28Kitware RobotNote Added: 0041812
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0026601)
Mikhail Titov   
2011-05-25 18:05   
I confirm this behavior with 2.8.4. I use a workaround by adding an extra custom command with OUTPUT signature:
add_custom_command(OUTPUT gen.def
COMMAND echo Will be generated later > gen.def
)
This results in generation of gen.def twice. Before the build to satisfy all requirements, and 2nd time during actual PRE_LINK event.
(0030258)
David Cole   
2012-08-11 11:09   
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0041812)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.