Skip to content

Commit

Permalink
Bump minimum required CMake version, and only include CPM if needed (#24
Browse files Browse the repository at this point in the history
)

* Bump minimum required CMake version, and only include CPM if needed

* CPM for XSIMD if needed
  • Loading branch information
jatinchowdhury18 authored Oct 18, 2024
1 parent 39ff3f4 commit d67af36
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
Expand All @@ -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
Expand All @@ -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()

0 comments on commit d67af36

Please sign in to comment.