[script] enable swig flags when compiling vtr

This commit is contained in:
tangxifan 2022-12-01 15:16:58 -08:00
parent 78d4991a4e
commit 338e191f77
2 changed files with 5 additions and 14 deletions

View File

@ -237,14 +237,16 @@ if(OPENFPGA_ENABLE_SANITIZE)
endif()
# Extra flags
set(SWIG_SHARED_FLAGS "")
if (OPENFPGA_WITH_SWIG)
set(EXTRA_FLAGS "-fpic")
set(SWIG_SHARED_FLAGS "-fpic")
endif()
add_compile_options(${SWIG_SHARED_FLAGS})
# Set final flags
#
separate_arguments(
ADDITIONAL_FLAGS UNIX_COMMAND "${SANITIZE_FLAGS} ${PROFILING_FLAGS} ${COVERAGE_FLAGS} ${LOGGING_FLAGS} ${COLORED_COMPILE} ${EXTRA_FLAGS}"
ADDITIONAL_FLAGS UNIX_COMMAND "${SANITIZE_FLAGS} ${PROFILING_FLAGS} ${COVERAGE_FLAGS} ${LOGGING_FLAGS} ${COLORED_COMPILE} ${EXTRA_FLAGS} ${SWIG_SHARED_FLAGS}"
)
separate_arguments(
WARN_FLAGS UNIX_COMMAND "${WARN_FLAGS}"

View File

@ -18,18 +18,7 @@ if (OPENFPGA_WITH_SWIG)
I_FILE src/openfpga.i)
target_include_directories(libopenfpga_swig PUBLIC ${LIB_INCLUDE_DIRS})
target_link_libraries(libopenfpga_swig
libopenfpga
libarchopenfpga
libopenfpgashell
libopenfpgautil
libfabrickey
libfpgabitstream
libini
libpcf
libvtrutil
libbusgroup
libpugixml
libvpr)
libopenfpga)
endif()
#Create the library