]> granicus.if.org Git - graphviz/commitdiff
tred: CMake: link to the gvc lib instead of the common lib
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 4 Aug 2021 09:04:58 +0000 (11:04 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 26 Dec 2021 06:59:15 +0000 (07:59 +0100)
The common lib is a static lib which is built into the shared gvc lib.

An upcoming commit that changes tred.c to include utils.h instead of
timing.h would otherwise cause these errors:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cmd/tools/CMakeFiles/tred.dir/tred.c.obj:tred.c:(.text+0xb47): undefined reference to `__imp_start_timer'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cmd/tools/CMakeFiles/tred.dir/tred.c.obj:tred.c:(.text+0xb7a): undefined reference to `__imp_elapsed_sec'

cmd/tools/CMakeLists.txt

index 95128229bb2ca5e9ae068671da2a16a8207a72ff..3be27f275f258268c925bfad5a1717975311beaf 100644 (file)
@@ -65,7 +65,7 @@ add_simple_tool(ccomps)
 add_simple_tool(gc)
 add_simple_tool(nop)
 add_simple_tool(tred)
-target_link_libraries(tred common) # e.g. for start_timer
+target_link_libraries(tred gvc) # e.g. for start_timer
 add_simple_tool(unflatten)
 
 # ================================ complex tools ===============================