MantisBT - CMake
View Issue Details
0011014CMakeCMakepublic2010-07-20 12:202011-01-12 07:33
Eric Huhtala 
Brad King 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.4CMake 2.8.4 
0011014: missing dependency on def file for nmake
When I look at the dll dependencies in the generated nmake files, there's no line for the def file, so editing the def file doesn't cause the dll to be relinked.

The link line does have "/def:myLib.def" as I'd expect.
This is what my CMakeLists.txt file looks like

# requiredFiles is a list of c++ files
if (WIN32)
    set (requiredFiles ${requiredFiles} myLib.def)
endif (WIN32)

add_library(myLib SHARED ${requiredFiles})

install(TARGETS myLib DESTINATION ${INSTALL_DIR})

def, depend, dependency, nmake
patch 0011014.patch (663) 2010-08-12 10:40
https://public.kitware.com/Bug/file/3313/0011014.patch
Issue History
2010-07-20 12:20Eric HuhtalaNew Issue
2010-07-20 12:22Eric HuhtalaTag Attached: def
2010-07-20 12:22Eric HuhtalaTag Attached: depend
2010-07-20 12:22Eric HuhtalaTag Attached: dependency
2010-07-20 12:22Eric HuhtalaTag Attached: nmake
2010-08-11 17:04Eric HuhtalaNote Added: 0021718
2010-08-11 17:05Eric HuhtalaNote Edited: 0021718
2010-08-12 10:40Eric HuhtalaFile Added: 0011014.patch
2010-08-12 10:43Eric HuhtalaNote Added: 0021734
2010-12-15 10:58David ColeAssigned To => Brad King
2010-12-15 10:58David ColeStatusnew => assigned
2010-12-15 11:33Brad KingNote Added: 0024163
2010-12-15 11:33Brad KingStatusassigned => closed
2010-12-15 11:33Brad KingResolutionopen => fixed
2011-01-12 07:33David ColeFixed in Version => CMake 2.8.4
2011-01-12 07:33David ColeTarget Version => CMake 2.8.4

Notes
(0021718)
Eric Huhtala   
2010-08-11 17:04   
(edited on: 2010-08-11 17:05)
I found a work around that works for me for now:

add_custom_target(def_dependency
    COMMAND del "\"${CMAKE_CURRENT_BINARY_DIR}\\myLib.dll\"" > CMakeFiles\def_dependency
    DEPENDS myLib.def
    )

(0021734)
Eric Huhtala   
2010-08-12 10:43   
I just attached 0011014.patch which fixed the issue for me. I wasn't sure if this was the appropriate method to submit a patch. If there's something else I should do, could someone please let me know?
(0024163)
Brad King   
2010-12-15 11:33   
I rebased the patch since the code it touches moved. Applied, thanks:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e279971 [^]