Skip to content

Commit b701ada

Browse files
committed
Prevent build problems caused by CPM_USE_LOCAL_PACKAGES
1 parent 4393bb3 commit b701ada

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

standalone/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ CPMAddPackage(
1616
OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
1717
)
1818

19-
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
19+
CPMAddPackage(
20+
NAME Greeter
21+
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..
22+
FORCE ON
23+
)
2024

2125
# ---- Create standalone executable ----
2226

test/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ CPMAddPackage("gh:TheLartians/[email protected]")
2121
if(TEST_INSTALLED_VERSION)
2222
find_package(Greeter REQUIRED)
2323
else()
24-
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
24+
CPMAddPackage(
25+
NAME Greeter
26+
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..
27+
FORCE ON
28+
)
2529
endif()
2630

2731
# ---- Create binary ----

0 commit comments

Comments
 (0)