From 8d5aae1e018770f8b989157ec0305a3aeae1ad9e Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Thu, 3 Nov 2022 07:15:55 +0000 Subject: [PATCH] Add root CMakeLists.txt to better support FetchContent (#64) CMake's `FetchContent_MakeAvailable()` treats the fetched repository as a CMake project and automatically calls `subdirectory()` on it, if a `CMakeLists.txt` exists in the root directory. Signed-off-by: Lingkai Dong Signed-off-by: Lingkai Dong --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..0e46d768 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2022, Arm Limited and Contributors. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# This CMakeLists.txt in the root of the repository ensures that, when another +# project fetches CMSIS-DSP by calling FetchContent_MakeAvailable(), the call +# automatically adds CMSIS-DSP as a subdirectory. To maintain compatibility with +# existing projects that assume CMSIS-DSP's entry point to be Source/, we only +# add a redirection in the root CMakeLists.txt. +add_subdirectory(Source)