Hi, In Windows-GNU.make:
# Support very long lists of object files. if("${CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG}" STREQUAL "@") foreach(rule CREATE_SHARED_MODULE CREATE_SHARED_LIBRARY LINK_EXECUTABLE) # The gcc/collect2/ld toolchain does not use response files # internally so we cannot pass long object lists. Instead pass # the object file list in a response file to the archiver to put # them in a temporary archive. Hand the archive to the linker. string(REPLACE "<OBJECTS>" "-Wl,--whole-archive <OBJECT_DIR>/objects.a -Wl,--no-whole-archive" CMAKE_${lang}_${rule} "${CMAKE_${lang}_${rule}}") set(CMAKE_${lang}_${rule} "<CMAKE_COMMAND> -E remove -f <OBJECT_DIR>/objects.a" "<CMAKE_AR> cr <OBJECT_DIR>/objects.a <OBJECTS>" "${CMAKE_${lang}_${rule}}" ) endforeach() endif() So if I use GCC generate .DLL with .DEF, not worked as expected. If I drop the code block, .DEF file will be worked as expected. How can I disable response file in CMakeLists.txt ? PS: If someone can check if there have .DEF file in "<OBJECTS>", then append it to the final "${CMAKE_${lang}_${rule}}", it should be fine too. -- Dongsheng
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake