From 338e191f770bc11f3450910cedf3de6cd4d58af9 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Thu, 1 Dec 2022 15:16:58 -0800 Subject: [PATCH] [script] enable swig flags when compiling vtr --- CMakeLists.txt | 6 ++++-- openfpga/CMakeLists.txt | 13 +------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cac3f69fd..2df2d423c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}" diff --git a/openfpga/CMakeLists.txt b/openfpga/CMakeLists.txt index 9650369a1..4ef8796bf 100644 --- a/openfpga/CMakeLists.txt +++ b/openfpga/CMakeLists.txt @@ -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