File tree 4 files changed +7
-14
lines changed 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)
3
2
add_executable (api_bin call_bmc.cpp api.cpp)
3
+ target_link_libraries (bmc_api goto-programs util langapi ansi-c)
4
4
5
+ # This step builds the API in the form of a statically linked library (libbmc_api.a)
5
6
add_library (bmc_api api.cpp)
6
-
7
- target_link_libraries (bmc_api goto-programs util langapi ansi-c)
8
7
target_link_libraries (api_bin goto-programs util langapi ansi-c)
9
8
10
9
install (TARGETS bmc_api RUNTIME DESTINATION lib)
Original file line number Diff line number Diff line change 14
14
api_depst api_deps;
15
15
extern configt config;
16
16
17
- void initialize_api () {
17
+ void initialize () {
18
18
// Initialise a null-message handler (we don't print anything in the API)
19
19
api_deps.msg_handler = new null_message_handlert ();
20
20
// Initialise default options
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ struct api_depst {
13
13
};
14
14
15
15
// / Initialise API dependencies
16
- void initialize_api ();
16
+ void initialize ();
17
17
18
18
// / Load a goto_model from a given vector of filenames.
19
19
// / \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[])
25
25
// Convert argv to vector of strings for initialize_goto_model
26
26
std::vector<std::string> arguments (argv + 1 , argv + argc);
27
27
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 ();
36
30
37
31
auto model = load_model_from_files (arguments, *api_deps.opts );
38
32
You can’t perform that action at this time.
0 commit comments