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") 09pull: Install the new Guix in a profile....* guix/scripts/pull.scm (%pull-version): New variable. (build-from-source): Pass #:pull-version to BUILD. (whole-package-for-legacy, derivation->manifest-entry): New procedure. (build-and-install): Rewrite in terms of 'build-and-use-profile'. * guix/scripts/system.scm (maybe-suggest-running-guix-pull)[latest]: Switch to "/current". * scripts/guix.in (augment-load-paths!): Remove use of ~/.config/guix/latest. * build-aux/compile-as-derivation.scm: Replace "/guix/latest/" with "/current/share/guile/site/X.Y" * guix/scripts.scm (warn-about-old-distro)[age]: Check "/current" instead of "/latest". * doc/guix.texi (Invoking guix pull): Document it. * doc/contributing.texi (Running Guix Before It Is Installed): Remove footnote about abusing ~/.config/guix/latest. Ludovic Courtès 2018-01-28guix: Let Emacs detect “scripts/guix.in” appropriate mode....Since commit 6f774d481839f87178c5895ac2d661e141f879b8 which introduces the use of Guile's meta switch in “scripts/guix.in”, Emacs was not using ‘scheme-mode’ for this file. * scripts/guix.in: Replace "-*- scheme -*-" with a local variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin 2018-01-23guix: Refactor script....* scripts/guix.in: Remove empty surrounding ‘let’. Define 'main' as the procedure called when running the script. (maybe-augment-load-paths!): Rename to ... (augment-load-paths!): ... this. Use 'and=>' for 'file-exists?'. (run-guix-main): Rename to ... (main): ... this. Call 'augment-load-paths!'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin 2018-01-23build: Expand ‘scripts/guix’ at Make time....This moves the complexity of Autotools variable expansion outside of the application code. * scripts/guix.in (config-lookup): Delete. (maybe-augment-load-paths!, run-guix-main): Use fully expanded variables instead of calling ‘config-lookup’. * configure.ac: Don't use AC_CONFIG_FILES for ‘scripts/guix’. Use AC_PROG_SED. * Makefile.am (scripts/guix): New rule. (do_subst): New variable. (CLEANFILES, EXTRA_DIST): Adapt. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin