File tree Expand file tree Collapse file tree 4 files changed +7
-14
lines changed
Expand file tree Collapse file tree 4 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 1-
2-
1+ # This step builds a binary driving the API (to be used for testing)
32add_executable (api_bin call_bmc.cpp api.cpp)
3+ target_link_libraries (api_bin goto-programs util langapi ansi-c)
44
5+ # This step builds the API in the form of a statically linked library (libbmc_api.a)
56add_library (bmc_api api.cpp)
6-
77target_link_libraries (bmc_api goto-programs util langapi ansi-c)
8- target_link_libraries (api_bin goto-programs util langapi ansi-c)
98
109install (TARGETS bmc_api RUNTIME DESTINATION lib)
Original file line number Diff line number Diff line change 1414api_depst api_deps;
1515extern configt config;
1616
17- void initialize_api () {
17+ void initialize () {
1818 // Initialise a null-message handler (we don't print anything in the API)
1919 api_deps.msg_handler = new null_message_handlert ();
2020 // Initialise default options
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ struct api_depst {
1313};
1414
1515// / Initialise API dependencies
16- void initialize_api ();
16+ void initialize ();
1717
1818// / Load a goto_model from a given vector of filenames.
1919// / \param files: A vector<string> containing the filenames to be loaded
Original file line number Diff line number Diff line change @@ -25,14 +25,8 @@ int main(int argc, char *argv[])
2525 // Convert argv to vector of strings for initialize_goto_model
2626 std::vector<std::string> arguments (argv + 1 , argv + argc);
2727
28- // Needed to initialise the language options correctly
29- cmdlinet cmdline;
30-
31- // config is global in config.cpp
32- config.set (cmdline);
33-
34- // Initialise C language mode
35- register_language (new_ansi_c_language);
28+ // Initialise API dependencies and global configuration in one step.
29+ initialize ();
3630
3731 auto model = load_model_from_files (arguments, *api_deps.opts );
3832
You can’t perform that action at this time.
0 commit comments