Skip to content

Commit

Permalink
always build cpu_features as static library
Browse files Browse the repository at this point in the history
  • Loading branch information
RSchwan committed May 29, 2024
1 parent 1817dea commit 62132c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,14 @@ if (BUILD_PYTHON_INTERFACE OR BUILD_MATLAB_INTERFACE)
cpu_features
URL https://github.com/google/cpu_features/archive/refs/tags/v0.9.0.zip
)
set(BUILD_SHARED_LIBS_COPY ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)
FetchContent_GetProperties(cpu_features)
if(NOT cpu_features_POPULATED)
FetchContent_Populate(cpu_features)
add_subdirectory(${cpu_features_SOURCE_DIR} ${cpu_features_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_COPY})
endif ()

if (BUILD_TESTS OR BUILD_BENCHMARKS)
Expand Down

0 comments on commit 62132c1

Please sign in to comment.