File tree Expand file tree Collapse file tree 3 files changed +11
-13
lines changed
Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 99 permissions : write-all
1010 steps :
1111 - name : Install dependecies
12- run : sudo apt-get update && sudo apt-get install cmake -y
12+ run : sudo apt-get update && sudo apt-get install cmake libgtest-dev -y
1313 - name : Get repository code
1414 uses : actions/checkout@v3
1515 with :
1616 submodules : true
17- - name : Clone gtest library
18- run : ' git clone https://github.com/google/googletest.git'
1917 - name : Build project
2018 run : |
2119 cmake .
Original file line number Diff line number Diff line change @@ -12,13 +12,11 @@ jobs:
1212 permissions : write-all
1313 steps :
1414 - name : Install dependecies
15- run : sudo apt-get update && sudo apt-get install cmake -y
15+ run : sudo apt-get update && sudo apt-get install cmake libgtest-dev -y
1616 - name : Get repository code
1717 uses : actions/checkout@v3
1818 with :
1919 submodules : true
20- - name : Clone gtest library
21- run : git clone https://github.com/google/googletest.git
2220 - name : Build project
2321 run : |
2422 cmake .
Original file line number Diff line number Diff line change @@ -37,11 +37,6 @@ set_target_properties(${PROJECT_NAME} ${TEST_NAME}
3737#
3838find_package (GTest)
3939
40- # build googletest
41- add_subdirectory (
42- ${CMAKE_CURRENT_SOURCE_DIR} /googletest
43- )
44-
4540# add src to the include directories for the test target
4641target_include_directories (${TEST_NAME}
4742 PRIVATE
@@ -53,12 +48,19 @@ target_include_directories(${TEST_NAME}
5348target_link_libraries (${TEST_NAME}
5449 PRIVATE
5550 ${GTEST_BOOTH_LIBRARIES}
56- gmock
57- gmock_main
51+ # gmock
52+ # gmock_main
5853 gtest
5954 gtest_main
6055)
6156
57+ if (MSVC )
58+ # build googletest
59+ add_subdirectory (
60+ ${CMAKE_CURRENT_SOURCE_DIR} /googletest
61+ )
62+ endif ()
63+
6264
6365#--------------------------------------------------------------------------------------------------
6466# compiler settings
You can’t perform that action at this time.
0 commit comments