From f6e9a8eee4ff89c4fbe4e49b5043695416cb119b Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 24 Jun 2020 15:44:22 -0400 Subject: [PATCH] Making the cmake more verbose so we can figure out what is happening. --- CMakeLists.txt | 4 ++-- benchmark/checkperf.cmake | 4 +++- dependencies/CMakeLists.txt | 5 ++++- tools/CMakeLists.txt | 3 +++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5733ec84c..b9a1a3278 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,8 @@ add_subdirectory(include) add_subdirectory(src) add_subdirectory(windows) if(NOT(SIMDJSON_JUST_LIBRARY)) - add_subdirectory(tools) + add_subdirectory(dependencies) ## This needs to be before tools because of cxxopts + add_subdirectory(tools) ## This needs to be before tests because of cxxopts add_subdirectory(singleheader) endif() @@ -47,7 +48,6 @@ endif() # Compile tools / tests / benchmarks # if(NOT(SIMDJSON_JUST_LIBRARY)) - add_subdirectory(dependencies) add_subdirectory(tests) add_subdirectory(examples) add_subdirectory(benchmark) diff --git a/benchmark/checkperf.cmake b/benchmark/checkperf.cmake index 9f0573a73..650304e2d 100644 --- a/benchmark/checkperf.cmake +++ b/benchmark/checkperf.cmake @@ -8,6 +8,7 @@ # Clone the repository if it's not there find_package(Git QUIET) if (Git_FOUND AND (GIT_VERSION_STRING VERSION_GREATER "2.1.4")) # We use "-C" which requires a recent git + message(STATUS "Git is available and it is recent. We are enabling checkperf targets.") # sync_git_repository(myrepo ...) creates two targets: # myrepo - if the repo does not exist, creates and syncs it against the origin branch # update_myrepo - will update the repo against the origin branch (and create if needed) @@ -91,5 +92,6 @@ if (Git_FOUND AND (GIT_VERSION_STRING VERSION_GREATER "2.1.4")) # We use "-C" set_property(TEST checkperf APPEND PROPERTY LABELS per_implementation) set_property(TEST checkperf APPEND PROPERTY DEPENDS parse perfdiff ${SIMDJSON_USER_CMAKECACHE}) set_property(TEST checkperf PROPERTY RUN_SERIAL TRUE) - +else() + message(STATUS "Either git is unavailable or else it is too old. We are disabling checkperf targets.") endif () diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index ef30a8701..66034e77e 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -3,6 +3,7 @@ find_package(Git QUIET) # We want the library to build even if git is missing if (Git_FOUND) + message(STATUS "Git is available.") # Does NOT attempt to update or otherwise modify git submodules that are already initialized. function(initialize_submodule DIRECTORY) if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${DIRECTORY}/.git) @@ -73,7 +74,9 @@ if (Git_FOUND) endif() initialize_submodule(cxxopts) + message(STATUS "We acquired cxxopts and we are adding it as a library and target.") add_library(cxxopts INTERFACE) target_include_directories(cxxopts INTERFACE cxxopts/include) - +else() + message(STATUS "Git is unavailable.") endif() \ No newline at end of file diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 7dcd0eb95..6f5caa38c 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,6 +1,9 @@ if(TARGET cxxopts) # we only build the tools if cxxopts is available + message(STATUS "We have cxxopts as a dependency and we are buiding the tools (e.g., json2json).") link_libraries(simdjson simdjson-internal-flags simdjson-windows-headers cxxopts) add_executable(json2json json2json.cpp) add_executable(jsonstats jsonstats.cpp) add_executable(minify minify.cpp) +else() + message(STATUS "We are missing cxxopts as a dependency so the tools (e.g., json2json) are omitted.") endif() \ No newline at end of file