Skip to content

Commit f6e9a8e

Browse files
author
Daniel Lemire
committed
Making the cmake more verbose so we can figure out what is happening.
1 parent cb8a9ef commit f6e9a8e

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ add_subdirectory(include)
3939
add_subdirectory(src)
4040
add_subdirectory(windows)
4141
if(NOT(SIMDJSON_JUST_LIBRARY))
42-
add_subdirectory(tools)
42+
add_subdirectory(dependencies) ## This needs to be before tools because of cxxopts
43+
add_subdirectory(tools) ## This needs to be before tests because of cxxopts
4344
add_subdirectory(singleheader)
4445
endif()
4546

4647
#
4748
# Compile tools / tests / benchmarks
4849
#
4950
if(NOT(SIMDJSON_JUST_LIBRARY))
50-
add_subdirectory(dependencies)
5151
add_subdirectory(tests)
5252
add_subdirectory(examples)
5353
add_subdirectory(benchmark)

benchmark/checkperf.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Clone the repository if it's not there
99
find_package(Git QUIET)
1010
if (Git_FOUND AND (GIT_VERSION_STRING VERSION_GREATER "2.1.4")) # We use "-C" which requires a recent git
11+
message(STATUS "Git is available and it is recent. We are enabling checkperf targets.")
1112
# sync_git_repository(myrepo ...) creates two targets:
1213
# myrepo - if the repo does not exist, creates and syncs it against the origin branch
1314
# 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"
9192
set_property(TEST checkperf APPEND PROPERTY LABELS per_implementation)
9293
set_property(TEST checkperf APPEND PROPERTY DEPENDS parse perfdiff ${SIMDJSON_USER_CMAKECACHE})
9394
set_property(TEST checkperf PROPERTY RUN_SERIAL TRUE)
94-
95+
else()
96+
message(STATUS "Either git is unavailable or else it is too old. We are disabling checkperf targets.")
9597
endif ()

dependencies/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
find_package(Git QUIET) # We want the library to build even if git is missing
55
if (Git_FOUND)
6+
message(STATUS "Git is available.")
67
# Does NOT attempt to update or otherwise modify git submodules that are already initialized.
78
function(initialize_submodule DIRECTORY)
89
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${DIRECTORY}/.git)
@@ -73,7 +74,9 @@ if (Git_FOUND)
7374
endif()
7475

7576
initialize_submodule(cxxopts)
77+
message(STATUS "We acquired cxxopts and we are adding it as a library and target.")
7678
add_library(cxxopts INTERFACE)
7779
target_include_directories(cxxopts INTERFACE cxxopts/include)
78-
80+
else()
81+
message(STATUS "Git is unavailable.")
7982
endif()

tools/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
if(TARGET cxxopts) # we only build the tools if cxxopts is available
2+
message(STATUS "We have cxxopts as a dependency and we are buiding the tools (e.g., json2json).")
23
link_libraries(simdjson simdjson-internal-flags simdjson-windows-headers cxxopts)
34
add_executable(json2json json2json.cpp)
45
add_executable(jsonstats jsonstats.cpp)
56
add_executable(minify minify.cpp)
7+
else()
8+
message(STATUS "We are missing cxxopts as a dependency so the tools (e.g., json2json) are omitted.")
69
endif()

0 commit comments

Comments
 (0)