]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
build: Fix setting of DEPS=LOCAL if FETCHCONTENT_FULLY_DISCONNECTED=ON
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 21 May 2024 19:20:50 +0000 (21:20 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 21 May 2024 20:03:40 +0000 (22:03 +0200)
Fixes #1456.

cmake/Dependencies.cmake

index f162b2dd58b0550066f159b372849feb47c7e93d..05e1d47f6e9d5934ad0014939e7ba698bea4c262 100644 (file)
@@ -5,10 +5,6 @@ if(POLICY CMP0135)
   cmake_policy(SET CMP0135 NEW)
 endif()
 
-if(NOT DEPS AND FETCHCONTENT_FULLY_DISCONNECTED)
-  message(STATUS "Setting DEPS=LOCAL as FETCHCONTENT_FULLY_DISCONNECTED is set")
-endif()
-
 # Hint about usage of the previously supported OFFLINE variable.
 if(OFFLINE)
   message(FATAL_ERROR "Please use -D DEPS=LOCAL instead of -D OFFLINE=ON")
@@ -19,6 +15,11 @@ endif()
 set(DEPS AUTO CACHE STRING "How to retrieve third party dependencies")
 set_property(CACHE DEPS PROPERTY STRINGS AUTO DOWNLOAD LOCAL)
 
+if(FETCHCONTENT_FULLY_DISCONNECTED)
+  message(STATUS "Setting DEPS=LOCAL as FETCHCONTENT_FULLY_DISCONNECTED is set")
+  set(DEPS LOCAL)
+endif()
+
 find_package(Blake3 1.4.0 MODULE REQUIRED)
 find_package(CppHttplib 0.10.6 MODULE REQUIRED)
 find_package(Fmt 8.0.0 MODULE REQUIRED)