Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba26658251 | ||
|
|
8cda490918 |
||
|
|
509207e900 |
||
|
|
fc307f6b6a | ||
|
|
4e28b36fc0 |
3 changed files with 39 additions and 59 deletions
|
|
@ -1,97 +1,66 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 61900de4..b647de87 100644
|
index f13601d1..fdbf5813 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -28,43 +28,23 @@ option(ADA_TESTING "Build tests" ${BUILD_TESTING})
|
@@ -26,32 +26,17 @@ option(ADA_USE_SIMDUTF "Whether to use SIMDUTF for IDNA" OFF)
|
||||||
# errors due to CPM, so this is here to support disabling all the testing
|
# errors due to CPM, so this is here to support disabling all the testing
|
||||||
# and tooling for ada if one only wishes to use the ada library.
|
# and tooling for ada if one only wishes to use the ada library.
|
||||||
if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
|
if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
|
||||||
- include(cmake/CPM.cmake)
|
- include(cmake/CPM.cmake)
|
||||||
- # CPM requires git as an implicit dependency
|
- # CPM requires git as an implicit dependency
|
||||||
- find_package(Git QUIET)
|
|
||||||
# We use googletest in the tests
|
# We use googletest in the tests
|
||||||
- if(Git_FOUND AND ADA_TESTING)
|
if(ADA_TESTING)
|
||||||
- CPMAddPackage(
|
- CPMAddPackage(
|
||||||
- NAME GTest
|
- NAME GTest
|
||||||
- GITHUB_REPOSITORY google/googletest
|
- GITHUB_REPOSITORY google/googletest
|
||||||
- VERSION 1.14.0
|
- VERSION 1.15.2
|
||||||
- OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF"
|
- OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF"
|
||||||
- )
|
- )
|
||||||
+ if(ADA_TESTING)
|
+ find_package(GTest REQUIRED)
|
||||||
+ find_package(GTest)
|
|
||||||
endif()
|
endif()
|
||||||
# We use simdjson in both the benchmarks and tests
|
# We use simdjson in both the benchmarks and tests
|
||||||
- if(Git_FOUND AND (ADA_TESTING OR ADA_BENCHMARKS))
|
if(ADA_TESTING OR ADA_BENCHMARKS)
|
||||||
- CPMAddPackage("gh:simdjson/simdjson@3.9.1")
|
- CPMAddPackage("gh:simdjson/simdjson@3.10.1")
|
||||||
+ if(ADA_TESTING OR ADA_BENCHMARKS)
|
|
||||||
+ find_package(simdjson REQUIRED)
|
+ find_package(simdjson REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
# We use Google Benchmark, but it does not build under several 32-bit systems.
|
# We use Google Benchmark, but it does not build under several 32-bit systems.
|
||||||
- if(Git_FOUND AND ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
if(ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
||||||
- CPMAddPackage(
|
- CPMAddPackage(
|
||||||
- NAME benchmark
|
- NAME benchmark
|
||||||
- GITHUB_REPOSITORY google/benchmark
|
- GITHUB_REPOSITORY google/benchmark
|
||||||
- GIT_TAG f91b6b4
|
- VERSION 1.9.0
|
||||||
- OPTIONS "BENCHMARK_ENABLE_TESTING OFF"
|
- OPTIONS "BENCHMARK_ENABLE_TESTING OFF"
|
||||||
- "BENCHMARK_ENABLE_INSTALL OFF"
|
- "BENCHMARK_ENABLE_INSTALL OFF"
|
||||||
- "BENCHMARK_ENABLE_WERROR OFF"
|
- "BENCHMARK_ENABLE_WERROR OFF"
|
||||||
-
|
-
|
||||||
- )
|
- )
|
||||||
+ if(ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
|
||||||
+ find_package(benchmark REQUIRED)
|
+ find_package(benchmark REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ADA_TESTING AND NOT EMSCRIPTEN)
|
if (ADA_TESTING AND NOT EMSCRIPTEN)
|
||||||
- if(Git_FOUND)
|
@@ -80,12 +65,7 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
|
||||||
- set(CTEST_TEST_TIMEOUT 5)
|
|
||||||
- message(STATUS "The tests are enabled.")
|
|
||||||
- add_subdirectory(tests)
|
|
||||||
- else()
|
|
||||||
- message(STATUS "The tests are disabled because git was not found.")
|
|
||||||
- endif()
|
|
||||||
+ set(CTEST_TEST_TIMEOUT 5)
|
|
||||||
+ message(STATUS "The tests are enabled.")
|
|
||||||
+ add_subdirectory(tests)
|
|
||||||
else()
|
|
||||||
if(is_top_project)
|
|
||||||
message(STATUS "The tests are disabled.")
|
|
||||||
@@ -72,12 +52,8 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
|
|
||||||
endif(ADA_TESTING AND NOT EMSCRIPTEN)
|
|
||||||
|
|
||||||
If(ADA_BENCHMARKS AND NOT EMSCRIPTEN)
|
|
||||||
- if(Git_FOUND)
|
|
||||||
- message(STATUS "Ada benchmarks enabled.")
|
|
||||||
- add_subdirectory(benchmarks)
|
|
||||||
- else()
|
|
||||||
- message(STATUS "The benchmarks are disabled because git was not found.")
|
|
||||||
- endif()
|
|
||||||
+ message(STATUS "Ada benchmarks enabled.")
|
|
||||||
+ add_subdirectory(benchmarks)
|
|
||||||
else(ADA_BENCHMARKS AND NOT EMSCRIPTEN)
|
|
||||||
if(is_top_project)
|
|
||||||
message(STATUS "Ada benchmarks disabled. Set ADA_BENCHMARKS=ON to enable them.")
|
|
||||||
@@ -107,11 +83,7 @@ if(NOT ADA_COVERAGE AND NOT EMSCRIPTEN)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ADA_TOOLS)
|
if(ADA_USE_SIMDUTF)
|
||||||
- if(Git_FOUND)
|
- CPMAddPackage(
|
||||||
- add_subdirectory(tools)
|
- NAME simdutf
|
||||||
- else()
|
- GITHUB_REPOSITORY simdutf/simdutf
|
||||||
- message(STATUS "The tools are disabled because git was not found.")
|
- VERSION 7.3.2
|
||||||
- endif()
|
- OPTIONS "SIMDUTF_TESTS OFF" "SIMDUTF_TOOLS OFF"
|
||||||
+ add_subdirectory(tools)
|
- )
|
||||||
|
+ find_package(simdutf REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(
|
add_library(ada::ada ALIAS ada)
|
||||||
diff --git a/tools/cli/CMakeLists.txt b/tools/cli/CMakeLists.txt
|
diff --git a/tools/cli/CMakeLists.txt b/tools/cli/CMakeLists.txt
|
||||||
index 9f0da167..96b9ea29 100644
|
index 5e7ffe01..bcf606e7 100644
|
||||||
--- a/tools/cli/CMakeLists.txt
|
--- a/tools/cli/CMakeLists.txt
|
||||||
+++ b/tools/cli/CMakeLists.txt
|
+++ b/tools/cli/CMakeLists.txt
|
||||||
@@ -8,12 +8,8 @@ if(MSVC AND BUILD_SHARED_LIBS)
|
@@ -37,12 +37,8 @@ if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
"$<TARGET_FILE:ada>" # <--this is in-file
|
"$<TARGET_FILE:ada>" # <--this is in-file
|
||||||
"$<TARGET_FILE_DIR:adaparse>") # <--this is out-file path
|
"$<TARGET_FILE_DIR:adaparse>") # <--this is out-file path
|
||||||
endif()
|
endif()
|
||||||
-CPMAddPackage("gh:fmtlib/fmt#10.2.1")
|
-CPMAddPackage("gh:fmtlib/fmt#11.0.2")
|
||||||
-CPMAddPackage(
|
-CPMAddPackage(
|
||||||
- GITHUB_REPOSITORY jarro2783/cxxopts
|
- GITHUB_REPOSITORY jarro2783/cxxopts
|
||||||
- VERSION 3.2.0
|
- VERSION 3.2.0
|
||||||
|
|
|
||||||
21
ada-url.spec
21
ada-url.spec
|
|
@ -1,5 +1,11 @@
|
||||||
|
# WARNING: do not enable testing for release builds!
|
||||||
|
# with ADA_TESTING, std_regex_provider will be enabled for testing purposes
|
||||||
|
# It is not recommended to enable this flag and use std::regex under
|
||||||
|
# production environments due to several security issues.
|
||||||
|
%bcond_with check
|
||||||
|
|
||||||
Name: ada-url
|
Name: ada-url
|
||||||
Version: 2.9.2
|
Version: 3.3.0
|
||||||
|
|
||||||
%global forgeurl https://github.com/%{name}/ada
|
%global forgeurl https://github.com/%{name}/ada
|
||||||
%forgemeta
|
%forgemeta
|
||||||
|
|
@ -19,9 +25,11 @@ BuildRequires: gcc-c++
|
||||||
BuildRequires: cmake(fmt)
|
BuildRequires: cmake(fmt)
|
||||||
BuildRequires: cmake(cxxopts)
|
BuildRequires: cmake(cxxopts)
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
BuildRequires: cmake(GTest)
|
BuildRequires: cmake(GTest)
|
||||||
BuildRequires: cmake(benchmark)
|
%endif
|
||||||
BuildRequires: cmake(simdjson)
|
BuildRequires: cmake(simdjson)
|
||||||
|
BuildRequires: cmake(simdutf)
|
||||||
|
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
|
|
||||||
|
|
@ -62,9 +70,11 @@ the %{name} package.
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
%if 0%{?fedora} <= 39
|
-DADA_TOOLS:BOOL=ON \
|
||||||
-DBUILD_TESTING:BOOL=OFF
|
%if %{with check}
|
||||||
|
-DADA_TESTING:BOOL=ON \
|
||||||
%endif
|
%endif
|
||||||
|
-DADA_USE_SIMDUTF:BOOL=ON
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
doxygen ./doxygen
|
doxygen ./doxygen
|
||||||
|
|
@ -79,7 +89,7 @@ doxygen ./doxygen
|
||||||
%files
|
%files
|
||||||
%license LICENSE-MIT LICENSE-APACHE
|
%license LICENSE-MIT LICENSE-APACHE
|
||||||
%doc README.md docs/cli.md
|
%doc README.md docs/cli.md
|
||||||
%{_libdir}/libada.so.2*
|
%{_libdir}/libada.so.3*
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%{_bindir}/adaparse
|
%{_bindir}/adaparse
|
||||||
|
|
@ -87,6 +97,7 @@ doxygen ./doxygen
|
||||||
%files devel
|
%files devel
|
||||||
%{_libdir}/libada.so
|
%{_libdir}/libada.so
|
||||||
%{_libdir}/cmake/ada/
|
%{_libdir}/cmake/ada/
|
||||||
|
%{_libdir}/pkgconfig/ada.pc
|
||||||
%{_includedir}/ada/
|
%{_includedir}/ada/
|
||||||
%{_includedir}/ada.h
|
%{_includedir}/ada.h
|
||||||
%{_includedir}/ada_c.h
|
%{_includedir}/ada_c.h
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (ada-2.9.2.tar.gz) = bc876db537153d6b0599215ca8be8261bceca6d213fcc63af5fda13c1b32876496cb8d4e98c787f17317cf8ffd1940431551513807f1a18f9ce993fad35f5ec6
|
SHA512 (ada-3.3.0.tar.gz) = 728bf278fcac51a8ffdf5571cb486e789cd49511674c61e354c802bbfaeea64598fb22cd28ef4b02eacdd42c1c3437f40666ca8dba8097e0ecebbae1095de77f
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue