From c59b2db038e98569c540b75a1b9b2a200d014198 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 12 Nov 2019 08:29:40 -0700 Subject: [PATCH] build swig outputs in /build --- .gitignore | 1 - CMakeLists.txt | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c6eddea7..2ab47d26 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ Makefile /util/StaConfig.hh # /app/ -/app/StaApp_wrap.cc /app/TclInitVar.cc /app/sta /app/sta.exe diff --git a/CMakeLists.txt b/CMakeLists.txt index cc5e26ec..39fd0ecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,10 +60,12 @@ message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") # ################################################################ +set(STA_WRAP ${CMAKE_CURRENT_BINARY_DIR}/StaApp_wrap.cc) + set(STA_SOURCE app/StaMain.cc app/TclInitVar.cc - app/StaApp_wrap.cc + ${STA_WRAP} dcalc/ArcDelayCalc.cc dcalc/ArnoldiDelayCalc.cc @@ -634,9 +636,9 @@ add_flex_bison_dependency(SdfLex SdfParser) include(FindSWIG) -add_custom_command(OUTPUT ${STA_HOME}/app/StaApp_wrap.cc - COMMAND ${SWIG_EXECUTABLE} -tcl8 -c++ -namespace -prefix sta -I${STA_HOME}/tcl -I${STA_HOME}/sdf -I${STA_HOME}/dcalc -I${STA_HOME}/parasitics -I${STA_HOME}/verilog -o ${STA_HOME}/app/StaApp_wrap.cc ${STA_HOME}/app/StaApp.i - COMMAND ${STA_HOME}/etc/SwigCleanup.tcl ${STA_HOME}/app/StaApp_wrap.cc +add_custom_command(OUTPUT ${STA_WRAP} + COMMAND ${SWIG_EXECUTABLE} -tcl8 -c++ -namespace -prefix sta -I${STA_HOME}/tcl -I${STA_HOME}/sdf -I${STA_HOME}/dcalc -I${STA_HOME}/parasitics -I${STA_HOME}/verilog -o ${STA_WRAP} ${STA_HOME}/app/StaApp.i + COMMAND ${STA_HOME}/etc/SwigCleanup.tcl ${STA_WRAP} WORKING_DIRECTORY ${STA_HOME} DEPENDS ${STA_SWIG_FILES} )