Skip to content

Commit

Permalink
[Warnings] Removed -lz Flag from Compilation
Browse files Browse the repository at this point in the history
The -lz flag is used to link with the ZLIB library, but the library was
already being linked; so there was no reason to add the flag. This was
causing an insane number of warnings in the Clang build. If this is
added back for any reason, this should be checked.

Also cleaned up how ZLIB was being linked. ZLIB is required for reading
and processing the atom circuit; so it should always be linked with VPR.
  • Loading branch information
AlexandreSinger committed Aug 21, 2024
1 parent ead1091 commit 0afbfd4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ endif()
# Build type flags
#

set(EXTRA_FLAGS "")
if(VPR_ENABLE_INTERCHANGE)
set(EXTRA_FLAGS "-lz")
endif()

if(NOT MSVC)
# for GCC and Clang
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g3")
Expand Down Expand Up @@ -298,6 +293,7 @@ endif()
#
# Increased debugging vebosity
#
set(EXTRA_FLAGS "")
if(VTR_ENABLE_VERBOSE)
set(EXTRA_FLAGS "${EXTRA_FLAGS} -DVTR_ENABLE_DEBUG_LOGGING")
message(STATUS "Enabling increased debugging verbosity")
Expand Down
19 changes: 10 additions & 9 deletions vpr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,22 @@ endif ()
set_target_properties(libvpr PROPERTIES PREFIX "") #Avoid extra 'lib' prefix

#Specify link-time dependencies
find_package(ZLIB)
target_link_libraries(libvpr
libvtrutil
libarchfpga
libsdcparse
libblifparse
libtatum
libargparse
libpugixml
librrgraph
libvtrutil
libarchfpga
libsdcparse
libblifparse
libtatum
libargparse
libpugixml
librrgraph
ZLIB::ZLIB
)

if(VPR_USE_SERVER)
target_link_libraries(libvpr
sockpp-static
-lz
)
endif()

Expand Down

0 comments on commit 0afbfd4

Please sign in to comment.