-
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.
IMPR: Improve linking between the code parts
Improve linking between the code parts Plus, Ignore the 'modernize-type-traits' checker warning Plus, Ignore clang-format in 1 place Plus, Update version of 'actions/download-artifact' and 'actions/upload-artifact'
- Loading branch information
Showing
5 changed files
with
11 additions
and
11 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
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
include_directories(../incl) | ||
|
||
add_library (${CMAKE_PROJECT_NAME}InnerLib App.h App.cpp) | ||
target_link_libraries (${CMAKE_PROJECT_NAME}InnerLib PRIVATE ${CMAKE_PROJECT_NAME}Lib) | ||
add_executable (${CMAKE_PROJECT_NAME} main.cpp) | ||
target_link_libraries (${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_NAME}InnerLib ${CMAKE_PROJECT_NAME}Lib) | ||
target_link_libraries (${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_PROJECT_NAME}InnerLib) |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
include_directories(../incl) | ||
|
||
add_library (${CMAKE_PROJECT_NAME}Lib ../incl/Lib.h Lib.cpp ../incl/IHelloWorld.h ../incl/HelloWorld.h HelloWorld.cpp) | ||
target_include_directories(${CMAKE_PROJECT_NAME}Lib PUBLIC ../incl) |
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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
include_directories(../incl) | ||
|
||
include_directories(../src) | ||
include_directories(../../../Deps/googletest/googletest/include) | ||
include_directories(../../../Deps/googletest/googlemock/include) | ||
|
||
add_executable (${CMAKE_PROJECT_NAME}Test main.cpp LibTestCases.cpp AppTestCases.cpp) | ||
find_library(GTest gtest HINTS ${CMAKE_CURRENT_SOURCE_DIR}/../../../Deps/googletest/build/lib/) | ||
find_library(GMock gmock HINTS ${CMAKE_CURRENT_SOURCE_DIR}/../../../Deps/googletest/build/lib/) | ||
if(UNIX) | ||
set(PThreadLib -pthread) | ||
else() | ||
set(StaticLink -static) | ||
endif() | ||
target_link_libraries(${CMAKE_PROJECT_NAME}Test PUBLIC ${CMAKE_PROJECT_NAME}Lib ${CMAKE_PROJECT_NAME}InnerLib ${PThreadLib} ${StaticLink} ${GTest} ${GMock}) | ||
|
||
add_executable (${CMAKE_PROJECT_NAME}Test MockHelloWorld.h main.cpp LibTestCases.cpp AppTestCases.cpp) | ||
target_link_libraries(${CMAKE_PROJECT_NAME}Test PRIVATE ${CMAKE_PROJECT_NAME}Lib ${CMAKE_PROJECT_NAME}InnerLib ${PThreadLib} ${StaticLink} ${GTest} ${GMock}) | ||
|
||
add_test(NAME ${CMAKE_PROJECT_NAME}Test COMMAND ${CMAKE_PROJECT_NAME}Test) |
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