-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Y. Velkov
authored and
Y. Velkov
committed
Aug 30, 2024
0 parents
commit 0272f5e
Showing
5 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build/ | ||
compile_commands.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
project(coverage_action) | ||
|
||
|
||
add_library(my_static_lib STATIC src/my_static_lib.cpp) | ||
add_library(my_shared_lib SHARED src/my_shared_lib.cpp) | ||
|
||
|
||
add_executable(main src/main.cpp) | ||
target_link_libraries(main my_static_lib my_shared_lib) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <iostream> | ||
|
||
int method_in_shared_lib(); | ||
int method_in_static_lib(); | ||
|
||
int main() { | ||
std::cout << "Hello, World!" << std::endl; | ||
std::cout << "method_in_shared_lib() returned: " << method_in_shared_lib() << std::endl; | ||
std::cout << "method_in_static_lib() returned: " << method_in_static_lib() << std::endl; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
int method_in_shared_lib() { | ||
return 42; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
int method_in_static_lib() { | ||
return 42; | ||
} |