[BUG] [cpp-pistache-server] Generated cmake project does not build
Created by: JulianGmp
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
A recent pull request in the pistache repository made changes to their build system, in which the install
target was removed from the CMakeLists.txt
(see diff ).
That target is used by the pistache templates, and thus building the server will currently fail. Tested on current master (7bf792a3).
Build commands used
cmake -S . -B build/
cmake --build build/ -j 1 --target all
Last bits of the output:
[ 16%] Performing build step for 'PISTACHE'
[ 91%] Built target pistache
[ 95%] Built target pistache_static
[100%] Built target pistache_shared
[ 20%] Performing install step for 'PISTACHE'
gmake[3]: *** No rule to make target 'install'. Stop.
gmake[2]: *** [CMakeFiles/PISTACHE.dir/build.make:93: PISTACHE-prefix/src/PISTACHE-stamp/PISTACHE-install] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:154: CMakeFiles/PISTACHE.dir/all] Error 2
gmake: *** [Makefile:103: all] Error 2
openapi-generator version
openapi-generator-cli 5.1.1-SNAPSHOT commit : 7bf792a3 built : 2021-04-01T11:56:22+02:00
OpenAPI declaration file content or url
The yaml was the sample from https://swagger.io/docs/specification/basic-structure/
openapi: 3.0.0
info:
title: Sample API
description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
version: 0.1.9
servers:
- url: http://api.example.com/v1
description: Optional server description, e.g. Main (production) server
- url: http://staging-api.example.com
description: Optional server description, e.g. Internal staging server for testing
paths:
/users:
get:
summary: Returns a list of users.
description: Optional extended description in CommonMark or HTML.
responses:
'200': # status code
description: A JSON array of user names
content:
application/json:
schema:
type: array
items:
type: string
Generation Details
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g cpp-pistache-server -o out_temp2 -i ./sample.yaml
Steps to reproduce
- Clone and build latest master
- Generate any cpp-pistache-server
- Run cmake build
Related issues/PRs
N/A
Suggest a fix
N/A