Use the asmjit and cpuinfo packages. diff --git a/CMakeLists.txt b/CMakeLists.txt index 134523e..b88b0e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -235,7 +235,7 @@ message(WARNING "CMAKE_CXX_FLAGS_DEBUG is ${CMAKE_CXX_FLAGS_DEBUG}") message(WARNING "CMAKE_CXX_FLAGS_RELEASE is ${CMAKE_CXX_FLAGS_RELEASE}") message(WARNING "==========") -if(NOT TARGET asmjit) +if(FALSE) #Download asmjit from github if ASMJIT_SRC_DIR is not specified. if(NOT DEFINED ASMJIT_SRC_DIR) set(ASMJIT_SRC_DIR "${FBGEMM_SOURCE_DIR}/third_party/asmjit" @@ -264,7 +264,7 @@ if(NOT TARGET asmjit) endif() endif() -if(NOT TARGET cpuinfo) +if(FALSE) #Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified. if(NOT DEFINED CPUINFO_SOURCE_DIR) set(CPUINFO_SOURCE_DIR "${FBGEMM_SOURCE_DIR}/third_party/cpuinfo" @@ -340,9 +340,12 @@ target_include_directories(fbgemm BEFORE target_link_libraries(fbgemm $ $) -add_dependencies(fbgemm - asmjit - cpuinfo) + +find_package(asmjit) +find_package(PkgConfig REQUIRED) +pkg_check_modules(libcpuinfo REQUIRED IMPORTED_TARGET libcpuinfo) + +target_link_libraries(fbgemm asmjit::asmjit PkgConfig::libcpuinfo) if(OpenMP_FOUND) target_link_libraries(fbgemm OpenMP::OpenMP_CXX) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2cffddf..bd4d409 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_C_EXTENSIONS OFF) set(CMAKE_C_STANDARD_REQUIRED ON) -if(FBGEMM_BUILD_TESTS AND NOT TARGET gtest) +if(FALSE) #Download Googletest framework from github if #GOOGLETEST_SOURCE_DIR is not specified. if(NOT DEFINED GOOGLETEST_SOURCE_DIR) @@ -78,7 +78,7 @@ macro(add_gtest TESTNAME) target_link_libraries(${TESTNAME} ${OpenMP_CXX_LIBRARIES}) endif() - add_dependencies(${TESTNAME} gtest fbgemm) + add_dependencies(${TESTNAME} fbgemm) add_test(${TESTNAME} ${TESTNAME}) set_target_properties(${TESTNAME} PROPERTIES FOLDER test) endmacro() 97596a25e63c2565ac284'>root/tests/substitute.scm
AgeCommit message (Expand)Author
2023-12-04substitute: Do not exit when failing to find a nar....Fixes <https://issues.guix.gnu.org/67575>. * guix/scripts/substitute.scm (process-substitution/fallback): Use ‘report-error’ instead of ‘leave’. Write status line to PORT. * tests/substitute.scm ("substitute, narinfo is available but nar is missing"): Adjust accordingly. Change-Id: Ic7297dbd563c007111ec2167c8d52505a07d4822 Ludovic Courtès
2023-06-08substitute: Gracefully retry after failed partial downloads....Fixes <https://issues.guix.gnu.org/63443>. Reported by Attila Lendvai <attila@lendvai.name>. * guix/scripts/substitute.scm (catch-system-error): New macro. (download-nar): Add call to 'delete-file-recursively'. * tests/substitute.scm ("substitute, previous partial download around"): New test. Ludovic Courtès
2023-05-30substitute: If a server's nar URL is 404, try the next one(s)....If a substitute server advertises in its narinfo, for example, both a /zstd and a /lzip URL but the /zstd URL is unreachable, try the /lzip URL. Fixes <https://issues.guix.gnu.org/63634>. * guix/narinfo.scm (narinfo-preferred-uris): New procedure. (narinfo-best-uri): Rebase on top of it. * guix/scripts/substitute.scm (download-nar)[try-fetch]: New procedure. Use 'narinfo-preferred-uris' and 'try-fetch' to attempt all the URLs of NARINFO. * tests/substitute.scm (request-substitution): Remove 'parameterize'. Delete DESTINATION. ("substitute, preferred nar URL is 404, other is 200"): New test. Ludovic Courtès
2022-09-28substitute: Retry downloading when a nar is unavailable....Fixes <https://issues.guix.gnu.org/57978> Reported by Attila Lendvai <attila@lendvai.name>. Previously, if a narinfo was available but its corresponding nar was missing (for instance because the narinfo was cached and the server became unreachable in the meantime), 'guix substitute --substitute' would try to download the nar from its preferred location and abort when that fails. This change forces one retry with each of the URLs. * guix/scripts/substitute.scm (download-nar): Do not catch 'http-get-error?' exceptions. (system-error?, network-error?, process-substitution/fallback): New procedures. (process-substitution): Call 'process-substitution/fallback' upon 'network-error?'. * tests/substitute.scm ("substitute, first URL has narinfo but lacks nar, second URL unauthorized") ("substitute, first URL has narinfo but nar is 404, both URLs authorized") ("substitute, first URL has narinfo but nar is 404, one URL authorized") ("substitute, narinfo is available but nar is missing"): New tests. Ludovic Courtès
2022-09-24substitute: Test behavior with unroutable substitute server addresses....* tests/substitute.scm (%unroutable-substitute-url): New variable. ("query narinfo signed with authorized key, unroutable URL first") ("substitute, authorized key, first substitute URL is unroutable"): New tests. Ludovic Courtès