Skip to content

Commit

Permalink
Merge pull request #771 from Zaryob/main
Browse files Browse the repository at this point in the history
Changes that suggested on #770
  • Loading branch information
jdemel authored Nov 3, 2024
2 parents 5aaac67 + b0d9356 commit 3bc6642
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
54 changes: 26 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
"${CMAKE_C_FLAGS} -Werror=incompatible-pointer-types -Werror=pointer-sign")
endif()

set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) #allows this to be a sub-project
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) #allows this to be a sub-project
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules
)#location for custom "Modules"

Expand Down Expand Up @@ -91,8 +89,8 @@ math(EXPR VOLK_VERSION_DECIMAL "${VERSION_INFO_MAJOR_VERSION} * 10000
+ ${VERSION_INFO_MINOR_VERSION} * 100
+ ${VERSION_INFO_MAINT_VERSION}")

configure_file(${CMAKE_SOURCE_DIR}/include/volk/volk_version.h.in
${CMAKE_BINARY_DIR}/include/volk/volk_version.h @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_version.h.in
${CMAKE_CURRENT_BINARY_DIR}/include/volk/volk_version.h @ONLY)

########################################################################
# Environment setup
Expand Down Expand Up @@ -236,31 +234,31 @@ set(VOLK_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
set(VOLK_INCLUDE_DIR include)

install(
DIRECTORY ${CMAKE_SOURCE_DIR}/kernels/volk
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/kernels/volk
DESTINATION include
COMPONENT "volk_devel"
FILES_MATCHING
PATTERN "*.h")

install(
FILES ${CMAKE_SOURCE_DIR}/include/volk/volk_prefs.h
${CMAKE_SOURCE_DIR}/include/volk/volk_alloc.hh
${CMAKE_SOURCE_DIR}/include/volk/volk_complex.h
${CMAKE_SOURCE_DIR}/include/volk/volk_common.h
${CMAKE_SOURCE_DIR}/include/volk/saturation_arithmetic.h
${CMAKE_SOURCE_DIR}/include/volk/volk_avx_intrinsics.h
${CMAKE_SOURCE_DIR}/include/volk/volk_avx2_intrinsics.h
${CMAKE_SOURCE_DIR}/include/volk/volk_avx2_fma_intrinsics.h
${CMAKE_SOURCE_DIR}/include/volk/volk_sse_intrinsics.h
${CMAKE_SOURCE_DIR}/include/volk/volk_sse3_intrinsics.h
${CMAKE_SOURCE_DIR}/include/volk/volk_neon_intrinsics.h
${CMAKE_BINARY_DIR}/include/volk/volk.h
${CMAKE_BINARY_DIR}/include/volk/volk_cpu.h
${CMAKE_BINARY_DIR}/include/volk/volk_config_fixed.h
${CMAKE_BINARY_DIR}/include/volk/volk_typedefs.h
${CMAKE_SOURCE_DIR}/include/volk/volk_malloc.h
${CMAKE_BINARY_DIR}/include/volk/volk_version.h
${CMAKE_SOURCE_DIR}/include/volk/constants.h
FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_prefs.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_alloc.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_complex.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_common.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/saturation_arithmetic.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_avx_intrinsics.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_avx2_intrinsics.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_avx2_fma_intrinsics.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_sse_intrinsics.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_sse3_intrinsics.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_neon_intrinsics.h
${CMAKE_CURRENT_BINARY_DIR}/include/volk/volk.h
${CMAKE_CURRENT_BINARY_DIR}/include/volk/volk_cpu.h
${CMAKE_CURRENT_BINARY_DIR}/include/volk/volk_config_fixed.h
${CMAKE_CURRENT_BINARY_DIR}/include/volk/volk_typedefs.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/volk_malloc.h
${CMAKE_CURRENT_BINARY_DIR}/include/volk/volk_version.h
${CMAKE_CURRENT_SOURCE_DIR}/include/volk/constants.h
DESTINATION include/volk
COMPONENT "volk_devel")

Expand Down Expand Up @@ -288,7 +286,7 @@ endif(APPLE)
########################################################################
# Create uninstall target
########################################################################
configure_file(${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake @ONLY)

# Only add the target if there isn't one defined already
Expand All @@ -303,11 +301,11 @@ endif()
# http://www.cmake.org/Wiki/CMake/Tutorials/Packaging
########################################################################

configure_file(${CMAKE_SOURCE_DIR}/cmake/Modules/VolkConfig.cmake.in
${CMAKE_BINARY_DIR}/cmake/Modules/VolkConfig.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/VolkConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/Modules/VolkConfig.cmake @ONLY)

configure_file(${CMAKE_SOURCE_DIR}/cmake/Modules/VolkConfigVersion.cmake.in
${CMAKE_BINARY_DIR}/cmake/Modules/VolkConfigVersion.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/VolkConfigVersion.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/Modules/VolkConfigVersion.cmake @ONLY)

########################################################################
# Install cmake search routine for external use
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/VolkPython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ file(TO_CMAKE_PATH ${VOLK_PYTHON_DIR} VOLK_PYTHON_DIR)
# Usage: VOLK_UNIQUE_TARGET(<description> <dependencies list>)
########################################################################
function(VOLK_UNIQUE_TARGET desc)
file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
file(RELATIVE_PATH reldir ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
unique = hashlib.sha256(b'${reldir}${ARGN}').hexdigest()[:5]
Expand Down

0 comments on commit 3bc6642

Please sign in to comment.