[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/04: cmake: more robust VOLK configuratio
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/04: cmake: more robust VOLK configuration, allowing for selection of internal / external via an option; when looking for internal files, use NO_DEFAULT_PATH to look only in the paths provided; more useful status printouts. |
Date: |
Tue, 31 Mar 2015 20:37:40 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 328db5053a6c326b99518b79e14cce9f3f5a0c5a
Author: Michael Dickens <address@hidden>
Date: Tue Mar 31 12:10:11 2015 -0400
cmake: more robust VOLK configuration, allowing for selection of internal /
external via an option; when looking for internal files, use NO_DEFAULT_PATH to
look only in the paths provided; more useful status printouts.
---
CMakeLists.txt | 60 ++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 42 insertions(+), 18 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1362ffb..0d0a500 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -276,17 +276,40 @@ endif()
########################################################################
# Setup volk as a subproject
########################################################################
-find_package(Volk)
+message(STATUS "")
+message(STATUS "Configuring VOLK support...")
+
+OPTION(ENABLE_INTERNAL_VOLK "Enable internal VOLK only" ON)
+unset(VOLK_FOUND)
+if(NOT ENABLE_INTERNAL_VOLK)
+ find_package(Volk)
+ if(NOT VOLK_FOUND)
+ message(STATUS " External VOLK not found; checking internal.")
+ endif()
+endif()
if(NOT VOLK_FOUND)
find_file(INTREE_VOLK_FOUND
- volk/volk_common.h
- PATHS ${CMAKE_CURRENT_SOURCE_DIR}/volk/include
+ volk/volk_common.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/volk/include
+ NO_DEFAULT_PATH
)
if(NOT INTREE_VOLK_FOUND)
- message(FATAL_ERROR "VOLK submodule is not checked out")
+ message(STATUS " VOLK submodule is not checked out.")
+ message(STATUS " To check out the VOLK submodule, use:")
+ message(STATUS " git pull --recurse-submodules=on")
+ message(STATUS " git submodule update")
+ if(ENABLE_INTERNAL_VOLK)
+ message(STATUS " External VOLK disabled.")
+ endif()
+ message(STATUS " Override with -DENABLE_INTERNAL_VOLK=ON/OFF")
+ message(STATUS "")
+ message(FATAL_ERROR "VOLK required but not found.")
endif()
+ add_subdirectory(volk)
+ # if the above command returns, then VOLK is enabled
+
include(GrComponent)
GR_REGISTER_COMPONENT("volk" ENABLE_VOLK)
@@ -299,28 +322,29 @@ if(NOT VOLK_FOUND)
if(ENABLE_VOLK)
- include(GrPackage)
- CPACK_SET(CPACK_COMPONENT_GROUP_VOLK_DESCRIPTION "Vector optimized library
of kernels")
+ include(GrPackage)
+ CPACK_SET(CPACK_COMPONENT_GROUP_VOLK_DESCRIPTION "Vector optimized
library of kernels")
- CPACK_COMPONENT("volk_runtime"
- GROUP "Volk"
- DISPLAY_NAME "Runtime"
- DESCRIPTION "Dynamic link libraries"
- )
+ CPACK_COMPONENT("volk_runtime"
+ GROUP "Volk"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Dynamic link libraries"
+ )
- CPACK_COMPONENT("volk_devel"
- GROUP "Volk"
- DISPLAY_NAME "Development"
- DESCRIPTION "C++ headers, package config, import libraries"
- )
+ CPACK_COMPONENT("volk_devel"
+ GROUP "Volk"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ )
- add_subdirectory(volk)
endif(ENABLE_VOLK)
else()
- message(STATUS "An external VOLK has been found and will be used for
build.")
+ message(STATUS " An external VOLK has been found and will be used for
build.")
set(ENABLE_VOLK TRUE)
endif(NOT VOLK_FOUND)
+message(STATUS " Override with -DENABLE_INTERNAL_VOLK=ON/OFF")
+
# Handle gr_log enable/disable
GR_LOGGING()
- [Commit-gnuradio] [gnuradio] branch master updated (066003f -> 6168622), git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 03/04: Merge branch 'maint', git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 01/04: cmake: reorder VOLK library to be after all other internal ones, and before boost., git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 04/04: Merge remote-tracking branch 'michaelld/volk_fixes', git, 2015/03/31
- [Commit-gnuradio] [gnuradio] 02/04: cmake: more robust VOLK configuration, allowing for selection of internal / external via an option; when looking for internal files, use NO_DEFAULT_PATH to look only in the paths provided; more useful status printouts.,
git <=