Skip to content

Commit

Permalink
Merge pull request #425 from drmpeg/submodule-check
Browse files Browse the repository at this point in the history
cmake: Detect if cpu_features submodule is present.
  • Loading branch information
michaelld committed Dec 8, 2020
2 parents 951abda + 1ea34ed commit b1d493d
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 @@ -122,6 +122,9 @@ else()
option(VOLK_CPU_FEATURES "Volk uses cpu_features" OFF)
endif()
if (VOLK_CPU_FEATURES)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cpu_features/CMakeLists.txt" )
message(FATAL_ERROR "cpu_features/CMakeLists.txt not found. Did you forget to git clone recursively?\nFix with: git submodule update --init")
endif()
message(STATUS "Building Volk with cpu_features")
set(BUILD_PIC ON CACHE BOOL
"Build cpu_features with Position Independent Code (PIC)."
Expand Down

0 comments on commit b1d493d

Please sign in to comment.