This patch allows the build process to use the provided dependencies instead of adding their source as CMake sub-directories (in which case "make install" would install googletest's and googlebenchmark's libraries and headers). diff --git a/CMakeLists.txt b/CMakeLists.txt index 57abc26..761c612 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,7 +93,7 @@ SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps CACHE PATH "Confu-style dependencies binary directory") IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS) - IF(CPUINFO_SUPPORTED_PLATFORM AND NOT DEFINED GOOGLETEST_SOURCE_DIR) + IF(FALSE) MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)") CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt") EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . @@ -105,7 +105,7 @@ IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS) ENDIF() IF(CPUINFO_BUILD_BENCHMARKS) - IF(CPUINFO_SUPPORTED_PLATFORM AND NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR) + IF(FALSE) MESSAGE(STATUS "Downloading Google Benchmark to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)") CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt") EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . @@ -271,14 +271,6 @@ INSTALL(TARGETS cpuinfo # ---[ cpuinfo micro-benchmarks IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS) - # ---[ Build google benchmark - IF(NOT TARGET benchmark) - SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "") - ADD_SUBDIRECTORY( - "${GOOGLEBENCHMARK_SOURCE_DIR}" - "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark") - ENDIF() - IF(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Android)$") ADD_EXECUTABLE(get-current-bench bench/get-current.cc) TARGET_LINK_LIBRARIES(get-current-bench cpuinfo benchmark) @@ -289,7 +281,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS) ENDIF() IF(CPUINFO_SUPPORTED_PLATFORM) - IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS) + IF(FALSE) # ---[ Build google test IF(NOT TARGET gtest) IF(MSVC AND NOT CPUINFO_RUNTIME_TYPE STREQUAL "static") 'left'>AgeCommit message (Expand)Author 2020-08-29build: Remove references to the 'nix-hash' program....* configure.ac: Remove check for 'nix-hash'. * tests/base32.scm (%nix-hash, %have-nix-hash?): Remove. ("sha256 & bytevector->nix-base32-string"): Remove test. * build-aux/pre-inst-env.in: Do not set 'NIX_HASH' environment variable. Ludovic Courtès 2019-09-08daemon: Remove 'NIX_LIBEXEC_DIR'....* nix/libstore/globals.hh (Settings)[nixLibexecDir]: Remove. * nix/libstore/globals.cc (Settings::processEnvironment): Remove reference to 'nixLibexecDir'. * nix/local.mk (libstore_a_CPPFLAGS): Remove -DNIX_LIBEXEC_DIR flag. * build-aux/pre-inst-env.in: Remove references to 'NIX_LIBEXEC_DIR'. Ludovic Courtès 2019-09-08daemon: Run 'guix offload' directly....* nix/scripts/offload.in: Remove. * nix/local.mk (nodist_pkglibexec_SCRIPTS) [BUILD_DAEMON_OFFLOAD]: Remove 'scripts/offload'. * config-daemon.ac: Don't output 'nix/scripts/offload'. * build-aux/pre-inst-env.in: Don't set 'NIX_BUILD_HOOK'. * nix/libstore/build.cc (HookInstance::HookInstance): Run 'guix offload'. (DerivationGoal::tryBuildHook): Remove reference to 'NIX_BUILD_HOOK'. * nix/nix-daemon/guix-daemon.cc (main) [HAVE_DAEMON_OFFLOAD_HOOK]: Don't set 'NIX_BUILD_HOOK'. * nix/nix-daemon/nix-daemon.cc (performOp) [!HAVE_DAEMON_OFFLOAD_HOOK]: Leave 'settings.useBuildHook' unchanged. Ludovic Courtès 2019-09-08daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'....* nix/scripts/list-runtime-roots.in: Remove. * guix/store/roots.scm (%proc-directory): New variable. (proc-file-roots, proc-exe-roots, proc-cwd-roots) (proc-fd-roots, proc-maps-roots, proc-environ-roots) (referenced-files, canonicalize-store-item, busy-store-items): New procedures, taken from 'list-runtime-roots.in'. * nix/libstore/globals.hh (Settings)[guixProgram]: New field. * nix/libstore/globals.cc (Settings::processEnvironment): Initialize 'guixProgram'. * nix/libstore/gc.cc (addAdditionalRoots): Drop code related to 'NIX_ROOT_FINDER'. Run "guix gc --list-busy". * nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove 'scripts/list-runtime-roots'. * config-daemon.ac: Don't output nix/scripts/list-runtime-roots. * build-aux/pre-inst-env.in: Don't set 'NIX_ROOT_FINDER'. Set 'GUIX'. * doc/guix.texi (Invoking guix gc): Document '--list-busy'. * guix/scripts/gc.scm (show-help, %options): Add "--list-busy". (guix-gc)[list-busy]: New procedure. Handle the 'list-busy' action. Ludovic Courtès 2019-02-04daemon: Add "/guix" to default 'nixLibexecDir'....This makes it easier to run the uninstalled daemon. * nix/local.mk (libstore_a_CPPFLAGS): Append "/guix" to NIX_LIBEXEC_DIR. * build-aux/pre-inst-env.in (NIX_LIBEXEC_DIR): Adjust comment. * nix/libstore/builtins.cc (builtinDownload): Remove SUBDIR and its use. * nix/libstore/local-store.cc (runAuthenticationProgram): Ditto. * nix/libstore/gc.cc (addAdditionalRoots): Remove "/guix" prefix. * nix/nix-daemon/guix-daemon.cc (main): Ditto. Ludovic Courtès 2019-02-04daemon: Remove the 'NIX_SUBSTITUTERS' environment variable....* nix/libstore/globals.cc (Settings:update): Remove changes to 'substituters'. * nix/nix-daemon/guix-daemon.cc (main): Set 'settings.substituters' directly instead of changing the 'NIX_SUBSTITUTERS' environment variable. * build-aux/pre-inst-env.in: Remove reference to 'NIX_SUBSTITUTERS'. Ludovic Courtès