From d67af36a82545d61234b7f07245628eef77045d6 Mon Sep 17 00:00:00 2001 From: jatinchowdhury18 Date: Fri, 18 Oct 2024 10:57:06 -0700 Subject: [PATCH] Bump minimum required CMake version, and only include CPM if needed (#24) * Bump minimum required CMake version, and only include CPM if needed * CPM for XSIMD if needed --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b964e10..e01dbe6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,7 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.15) project(chowdsp_wdf VERSION 1.0.0 LANGUAGES C CXX) include(cmake/CXXStandard.cmake) -include(cmake/CPM.cmake) - message(STATUS "Configuring ${PROJECT_NAME} library...") add_library(${PROJECT_NAME} INTERFACE) add_library(chowdsp::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) @@ -30,6 +28,7 @@ option(CHOWDSP_WDF_BUILD_BENCHMARKS "Add targets for building and running chowds set(CHOWDSP_WDF_TEST_WITH_XSIMD_VERSION "" CACHE STRING "Tests chowdsp_wdf with XSIMD version") if(NOT ("${CHOWDSP_WDF_TEST_WITH_XSIMD_VERSION}" STREQUAL "")) + include(cmake/CPM.cmake) message(STATUS "Importing XSIMD version ${CHOWDSP_WDF_TEST_WITH_XSIMD_VERSION} with CPM") CPMAddPackage( NAME xsimd @@ -39,9 +38,11 @@ if(NOT ("${CHOWDSP_WDF_TEST_WITH_XSIMD_VERSION}" STREQUAL "")) endif() if (CHOWDSP_WDF_BUILD_TESTS) + include(cmake/CPM.cmake) add_subdirectory(tests) endif() if (CHOWDSP_WDF_BUILD_BENCHMARKS) + include(cmake/CPM.cmake) add_subdirectory(bench) endif()