Compare commits
No commits in common. "rawhide" and "f41" have entirely different histories.
3 changed files with 59 additions and 39 deletions
|
|
@ -1,66 +1,97 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f13601d1..fdbf5813 100644
|
||||
index 61900de4..b647de87 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -26,32 +26,17 @@ option(ADA_USE_SIMDUTF "Whether to use SIMDUTF for IDNA" OFF)
|
||||
@@ -28,43 +28,23 @@ option(ADA_TESTING "Build tests" ${BUILD_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.
|
||||
if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
|
||||
- include(cmake/CPM.cmake)
|
||||
- # CPM requires git as an implicit dependency
|
||||
- find_package(Git QUIET)
|
||||
# We use googletest in the tests
|
||||
if(ADA_TESTING)
|
||||
- if(Git_FOUND AND ADA_TESTING)
|
||||
- CPMAddPackage(
|
||||
- NAME GTest
|
||||
- GITHUB_REPOSITORY google/googletest
|
||||
- VERSION 1.15.2
|
||||
- VERSION 1.14.0
|
||||
- OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF"
|
||||
- )
|
||||
+ find_package(GTest REQUIRED)
|
||||
+ if(ADA_TESTING)
|
||||
+ find_package(GTest)
|
||||
endif()
|
||||
# We use simdjson in both the benchmarks and tests
|
||||
if(ADA_TESTING OR ADA_BENCHMARKS)
|
||||
- CPMAddPackage("gh:simdjson/simdjson@3.10.1")
|
||||
- if(Git_FOUND AND (ADA_TESTING OR ADA_BENCHMARKS))
|
||||
- CPMAddPackage("gh:simdjson/simdjson@3.9.1")
|
||||
+ if(ADA_TESTING OR ADA_BENCHMARKS)
|
||||
+ find_package(simdjson REQUIRED)
|
||||
endif()
|
||||
# We use Google Benchmark, but it does not build under several 32-bit systems.
|
||||
if(ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
||||
- if(Git_FOUND AND ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
||||
- CPMAddPackage(
|
||||
- NAME benchmark
|
||||
- GITHUB_REPOSITORY google/benchmark
|
||||
- VERSION 1.9.0
|
||||
- GIT_TAG f91b6b4
|
||||
- OPTIONS "BENCHMARK_ENABLE_TESTING OFF"
|
||||
- "BENCHMARK_ENABLE_INSTALL OFF"
|
||||
- "BENCHMARK_ENABLE_WERROR OFF"
|
||||
-
|
||||
- )
|
||||
+ if(ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
||||
+ find_package(benchmark REQUIRED)
|
||||
endif()
|
||||
|
||||
if (ADA_TESTING AND NOT EMSCRIPTEN)
|
||||
@@ -80,12 +65,7 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
|
||||
- if(Git_FOUND)
|
||||
- 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()
|
||||
|
||||
if(ADA_USE_SIMDUTF)
|
||||
- CPMAddPackage(
|
||||
- NAME simdutf
|
||||
- GITHUB_REPOSITORY simdutf/simdutf
|
||||
- VERSION 7.3.2
|
||||
- OPTIONS "SIMDUTF_TESTS OFF" "SIMDUTF_TOOLS OFF"
|
||||
- )
|
||||
+ find_package(simdutf REQUIRED)
|
||||
if(ADA_TOOLS)
|
||||
- if(Git_FOUND)
|
||||
- add_subdirectory(tools)
|
||||
- else()
|
||||
- message(STATUS "The tools are disabled because git was not found.")
|
||||
- endif()
|
||||
+ add_subdirectory(tools)
|
||||
endif()
|
||||
|
||||
add_library(ada::ada ALIAS ada)
|
||||
install(
|
||||
diff --git a/tools/cli/CMakeLists.txt b/tools/cli/CMakeLists.txt
|
||||
index 5e7ffe01..bcf606e7 100644
|
||||
index 9f0da167..96b9ea29 100644
|
||||
--- a/tools/cli/CMakeLists.txt
|
||||
+++ b/tools/cli/CMakeLists.txt
|
||||
@@ -37,12 +37,8 @@ if(MSVC AND BUILD_SHARED_LIBS)
|
||||
@@ -8,12 +8,8 @@ if(MSVC AND BUILD_SHARED_LIBS)
|
||||
"$<TARGET_FILE:ada>" # <--this is in-file
|
||||
"$<TARGET_FILE_DIR:adaparse>") # <--this is out-file path
|
||||
endif()
|
||||
-CPMAddPackage("gh:fmtlib/fmt#11.0.2")
|
||||
-CPMAddPackage("gh:fmtlib/fmt#10.2.1")
|
||||
-CPMAddPackage(
|
||||
- GITHUB_REPOSITORY jarro2783/cxxopts
|
||||
- VERSION 3.2.0
|
||||
|
|
|
|||
21
ada-url.spec
21
ada-url.spec
|
|
@ -1,11 +1,5 @@
|
|||
# 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
|
||||
Version: 3.3.0
|
||||
Version: 2.9.2
|
||||
|
||||
%global forgeurl https://github.com/%{name}/ada
|
||||
%forgemeta
|
||||
|
|
@ -25,11 +19,9 @@ BuildRequires: gcc-c++
|
|||
BuildRequires: cmake(fmt)
|
||||
BuildRequires: cmake(cxxopts)
|
||||
|
||||
%if %{with check}
|
||||
BuildRequires: cmake(GTest)
|
||||
%endif
|
||||
BuildRequires: cmake(benchmark)
|
||||
BuildRequires: cmake(simdjson)
|
||||
BuildRequires: cmake(simdutf)
|
||||
|
||||
BuildRequires: doxygen
|
||||
|
||||
|
|
@ -70,11 +62,9 @@ the %{name} package.
|
|||
|
||||
%build
|
||||
%cmake \
|
||||
-DADA_TOOLS:BOOL=ON \
|
||||
%if %{with check}
|
||||
-DADA_TESTING:BOOL=ON \
|
||||
%if 0%{?fedora} <= 39
|
||||
-DBUILD_TESTING:BOOL=OFF
|
||||
%endif
|
||||
-DADA_USE_SIMDUTF:BOOL=ON
|
||||
%cmake_build
|
||||
|
||||
doxygen ./doxygen
|
||||
|
|
@ -89,7 +79,7 @@ doxygen ./doxygen
|
|||
%files
|
||||
%license LICENSE-MIT LICENSE-APACHE
|
||||
%doc README.md docs/cli.md
|
||||
%{_libdir}/libada.so.3*
|
||||
%{_libdir}/libada.so.2*
|
||||
|
||||
%files tools
|
||||
%{_bindir}/adaparse
|
||||
|
|
@ -97,7 +87,6 @@ doxygen ./doxygen
|
|||
%files devel
|
||||
%{_libdir}/libada.so
|
||||
%{_libdir}/cmake/ada/
|
||||
%{_libdir}/pkgconfig/ada.pc
|
||||
%{_includedir}/ada/
|
||||
%{_includedir}/ada.h
|
||||
%{_includedir}/ada_c.h
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (ada-3.3.0.tar.gz) = 728bf278fcac51a8ffdf5571cb486e789cd49511674c61e354c802bbfaeea64598fb22cd28ef4b02eacdd42c1c3437f40666ca8dba8097e0ecebbae1095de77f
|
||||
SHA512 (ada-2.9.2.tar.gz) = bc876db537153d6b0599215ca8be8261bceca6d213fcc63af5fda13c1b32876496cb8d4e98c787f17317cf8ffd1940431551513807f1a18f9ce993fad35f5ec6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue