diff --git a/vpr7_x2p/vpr/CMakeLists.txt b/vpr7_x2p/vpr/CMakeLists.txt index cb4a4190f..c614f2afc 100644 --- a/vpr7_x2p/vpr/CMakeLists.txt +++ b/vpr7_x2p/vpr/CMakeLists.txt @@ -20,11 +20,16 @@ if (ENABLE_VPR_GRAPHICS) if (NOT X11_FOUND) message(WARNING "Failed to find required X11 library (on debian/ubuntu try 'sudo apt-get install libx11-dev' to install)") #Disable - else () set(ENABLE_VPR_GRAPHICS false) endif() endif() -set(ENABLE_VPR_GRAPHICS false) + +if (NOT ENABLE_VPR_GRAPHICS) + # Add a flag to notify compiler not to consider graphic-related source codes + set (DISABLE_GRAPHIC_FLAGS "-DNO_GRAPHICS") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DISABLE_GRAPHIC_FLAGS}") + message(STATUS "Add flags to disable graphics in VPR compilation: ${DISABLE_GRAPHIC_FLAGS}") +endif() # We need readline to compile find_package(Readline REQUIRED) @@ -51,10 +56,16 @@ target_include_directories(libvpr PUBLIC ${LIB_INCLUDE_DIRS}) set_target_properties(libvpr PROPERTIES PREFIX "") #Avoid extra 'lib' prefix#Create the executable #Specify link-time dependancies -target_link_libraries(libvpr - libarchfpga - X11 - readline) +if (ENABLE_VPR_GRAPHICS) + target_link_libraries(libvpr + libarchfpga + X11 + readline) +else () + target_link_libraries(libvpr + libarchfpga + readline) +endif() #Create the executables # regular vpr interface diff --git a/vpr7_x2p/vpr/SRC/fpga_x2p/base/fpga_x2p_unique_routing.c b/vpr7_x2p/vpr/SRC/fpga_x2p/base/fpga_x2p_unique_routing.c index 3e88b03a4..d8de7bfb8 100644 --- a/vpr7_x2p/vpr/SRC/fpga_x2p/base/fpga_x2p_unique_routing.c +++ b/vpr7_x2p/vpr/SRC/fpga_x2p/base/fpga_x2p_unique_routing.c @@ -1322,7 +1322,7 @@ DeviceRRGSB build_device_rr_gsb(boolean output_sb_xml, char* sb_xml_dir, for (size_t iseg = 0; iseg < LL_drive_rr_gsb.get_num_segments(); ++iseg) { vpr_printf(TIO_MESSAGE_INFO, "For side %s, segment id %lu: Detect %d independent switch blocks from %d switch blocks.\n", - side_manager.to_string(), LL_drive_rr_gsb.get_segment_id(iseg), + side_manager.c_str(), LL_drive_rr_gsb.get_segment_id(iseg), LL_drive_rr_gsb.get_num_sb_unique_submodule(side_manager.get_side(), iseg), (nx + 1) * (ny + 1) ); } diff --git a/vpr7_x2p/vpr/SRC/fpga_x2p/base/write_rr_blocks.cpp b/vpr7_x2p/vpr/SRC/fpga_x2p/base/write_rr_blocks.cpp index 135b15ff1..fe525d6ab 100644 --- a/vpr7_x2p/vpr/SRC/fpga_x2p/base/write_rr_blocks.cpp +++ b/vpr7_x2p/vpr/SRC/fpga_x2p/base/write_rr_blocks.cpp @@ -1,9 +1,10 @@ /* * Output internal structure of classes defined in rr_blocks.h to XML format */ +#include +#include +#include #include -#include -#include #include "rr_blocks.h" #include "rr_blocks_naming.h"