@@ -55,6 +55,7 @@ set(GCC_MIN_VERSION "4.8.4")
55
55
set (CLANG_MIN_VERSION "3.4.0" )
56
56
set (APPLECLANG_MIN_VERSION "500" )
57
57
set (MSVC_MIN_VERSION "1800" )
58
+ set (VOLK_MIN_VERSION "2.1.0" )
58
59
59
60
# Enable generation of compile_commands.json for code completion engines
60
61
set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
@@ -368,67 +369,19 @@ endif()
368
369
369
370
370
371
########################################################################
371
- # Setup volk as a subproject
372
+ # Detect and configure VOLK
372
373
########################################################################
373
374
message (STATUS "" )
374
375
message (STATUS "Configuring VOLK support..." )
376
+ find_package (Volk ${VOLK_MIN_VERSION} REQUIRED)
377
+ message (STATUS " Found VOLK:" )
378
+ message (STATUS " * Version: ${VOLK_VERSION} " )
379
+ message (STATUS " * Libraries: ${VOLK_LIBRARIES} " )
380
+ message (STATUS " * Includes: ${VOLK_INCLUDE_DIRS} " )
375
381
376
- OPTION (ENABLE_INTERNAL_VOLK "Enable internal VOLK only" ON )
377
- UNSET (Volk_FOUND)
378
- if (NOT ENABLE_INTERNAL_VOLK)
379
- find_package (Volk)
380
- set (GR_VOLK_LIB "Volk::volk" )
381
- if (NOT Volk_FOUND)
382
- message (STATUS " External VOLK not found; checking internal." )
383
- endif ()
384
- endif ()
385
- if (NOT Volk_FOUND)
386
- find_file (INTREE_VOLK_FOUND
387
- volk/volk_common.h
388
- PATHS ${CMAKE_CURRENT_SOURCE_DIR} /volk/include
389
- NO_DEFAULT_PATH
390
- NO_CMAKE_FIND_ROOT_PATH
391
- )
392
-
393
- if (NOT INTREE_VOLK_FOUND)
394
- message (STATUS " VOLK submodule is not checked out." )
395
- message (STATUS " To check out the VOLK submodule, use:" )
396
- message (STATUS " git pull --recurse-submodules=on" )
397
- message (STATUS " git submodule update --init" )
398
- if (ENABLE_INTERNAL_VOLK)
399
- message (STATUS " External VOLK disabled." )
400
- endif ()
401
- message (STATUS " Override with -DENABLE_INTERNAL_VOLK=ON/OFF" )
402
- message (STATUS "" )
403
- message (FATAL_ERROR "VOLK required but not found." )
404
- endif ()
405
-
406
- add_subdirectory (volk)
407
- # if the above command returns, then VOLK is enabled
408
-
409
- include (GrComponent)
410
- GR_REGISTER_COMPONENT("volk" ENABLE_VOLK)
411
-
412
- SET (VOLK_INCLUDE_DIRS
413
- ${CMAKE_CURRENT_SOURCE_DIR} /volk/include
414
- ${CMAKE_CURRENT_BINARY_DIR} /volk/include
415
- )
416
-
417
- set (GR_VOLK_LIB "volk" )
418
-
419
- SET (VOLK_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_PREFIX} /lib)
420
- SET (VOLK_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX} /include )
421
- else ()
422
- message (STATUS " An external VOLK has been found and will be used for build." )
423
- SET (ENABLE_VOLK TRUE )
424
-
425
- get_filename_component (VOLK_INSTALL_LIBRARY_DIR "${VOLK_LIBRARIES} " DIRECTORY )
426
- SET (VOLK_INSTALL_INCLUDE_DIR ${VOLK_INCLUDE_DIRS} )
427
- endif (NOT Volk_FOUND)
428
-
429
- message (STATUS " Override with -DENABLE_INTERNAL_VOLK=ON/OFF" )
430
-
431
- # Handle logging
382
+ ########################################################################
383
+ # Configure Log4CPP
384
+ ########################################################################
432
385
find_package (LOG4CPP REQUIRED)
433
386
434
387
########################################################################
0 commit comments