Start work on c++ test data generator

This commit is contained in:
Austen Adler 2023-02-22 18:41:45 -05:00
parent ee30d47d51
commit 8fc58e0bcf
4 changed files with 47 additions and 0 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/docs/venv
**/.ipynb_checkpoints
/target
/test-data/generator/build/

View File

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.10)
project(my_project)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Abseil requires C++14
set(CMAKE_CXX_STANDARD 14)
# Process Abseil's CMake build system
add_subdirectory(/Source/abseil-cpp /Source/abseil-cpp/build)
add_subdirectory(/Source/s2geometry /Source/s2geometry/build)
add_executable(generate generate.cpp)
# Declare dependency on the absl::strings library
target_link_libraries(generate absl::strings s2)

View File

@ -0,0 +1,10 @@
FROM ubuntu:latest
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libgflags-dev libgoogle-glog-dev libgtest-dev libssl-dev cmake git g++
RUN mkdir Source
RUN git clone https://github.com/google/s2geometry.git /Source/s2geometry
RUN git clone https://github.com/abseil/abseil-cpp.git /Source/abseil-cpp
WORKDIR /Source/src

View File

@ -0,0 +1,19 @@
#include <iostream>
#include "s2/s2earth.h"
#include "s2/s1angle.h"
int main(int argc, char **argv) {
S1Angle lat = S1Angle::Degrees(10.0);
S1Angle lon = S1Angle::Degrees(15.0);
S2LatLng s = S2LatLng(lat, lon);
S2LatLng g = s.Normalized();
std::cout << "hi\n";
return 0;
}
S2LatLng randomLatLon() {
}