File tree Expand file tree Collapse file tree 2 files changed +18
-19
lines changed
Expand file tree Collapse file tree 2 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.2.2 )
1+ cmake_minimum_required (VERSION 3.14 )
22project (fakeit VERSION 2.4.0 LANGUAGES CXX)
33
4- include (git-download )
4+ include (FetchContent )
55
6- set (REPO_DIR ${PROJECT_SOURCE_DIR} /${PROJECT_NAME} -repo)
7-
8- download_repo(
9- URL "https://github.com/eranpeer/FakeIt.git"
10- TAG ${PROJECT_VERSION}
11- CLONE_DIR ${REPO_DIR}
6+ FetchContent_Declare(
7+ fakeit_repo
8+ GIT_REPOSITORY https://github.com/eranpeer/FakeIt.git
9+ GIT_TAG ${PROJECT_VERSION}
1210)
1311
12+ FetchContent_MakeAvailable(fakeit_repo)
13+
1414add_library (${PROJECT_NAME} INTERFACE )
1515
1616target_include_directories (${PROJECT_NAME} INTERFACE
17- ${REPO_DIR } /single_header/standalone/
17+ ${fakeit_repo_SOURCE_DIR } /single_header/standalone/
1818)
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.2.2 )
1+ cmake_minimum_required (VERSION 3.14 )
22project (unity VERSION 2.4.1 LANGUAGES C)
33
4- include (git-download )
4+ include (FetchContent )
55
6- set (REPO_DIR ${PROJECT_SOURCE_DIR} /${PROJECT_NAME} -repo)
7-
8- download_repo(
9- URL "https://github.com/ThrowTheSwitch/Unity.git"
10- TAG v${PROJECT_VERSION}
11- CLONE_DIR ${REPO_DIR}
6+ FetchContent_Declare(
7+ unity_repo
8+ GIT_REPOSITORY https://github.com/ThrowTheSwitch/Unity.git
9+ GIT_TAG v${PROJECT_VERSION}
1210)
11+ FetchContent_MakeAvailable(unity_repo)
1312
1413add_library (${PROJECT_NAME} STATIC
15- ${REPO_DIR } /src/unity.c
14+ ${unity_repo_SOURCE_DIR } /src/unity.c
1615)
1716
1817target_include_directories (${PROJECT_NAME} PUBLIC
19- ${REPO_DIR } /src
18+ ${unity_repo_SOURCE_DIR } /src
2019)
You can’t perform that action at this time.
0 commit comments