Skip to content

Commit 940b4e9

Browse files
Merge branch 'main' into arashpartow/update_exprtk_0.0.3
2 parents 77081d9 + 9683da9 commit 940b4e9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ set(VERSION_MINOR 0)
3939
# Add the spdlog directory to the include path
4040
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog/include ${CMAKE_CURRENT_SOURCE_DIR}/third_party/exprtk ${CMAKE_CURRENT_SOURCE_DIR}/third_party/scope_guard)
4141

42-
set(VERSION_PATCH 438)
42+
set(VERSION_PATCH 439)
4343

4444

4545
option(

src/Compiler/Compiler.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,8 +940,20 @@ bool Compiler::RegisterCommands(TclInterpreter* interp, bool batchMode) {
940940
return TCL_ERROR;
941941
}
942942
std::string opts;
943+
bool read_init_registers = false;
943944
for (int i = 1; i < argc; i++) {
944-
opts += std::string(argv[i]);
945+
std::string opt = argv[i];
946+
if (opt == "-read_init_registers") {
947+
read_init_registers = true;
948+
}
949+
if (read_init_registers) {
950+
if (opt != "2" && opt != "1" && opt != "0") {
951+
compiler->ErrorMessage("read_init_registers must be 0, 1, or 2");
952+
return TCL_ERROR;
953+
}
954+
read_init_registers = false;
955+
}
956+
opts += opt;
945957
if (i < (argc - 1)) {
946958
opts += " ";
947959
}

0 commit comments

Comments
 (0)