diff --git a/CMakeLists.txt b/CMakeLists.txt index 5733ec84..b9a1a327 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 9f0573a7..650304e2 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 ef30a870..66034e77 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 7dcd0eb9..6f5caa38 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