-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This is for testing | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
project(test_ada_install VERSION 0.1.0 LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
find_package(ada REQUIRED) | ||
|
||
# You can provide your own code, this is just an example: | ||
file(WRITE main.cpp " | ||
#include \"ada.h\" | ||
#include <iostream> | ||
int main(int , char *[]) { | ||
ada::result<ada::url_aggregator> url = ada::parse<ada::url_aggregator>(\"https://www.google.com\"); | ||
url->set_protocol(\"http\"); | ||
std::cout << url->get_protocol() << std::endl; | ||
std::cout << url->get_host() << std::endl; | ||
return EXIT_SUCCESS; | ||
}") | ||
|
||
add_executable(main main.cpp) | ||
target_link_libraries(main PUBLIC ada::ada) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
context: | ||
version: "2.9.2" | ||
|
||
package: | ||
name: ada-url | ||
version: ${{ version }} | ||
|
||
source: | ||
url: "https://github.com/ada-url/ada/archive/refs/tags/v${{ version }}.tar.gz" | ||
sha256: f41575ad7eec833afd9f6a0d6101ee7dc2f947fdf19ae8f1b54a71d59f4ba5ec | ||
|
||
build: | ||
number: 0 | ||
script: | ||
- if: win | ||
then: | | ||
cmake -G Ninja ^ | ||
%CMAKE_ARGS% ^ | ||
-DADA_TESTING=OFF ^ | ||
-DADA_TOOLS=OFF ^ | ||
-DADA_BENCHMARKS=OFF ^ | ||
-B build -S %SRC_DIR% | ||
cmake --build build --target install | ||
else: | | ||
cmake -G Ninja \ | ||
$CMAKE_ARGS \ | ||
-DADA_TESTING=OFF \ | ||
-DADA_TOOLS=OFF \ | ||
-DADA_BENCHMARKS=OFF \ | ||
-S $SRC_DIR -B build | ||
cmake --build build --target install | ||
requirements: | ||
build: | ||
- "${{ compiler('cxx') }}" | ||
- "${{ stdlib('c') }}" | ||
- cmake | ||
- ninja | ||
|
||
tests: | ||
- script: | ||
- if: win | ||
then: | | ||
cmake -GNinja %CMAKE_ARGS% -B build -S . | ||
cmake --build build | ||
\\build\main.exe | ||
else: | | ||
cmake -GNinja $CMAKE_ARGS -B build -S . | ||
cmake --build build | ||
./build/main | ||
requirements: | ||
build: | ||
- "${{ compiler('cxx') }}" | ||
- "${{ stdlib('c') }}" | ||
- cmake | ||
- ninja | ||
files: | ||
recipe: | ||
- CMakeLists.txt | ||
|
||
- package_contents: | ||
include: | ||
- ada.h | ||
|
||
about: | ||
homepage: "https://ada-url.com/" | ||
summary: 'WHATWG-compliant and fast URL parser written in modern C++' | ||
description: | | ||
WHATWG-compliant and fast URL parser written in modern C++, part of | ||
Node.js, Clickhouse, Redpanda, Kong, Telegram and Cloudflare Workers. | ||
license: "MIT OR Apache-2.0" | ||
license_file: | ||
- LICENSE-APACHE | ||
- LICENSE-MIT | ||
documentation: https://ada-url.com/introduction/ | ||
repository: https://github.com/ada-url/ada | ||
|
||
extra: | ||
recipe-maintainers: | ||
- rHermes |