Warning, /acts/Detray/extern/vecmem/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # This file is part of the ACTS project.
0002 #
0003 # Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 #
0005 # This Source Code Form is subject to the terms of the Mozilla Public
0006 # License, v. 2.0. If a copy of the MPL was not distributed with this
0007 # file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008
0009 # CMake include(s).
0010 cmake_minimum_required(VERSION 3.14)
0011 include(FetchContent)
0012
0013 # Silence FetchContent warnings with CMake >=3.24.
0014 if(POLICY CMP0135)
0015 cmake_policy(SET CMP0135 NEW)
0016 endif()
0017
0018 # Tell the user what's happening.
0019 message(STATUS "Building VecMem as part of the Detray project")
0020
0021 # Declare where to get VecMem from.
0022 set(DETRAY_VECMEM_SOURCE
0023 "URL;https://github.com/acts-project/vecmem/archive/refs/tags/v${DETRAY_VECMEM_VERSION}.tar.gz;URL_MD5;${DETRAY_VECMEM_DIGEST}"
0024 CACHE STRING
0025 "Source for VecMem, when built as part of this project"
0026 )
0027 mark_as_advanced(DETRAY_VECMEM_SOURCE)
0028
0029 # Mark the import as a system library on modern CMake versions
0030 if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.25.0)
0031 set(DETRAY_VECMEM_SOURCE_FULL "${DETRAY_VECMEM_SOURCE};SYSTEM")
0032 else()
0033 set(DETRAY_VECMEM_SOURCE_FULL "${DETRAY_VECMEM_SOURCE}")
0034 endif()
0035 mark_as_advanced(DETRAY_VECMEM_SOURCE_FULL)
0036
0037 FetchContent_Declare(VecMem ${DETRAY_VECMEM_SOURCE_FULL})
0038
0039 # Options used in the build of VecMem.
0040 set(VECMEM_BUILD_TESTING
0041 FALSE
0042 CACHE BOOL
0043 "Turn off the build of the VecMem unit tests"
0044 )
0045
0046 # Get it into the current directory.
0047 FetchContent_MakeAvailable(VecMem)