Skip to content

Commit

Permalink
Stop consuming GoogleTest and GoogleBenchmark from Noa
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 28, 2025
1 parent 201aa7f commit f652ff2
Show file tree
Hide file tree
Showing 143 changed files with 52,947 additions and 15 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ option(SOURCEMETA_CORE_INSTALL "Install the Sourcemeta Core library" ON)
option(SOURCEMETA_CORE_ADDRESS_SANITIZER "Build Sourcemeta Core with an address sanitizer" OFF)
option(SOURCEMETA_CORE_UNDEFINED_SANITIZER "Build Sourcemeta Core with an undefined behavior sanitizer" OFF)

find_package(Noa REQUIRED)
include(./vendor/noa/cmake/noa.cmake)

if(SOURCEMETA_CORE_INSTALL)
include(GNUInstallDirs)
Expand Down Expand Up @@ -95,6 +95,7 @@ endif()
# Testing
if(SOURCEMETA_CORE_TESTS)
enable_testing()
find_package(GoogleTest REQUIRED)

if(SOURCEMETA_CORE_REGEX)
add_subdirectory(test/regex)
Expand Down Expand Up @@ -137,6 +138,7 @@ if(SOURCEMETA_CORE_TESTS)
endif()

if(SOURCEMETA_CORE_BENCHMARK)
find_package(GoogleBenchmark REQUIRED)
add_subdirectory(benchmark)
endif()
endif()
2 changes: 2 additions & 0 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ jsonschema-test-suite https://github.com/json-schema-org/JSON-Schema-Test-Suite
uriparser https://github.com/uriparser/uriparser bfe94f6e54d0abb5afa7bb0411940b7242cb835a
yaml https://github.com/yaml/libyaml 0.2.5
boost-regex https://github.com/boostorg/regex boost-1.86.0
googletest https://github.com/google/googletest a7f443b80b105f940225332ed3c31f2790092f47
googlebenchmark https://github.com/google/benchmark 378fe693a1ef51500db21b11ff05a8018c5f0e55
5 changes: 5 additions & 0 deletions cmake/FindGoogleBenchmark.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if(NOT Benchmark_FOUND)
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "enable testing of the benchmark library")
add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/googlebenchmark")
set(Benchmark_FOUND ON)
endif()
6 changes: 6 additions & 0 deletions cmake/FindGoogleTest.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if(NOT GoogleTest_FOUND)
set(BUILD_GMOCK ON CACHE BOOL "enable googlemock")
set(INSTALL_GTEST OFF CACHE BOOL "disable installation")
add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/googletest")
set(GoogleTest_FOUND ON)
endif()
13 changes: 0 additions & 13 deletions cmake/FindNoa.cmake

This file was deleted.

1 change: 0 additions & 1 deletion config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ foreach(component ${SOURCEMETA_CORE_COMPONENTS})
find_dependency(uriparser)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_uri.cmake")
elseif(component STREQUAL "json")
find_dependency(noa)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake")
elseif(component STREQUAL "jsonl")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake")
Expand Down
22 changes: 22 additions & 0 deletions vendor/googlebenchmark.mask

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

Loading

0 comments on commit f652ff2

Please sign in to comment.