Skip to content

Commit

Permalink
Consume Noa using find_package
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Jan 21, 2025
1 parent 4ad4547 commit 2f2f241
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 113 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ option(JSONTOOLKIT_INSTALL "Install the JSON Toolkit library" ON)
option(JSONTOOLKIT_ADDRESS_SANITIZER "Build JSON Toolkit with an address sanitizer" OFF)
option(JSONTOOLKIT_UNDEFINED_SANITIZER "Build JSON Toolkit with an undefined behavior sanitizer" OFF)

set(NOA_GOOGLETEST ${JSONTOOLKIT_TESTS} CACHE BOOL "GoogleTest")
set(NOA_GOOGLEBENCHMARK ${JSONTOOLKIT_BENCHMARK} CACHE BOOL "GoogleBenchmark")
add_subdirectory(vendor/noa)
find_package(Noa REQUIRED)

if(JSONTOOLKIT_INSTALL)
include(GNUInstallDirs)
Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vendorpull https://github.com/sourcemeta/vendorpull 70342aaf458e6cb80baeb5b718901075fc42ede6
noa https://github.com/sourcemeta/noa 4fe72e795c684035712bc7ac38d96e84f62ff414
noa https://github.com/sourcemeta/noa 00e1e5e9cc3634c066651e77a5b7d52775215bb9
jsontestsuite https://github.com/nst/JSONTestSuite d64aefb55228d9584d3e5b2433f720ea8fd00c82
jsonschema-2020-12 https://github.com/json-schema-org/json-schema-spec 769daad75a9553562333a8937a187741cb708c72
jsonschema-2019-09 https://github.com/json-schema-org/json-schema-spec 41014ea723120ce70b314d72f863c6929d9f3cfd
Expand Down
12 changes: 12 additions & 0 deletions cmake/FindNoa.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if(NOT Noa_FOUND)
if(JSONTOOLKIT_INSTALL)
set(NOA_INSTALL ON CACHE BOOL "enable Noa installation")
else()
set(NOA_INSTALL OFF CACHE BOOL "disable Noa installation")
endif()

set(NOA_GOOGLETEST ${JSONTOOLKIT_TESTS} CACHE BOOL "GoogleTest")
set(NOA_GOOGLEBENCHMARK ${JSONTOOLKIT_BENCHMARK} CACHE BOOL "GoogleBenchmark")
add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/noa")
set(Noa_FOUND ON)
endif()
9 changes: 8 additions & 1 deletion vendor/noa/CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions vendor/noa/benchmark/CMakeLists.txt

This file was deleted.

37 changes: 0 additions & 37 deletions vendor/noa/benchmark/regex.cc

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions vendor/noa/vendor/boost-regex.mask

This file was deleted.

22 changes: 0 additions & 22 deletions vendor/noa/vendor/googlebenchmark.mask

This file was deleted.

0 comments on commit 2f2f241

Please sign in to comment.