Hi,<br><br>In Windows-GNU.make:<br><br> # Support very long lists of object files.<br> if("${CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG}" STREQUAL "@")<br> foreach(rule CREATE_SHARED_MODULE CREATE_SHARED_LIBRARY LINK_EXECUTABLE)<br>
# The gcc/collect2/ld toolchain does not use response files<br> # internally so we cannot pass long object lists. Instead pass<br> # the object file list in a response file to the archiver to put<br> # them in a temporary archive. Hand the archive to the linker.<br>
string(REPLACE "<OBJECTS>" "-Wl,--whole-archive <OBJECT_DIR>/objects.a -Wl,--no-whole-archive"<br> CMAKE_${lang}_${rule} "${CMAKE_${lang}_${rule}}")<br> set(CMAKE_${lang}_${rule}<br>
"<CMAKE_COMMAND> -E remove -f <OBJECT_DIR>/objects.a"<br> "<CMAKE_AR> cr <OBJECT_DIR>/objects.a <OBJECTS>"<br> "${CMAKE_${lang}_${rule}}"<br>
)<br> endforeach()<br> endif()<br><br>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.<br><br>How can I disable response file in CMakeLists.txt ?<br>
<br>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.<br><br>--<br>Dongsheng<br><br>