Martin Apel wrote:
Hi all,

I am generating a DLL under Windows using a def file. The def file
itself is generated. It seems that CMake (2.6.3rc5) does not generate a
dependency between the generated def file and the DLL. When I change the
input, from which the def file is generated, the def file is rebuilt,
but not the DLL itself. The code looks as follows:

  SET(DefFile ${CMAKE_CURRENT_BINARY_DIR}/FortranInterface.def)
  ADD_CUSTOM_COMMAND(OUTPUT ${DefFile}
                     COMMAND ${PERL_EXECUTABLE}
${CMAKE_SOURCE_DIR}/scripts/create_dll_exports_file.pl
                     --export-file=${DefFile} --so-name=FortranInterface
                     ${CMAKE_CURRENT_SOURCE_DIR}/FortranInterfaceExport.txt
                     DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/FortranInterfaceExport.txt
                     )

  ADD_LIBRARY(FortranInterface SHARED ${DefFile} ${FortranSrc})
  TARGET_LINK_LIBRARIES(FortranInterface ${MY_LIBS})
  SET_TARGET_PROPERTIES(FortranInterface PROPERTIES
LINK_INTERFACE_LIBRARIES "")

  SET_SOURCE_FILES_PROPERTIES(${DefFile} PROPERTIES GENERATED 1)

To me this looks like a bug in CMake. Can somebody confirm, that this is
a bug or am I doing something wrong?

What version of VS are you using?   Also, nmake or VS IDE?

-Bill
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to