From 1ea34ed10cafc953fc7d2c08c0fb630af4fb002e Mon Sep 17 00:00:00 2001 From: Ron Economos Date: Tue, 8 Dec 2020 01:57:11 -0800 Subject: [PATCH] cmake: Detect if cpu_features submodule is present. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f90523053..c5356a86d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)."