From 58b5d45b0c7afc11fb79771aded5af7838340ea1 Mon Sep 17 00:00:00 2001 From: Trevor Hansen Date: Mon, 25 Jul 2016 10:47:01 +1000 Subject: [PATCH] Get development utility building again. --- tools/stp_constantbitprop/CMakeLists.txt | 29 ++++++++----------- tools/stp_constantbitprop/constantbitprop.cpp | 4 +-- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/tools/stp_constantbitprop/CMakeLists.txt b/tools/stp_constantbitprop/CMakeLists.txt index 25ae5939f..a3e98367a 100644 --- a/tools/stp_constantbitprop/CMakeLists.txt +++ b/tools/stp_constantbitprop/CMakeLists.txt @@ -22,20 +22,15 @@ # Create binary # ----------------------------------------------------------------------------- -# add_executable(stp_constantbitprop -# constantbitprop.cpp -# ${PROJECT_BINARY_DIR}/lib/Util/GitSHA1.cpp -# ) -# -# if (BUILD_STATIC_BIN) -# set_target_properties(stp_constantbitprop PROPERTIES LINK_SEARCH_END_STATIC 1) -# set_target_properties(stp_constantbitprop PROPERTIES LINK_SEARCH_START_STATIC 0) -# endif() -# -# set_target_properties(stp_constantbitprop PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) -# target_link_libraries(stp_constantbitprop libstp) -# -# install(TARGETS stp_constantbitprop -# EXPORT ${STP_EXPORT_NAME} -# RUNTIME DESTINATION bin -# ) +if(NOT BUILD_SHARED_LIBS) + set(CMAKE_EXE_LINKER_FLAGS "-pthread ${CMAKE_EXE_LINKER_FLAGS}") +endif() + + add_executable(stp_constantbitprop + constantbitprop.cpp + ${PROJECT_BINARY_DIR}/lib/Util/GitSHA1.cpp + ) + +target_link_libraries(stp_constantbitprop + libstp +) diff --git a/tools/stp_constantbitprop/constantbitprop.cpp b/tools/stp_constantbitprop/constantbitprop.cpp index 2834b4294..4614efbc6 100644 --- a/tools/stp_constantbitprop/constantbitprop.cpp +++ b/tools/stp_constantbitprop/constantbitprop.cpp @@ -86,7 +86,7 @@ int main(int argc, char** argv) // Apply cbitp ---------------------------------------- simplifier::constantBitP::ConstantBitPropagation cb( - simp, mgr->defaultNodeFactory, n); + mgr, simp, mgr->defaultNodeFactory, n); if (cb.isUnsatisfiable()) n = mgr->ASTFalse; else @@ -99,7 +99,7 @@ int main(int argc, char** argv) } // Print back out. - printer::SMTLIB2_PrintBack(cout, n); + printer::SMTLIB2_PrintBack(cout, n, mgr); cout << "(check-sat)\n"; cout << "(exit)\n"; return 0;