]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/stl_interfaces/cmake/dependencies.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / stl_interfaces / cmake / dependencies.cmake
index 99fa4436565dfcf4a7d8805dc5ccff034e7196e4..139f24ead5e98368cc7c55a631c17fcc68fef039 100644 (file)
@@ -10,29 +10,31 @@ set(Boost_USE_STATIC_LIBS ON)
 if (NOT BOOST_BRANCH)
   set(BOOST_BRANCH master)
 endif()
-add_custom_target(
-  boost_root_clone
-  git clone --depth 100 -b ${BOOST_BRANCH}
-    https://github.com/boostorg/boost.git boost_root
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
-if (MSVC)
-  set(bootstrap_cmd ./bootstrap.bat)
-else()
-  set(bootstrap_cmd ./bootstrap.sh)
-endif()
-add_custom_target(
-  boost_clone
-  COMMAND git submodule init libs/assert
-  COMMAND git submodule init libs/config
-  COMMAND git submodule init libs/core
-  COMMAND git submodule init tools/build
-  COMMAND git submodule init libs/headers
-  COMMAND git submodule init tools/boost_install
-  COMMAND git submodule update --jobs 3
-  COMMAND ${bootstrap_cmd}
-  COMMAND ./b2 headers
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/boost_root
-  DEPENDS boost_root_clone)
+if (NOT EXISTS ${CMAKE_BINARY_DIR}/boost_root)
+  add_custom_target(
+    boost_root_clone
+    git clone --depth 100 -b ${BOOST_BRANCH}
+      https://github.com/boostorg/boost.git boost_root
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+  if (MSVC)
+    set(bootstrap_cmd ./bootstrap.bat)
+  else()
+    set(bootstrap_cmd ./bootstrap.sh)
+  endif()
+  add_custom_target(
+    boost_clone
+    COMMAND git submodule init libs/assert
+    COMMAND git submodule init libs/config
+    COMMAND git submodule init libs/core
+    COMMAND git submodule init tools/build
+    COMMAND git submodule init libs/headers
+    COMMAND git submodule init tools/boost_install
+    COMMAND git submodule update --jobs 3
+    COMMAND ${bootstrap_cmd}
+    COMMAND ./b2 headers
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/boost_root
+    DEPENDS boost_root_clone)
+endif ()
 add_library(boost INTERFACE)
 add_dependencies(boost boost_clone)
 target_include_directories(boost INTERFACE ${CMAKE_BINARY_DIR}/boost_root)