Start work on c++ test data generator
This commit is contained in:
parent
ee30d47d51
commit
8fc58e0bcf
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
||||
/docs/venv
|
||||
**/.ipynb_checkpoints
|
||||
/target
|
||||
/test-data/generator/build/
|
||||
|
17
test-data/generator/CMakeLists.txt
Normal file
17
test-data/generator/CMakeLists.txt
Normal 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)
|
10
test-data/generator/Dockerfile
Normal file
10
test-data/generator/Dockerfile
Normal 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
|
19
test-data/generator/generate.cpp
Normal file
19
test-data/generator/generate.cpp
Normal 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() {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user