File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,14 @@ function(merge_libraries TARGET)
311
311
312
312
add_custom_command (TARGET ${TARGET} PRE_BUILD
313
313
314
+ # Note: Remove the library produced by -deps target to ensure that
315
+ # the build step below invokes the linker.
316
+ #
317
+ # Note: `cmake -E rm -f ...` is not supported by cmake 3.15 which is cmake
318
+ # version we still need to support.
319
+
320
+ COMMAND ${CMAKE_COMMAND} -E remove -f $< TARGET_FILE:${TARGET} -deps>
321
+
314
322
# TODO: This works only when the build tool is msbuild (as it uses
315
323
# msbuild cmd line options), fails with ninja for example.
316
324
@@ -319,8 +327,8 @@ function(merge_libraries TARGET)
319
327
--target ${TARGET} -deps
320
328
--config $< CONFIG>
321
329
--
322
- /nologo /v:q /filelogger /flp:Verbosity=q /flp:ShowCommandLine
323
- /flp:LogFile=\" ${log_file} .STATIC\"
330
+ /nologo /v:q /filelogger
331
+ " /flp:Verbosity=m;ShowCommandLine; LogFile=\" ${log_file} .STATIC\" "
324
332
325
333
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
326
334
COMMENT "Extracting dependency info for target ${TARGET} "
You can’t perform that action at this time.
0 commit comments