Hey there,
I was busy with a Gradle script that generates .cpp
files, and I need to compile those as well as my existing sources.
Sadly, the generation does not work.
It seems impossible to generate cpp files, and compile them together with my source cpp files.
To show you the exact problem I have, I created a minimal test repository here, which shows the problem when you try to build.
Additionally, I uploaded the Gradle scan output here.
I checked the following resources on this subject:
- How to use gradle with generated sources? - #3 by bioinfornatics
- Gradle does not build required C++ libraries if the sources are generated
- https://stackoverflow.com/questions/38379142/
- native-samples/cpp/source-generation at master · gradle/native-samples · GitHub
Sadly, sources 1-3 are severely outdated, and use the old cpp
plugin instead of the modern cpp-application
/cpp-library
plugins (like I do). They are not useful.
Source 4 is good, but does not show how to manage situations with both generated and non-generated sources (like my situation).
Could somebody help me with this problem?
P.S: Maybe it is a good idea to add the minimal example from my repo to the official native-samples repo once it compiles?
P.P.S: I am not very experienced with Gradle yet.