forked from loafle/openapi-generator-original
* Keep old implementation of cpp-restbed generator as cpp-restbed-server-deprecated * Refactor operation path processing * Restructure samples directory to better allow writing tests * Improve templates for cpp-restbed-server Improve templates * Add integration tests * Improvement in templates for cpp-restbed-server * Fix tests * Improve cpp-restbed generator * Improve cpp-restbed-server * Add more tests * Add suppoert for arrays of enums in query params * Generate CMakeLists.txt * Small improvements and example in Readme * Add integration tests to maven project * Update doc
34 lines
964 B
CMake
34 lines
964 B
CMake
cmake_policy(SET CMP0048 NEW)
|
|
|
|
project(cpp-restped-server-open-api VERSION 1)
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
|
message(${CMAKE_MODULE_PATH})
|
|
|
|
include(dependencies)
|
|
include(JavaClientTests)
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
# Coverage
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-instr-generate -fcoverage-mapping")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-instr-generate -fcoverage-mapping")
|
|
message("Using clang coverage")
|
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
|
|
endif()
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
|
set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} -lpthread)
|
|
|
|
enable_testing()
|
|
|
|
add_subdirectory(generated/3_0)
|
|
add_subdirectory(test)
|