Skip to content

Commit

Permalink
Porting Rust implementation to C++
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Vetter <[email protected]>
  • Loading branch information
VeaaC committed Feb 24, 2021
1 parent 4d23bd2 commit 0d957df
Show file tree
Hide file tree
Showing 4 changed files with 798 additions and 412 deletions.
18 changes: 17 additions & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@ project(flexpolyline)
add_library(flexpolyline INTERFACE)
target_include_directories(flexpolyline INTERFACE include)

add_executable(flexpolyline_cli src/cli.cpp)
set_property(TARGET flexpolyline_cli PROPERTY CXX_STANDARD 17)
target_link_libraries(flexpolyline_cli flexpolyline)

if(MSVC)
target_compile_options(flexpolyline_cli PRIVATE /W4 /WX)
else()
target_compile_options(flexpolyline_cli PRIVATE -Wall -Wextra -pedantic -Werror)
endif()

enable_testing()
add_executable(test_polyline test/test.cpp)
set_property(TARGET test_polyline PROPERTY CXX_STANDARD 11)
set_property(TARGET test_polyline PROPERTY CXX_STANDARD 17)
target_link_libraries(test_polyline flexpolyline)
add_test(NAME test_polyline COMMAND test_polyline)

if(MSVC)
target_compile_options(test_polyline PRIVATE /W4 /WX)
else()
target_compile_options(test_polyline PRIVATE -Wall -Wextra -pedantic -Werror)
endif()
Loading

0 comments on commit 0d957df

Please sign in to comment.