commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 03/05: cmake: only build VOLK if it doesnt


From: git
Subject: [Commit-gnuradio] [gnuradio] 03/05: cmake: only build VOLK if it doesnt exist already
Date: Mon, 30 Mar 2015 05:25:10 +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 4492c52506d953da2dcc492ab18f131e94afd89e
Author: Nathan West <address@hidden>
Date:   Mon Feb 2 16:45:28 2015 -0600

    cmake: only build VOLK if it doesnt exist already
---
 CMakeLists.txt | 51 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 28 insertions(+), 23 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae69ea6..262b24f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -276,34 +276,39 @@ endif()
 ########################################################################
 # Setup volk as a subproject
 ########################################################################
-include(GrComponent)
-GR_REGISTER_COMPONENT("volk" ENABLE_VOLK)
-
-set(VOLK_INCLUDE_DIRS
-    ${CMAKE_CURRENT_SOURCE_DIR}/volk/include
-    ${CMAKE_CURRENT_BINARY_DIR}/volk/include
-)
-
-if(ENABLE_VOLK)
+find_package(Volk)
+if(NOT VOLK_FOUND)
+    include(GrComponent)
+    GR_REGISTER_COMPONENT("volk" ENABLE_VOLK)
+
+    set(VOLK_INCLUDE_DIRS
+        ${CMAKE_CURRENT_SOURCE_DIR}/volk/include
+        ${CMAKE_CURRENT_BINARY_DIR}/volk/include
+    )
 
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_VOLK_DESCRIPTION "Vector optimized library of 
kernels")
+    if(ENABLE_VOLK)
 
-CPACK_COMPONENT("volk_runtime"
-    GROUP        "Volk"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Dynamic link libraries"
-)
+    include(GrPackage)
+    CPACK_SET(CPACK_COMPONENT_GROUP_VOLK_DESCRIPTION "Vector optimized library 
of kernels")
 
-CPACK_COMPONENT("volk_devel"
-    GROUP        "Volk"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import 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"
+    )
 
-add_subdirectory(volk)
-endif(ENABLE_VOLK)
+    add_subdirectory(volk)
+    endif(ENABLE_VOLK)
+else()
+    message(STATUS "An external VOLK has been found and will be used for 
build.")
+    set(ENABLE_VOLK TRUE)
+endif(NOT VOLK_FOUND)
 
 # Handle gr_log enable/disable
 GR_LOGGING()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]