File tree Expand file tree Collapse file tree 4 files changed +11
-14
lines changed
Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 1212 runs-on : macos-latest
1313
1414 steps :
15- - uses : actions/checkout@v3
16- - name : Install GTest
17- run : brew install googletest
15+ - uses : actions/checkout@v4
1816 - name : CMake set-up
1917 run : cmake -DCMAKE_BUILD_TYPE=Release .
2018 - name : make
Original file line number Diff line number Diff line change 1313
1414 steps :
1515 - uses : actions/checkout@v3
16- - name : Install GTest
17- run : sudo apt install libgtest-dev
1816 - name : CMake set-up
1917 run : cmake -DCMAKE_BUILD_TYPE=Release .
2018 - name : make
Original file line number Diff line number Diff line change 1212 runs-on : windows-latest
1313
1414 steps :
15- - name : Install gtest
16- uses : MarkusJx/googletest-installer@v1.1
17- - uses : actions/checkout@v3
15+ - uses : actions/checkout@v4
1816 - name : CMake set-up
19- run : cmake -S . `-D CMAKE_BUILD_TYPE=Release -D GTEST_ROOT=D:/gtest `
17+ run : cmake -S . `-D CMAKE_BUILD_TYPE=Release`
2018 - name : make
2119 run : cmake --build . --config Release
Original file line number Diff line number Diff line change @@ -12,12 +12,15 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
1212#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
1313
1414find_package (Threads REQUIRED)
15- find_package (GTest REQUIRED)
1615
17- if (WIN32 )
18- set (CMAKE_CXX_FLAGS_RELEASE "/MT" )
19- set (CMAKE_CXX_FLAGS_DEBUG "/MTd" )
20- endif ()
16+ include (FetchContent)
17+ FetchContent_Declare(googletest
18+ GIT_REPOSITORY https://github.com/google/googletest.git
19+ GIT_TAG v1.16.0)
20+ # For Windows: Prevent overriding the parent project's compiler/linker settings
21+ set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
22+ FetchContent_MakeAvailable(googletest)
23+ enable_testing ()
2124
2225add_library (efp STATIC ElasticFrameProtocol.cpp)
2326add_library (efp_shared SHARED ElasticFrameProtocol.cpp)
You can’t perform that action at this time.
0 commit comments