Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let CMake automatically clone the googletest repo, so that users do not need to do it separately #813

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/actions_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Build
Expand All @@ -33,10 +29,6 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Build
run: |
mkdir CPP/build
Expand All @@ -54,10 +46,6 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Install gcc 11
run: |
sudo apt update
Expand All @@ -80,10 +68,6 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Build
run: |
export CC=/usr/bin/clang
Expand All @@ -103,10 +87,6 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Install clang 13
run: |
wget https://apt.llvm.org/llvm.sh
Expand All @@ -131,10 +111,6 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Build
run: |
mkdir CPP/build
Expand Down
5 changes: 4 additions & 1 deletion CPP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ if(USE_EXTERNAL_GTEST)
find_package(GTest REQUIRED)
else()
include(GoogleTest)

execute_process(
COMMAND "git" "clone" "https://github.com/google/googletest"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/Tests
)
add_subdirectory("${PROJECT_SOURCE_DIR}/Tests/googletest/")
set_target_properties(gtest gtest_main PROPERTIES FOLDER GTest)
endif()
Expand Down
Loading