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)
|
||||
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
|
||||
|
|
|
@ -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) );
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
/*
|
||||
* Output internal structure of classes defined in rr_blocks.h to XML format
|
||||
*/
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "rr_blocks.h"
|
||||
#include "rr_blocks_naming.h"
|
||||
|
|
Loading…
Reference in New Issue