1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Fix for s390x arch, since cpu_features does not support it

This commit is contained in:
Carles Fernandez 2020-10-27 10:16:07 +01:00
parent d7e2f82dab
commit 547e6c5624
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -1132,21 +1132,38 @@ if(NOT VOLKGNSSSDR_FOUND)
INSTALL_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install INSTALL_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install
) )
else() else()
ExternalProject_Add(volk_gnsssdr_module if(CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x")
PREFIX ${CMAKE_BINARY_DIR}/volk_gnsssdr_module ExternalProject_Add(volk_gnsssdr_module
SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr PREFIX ${CMAKE_BINARY_DIR}/volk_gnsssdr_module
BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build
-DCMAKE_BUILD_TYPE=$<$<CONFIG:None>:None>$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:NoOptWithASM>$<$<CONFIG:Coverage>:Coverage>$<$<CONFIG:O2WithASM>:O2WithASM>$<$<CONFIG:O3WithASM>:O3WithASM>$<$<CONFIG:ASAN>:ASAN> CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
DOWNLOAD_COMMAND "" -DCMAKE_BUILD_TYPE=$<$<CONFIG:None>:None>$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:NoOptWithASM>$<$<CONFIG:Coverage>:Coverage>$<$<CONFIG:O2WithASM>:O2WithASM>$<$<CONFIG:O3WithASM>:O3WithASM>$<$<CONFIG:ASAN>:ASAN>
UPDATE_COMMAND "" DOWNLOAD_COMMAND ""
PATCH_COMMAND "" UPDATE_COMMAND ""
BUILD_COMMAND ${VOLK_GNSSSDR_BUILD_COMMAND} volk_gnsssdr_profile PATCH_COMMAND ""
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}volk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX} BUILD_COMMAND ${VOLK_GNSSSDR_BUILD_COMMAND} volk_gnsssdr_profile
${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}volk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile
INSTALL_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install INSTALL_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install
) )
else()
ExternalProject_Add(volk_gnsssdr_module
PREFIX ${CMAKE_BINARY_DIR}/volk_gnsssdr_module
SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build
CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
-DCMAKE_BUILD_TYPE=$<$<CONFIG:None>:None>$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:NoOptWithASM>$<$<CONFIG:Coverage>:Coverage>$<$<CONFIG:O2WithASM>:O2WithASM>$<$<CONFIG:O3WithASM>:O3WithASM>$<$<CONFIG:ASAN>:ASAN>
DOWNLOAD_COMMAND ""
UPDATE_COMMAND ""
PATCH_COMMAND ""
BUILD_COMMAND ${VOLK_GNSSSDR_BUILD_COMMAND} volk_gnsssdr_profile
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}volk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile
${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX}
INSTALL_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install
)
endif()
endif() endif()
if(NOT ORC_FOUND) if(NOT ORC_FOUND)
@ -1170,7 +1187,7 @@ if(NOT VOLKGNSSSDR_FOUND)
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}" INTERFACE_INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LIBRARIES}" INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LIBRARIES}"
) )
if(CMAKE_VERSION VERSION_GREATER 3.0) if(CMAKE_VERSION VERSION_GREATER 3.0 AND NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x"))
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
INTERFACE_LINK_LIBRARIES ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX}
) )