mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-05-30 00:24:12 +08:00
no error on missing init file
This commit is contained in:
12
app/Main.cc
12
app/Main.cc
@@ -20,7 +20,6 @@
|
||||
#include <tcl.h>
|
||||
|
||||
#include "StaConfig.hh" // STA_VERSION
|
||||
#include "StringUtil.hh"
|
||||
#include "Sta.hh"
|
||||
|
||||
|
||||
@@ -28,15 +27,16 @@ namespace sta {
|
||||
extern const char *tcl_inits[];
|
||||
}
|
||||
|
||||
using std::string;
|
||||
using sta::stringEq;
|
||||
using sta::findCmdLineFlag;
|
||||
using sta::Sta;
|
||||
using sta::initSta;
|
||||
using sta::evalTclInit;
|
||||
using sta::stringPrintTmp;
|
||||
using sta::sourceTclFile;
|
||||
using sta::parseThreadsArg;
|
||||
using sta::tcl_inits;
|
||||
using sta::is_regular_file;
|
||||
|
||||
// Swig uses C linkage for init functions.
|
||||
extern "C" {
|
||||
@@ -116,9 +116,11 @@ staTclAppInit(int argc,
|
||||
Tcl_Eval(interp, "sta::show_splash");
|
||||
|
||||
if (!findCmdLineFlag(argc, argv, "-no_init")) {
|
||||
char *init_path = stringPrintTmp("[file join $env(HOME) %s]",
|
||||
init_filename);
|
||||
sourceTclFile(init_path, true, true, interp);
|
||||
string init_path = getenv("HOME");
|
||||
init_path += "/";
|
||||
init_path += init_filename;
|
||||
if (is_regular_file(init_path.c_str()))
|
||||
sourceTclFile(init_path.c_str(), true, true, interp);
|
||||
}
|
||||
|
||||
bool exit_after_cmd_file = findCmdLineFlag(argc, argv, "-exit");
|
||||
|
||||
Reference in New Issue
Block a user