Enable an option to disable/enable graphics in VPR compilation
This commit is contained in:
parent
90696def6d
commit
61e359efc5
|
@ -20,11 +20,16 @@ if (ENABLE_VPR_GRAPHICS)
|
||||||
if (NOT X11_FOUND)
|
if (NOT X11_FOUND)
|
||||||
message(WARNING "Failed to find required X11 library (on debian/ubuntu try 'sudo apt-get install libx11-dev' to install)")
|
message(WARNING "Failed to find required X11 library (on debian/ubuntu try 'sudo apt-get install libx11-dev' to install)")
|
||||||
#Disable
|
#Disable
|
||||||
else ()
|
|
||||||
set(ENABLE_VPR_GRAPHICS false)
|
set(ENABLE_VPR_GRAPHICS false)
|
||||||
endif()
|
endif()
|
||||||
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
|
# We need readline to compile
|
||||||
find_package(Readline REQUIRED)
|
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
|
set_target_properties(libvpr PROPERTIES PREFIX "") #Avoid extra 'lib' prefix#Create the executable
|
||||||
|
|
||||||
#Specify link-time dependancies
|
#Specify link-time dependancies
|
||||||
target_link_libraries(libvpr
|
if (ENABLE_VPR_GRAPHICS)
|
||||||
libarchfpga
|
target_link_libraries(libvpr
|
||||||
X11
|
libarchfpga
|
||||||
readline)
|
X11
|
||||||
|
readline)
|
||||||
|
else ()
|
||||||
|
target_link_libraries(libvpr
|
||||||
|
libarchfpga
|
||||||
|
readline)
|
||||||
|
endif()
|
||||||
|
|
||||||
#Create the executables
|
#Create the executables
|
||||||
# regular vpr interface
|
# regular vpr interface
|
||||||
|
|
|
@ -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) {
|
for (size_t iseg = 0; iseg < LL_drive_rr_gsb.get_num_segments(); ++iseg) {
|
||||||
vpr_printf(TIO_MESSAGE_INFO,
|
vpr_printf(TIO_MESSAGE_INFO,
|
||||||
"For side %s, segment id %lu: Detect %d independent switch blocks from %d switch blocks.\n",
|
"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),
|
LL_drive_rr_gsb.get_num_sb_unique_submodule(side_manager.get_side(), iseg),
|
||||||
(nx + 1) * (ny + 1) );
|
(nx + 1) * (ny + 1) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* Output internal structure of classes defined in rr_blocks.h to XML format
|
* Output internal structure of classes defined in rr_blocks.h to XML format
|
||||||
*/
|
*/
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
|
#include <cassert>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string.h>
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include "rr_blocks.h"
|
#include "rr_blocks.h"
|
||||||
#include "rr_blocks_naming.h"
|
#include "rr_blocks_naming.h"
|
||||||
|
|
Loading…
Reference in New Issue