[code-reflection] Integrated: Git use cmake jextract in maven
Gary Frost
gfrost at openjdk.org
Thu Apr 17 10:50:41 UTC 2025
Previously we added cmake artifacts (CMakeFiles.txt) to opencl, opengl and cuda subdirs in extractions.
Here we added the resulting java source files to the maven pom hierarchy.
Upshot of which, we (on Mac with OpenCL) use maven to build everything.. well nearly, we still need to manually run cmake
So this should work
bash maven-build.bash
java @hat/run ffi-opencl nbody
Note that the maven build bash script actually has a new step to run cmake on extractions dir
echo We need to run cmake in extractions dir first
pushd extractions
rm -rf cmake-build-debug
cmake -B cmake-build-debug
cmake --build cmake-build-debug --target extract
popd
echo Now we can use maven
mvn -e clean compile package install
```
I will remove this and put it into the maven build, when I grok how to add a source generator to maven.
-------------
Commit messages:
- Arrange for maven-build.bash to call cmake in extractions dir
- Allow maven to use cmake extracted files
Changes: https://git.openjdk.org/babylon/pull/400/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=400&range=00
Stats: 171 lines in 10 files changed: 150 ins; 2 del; 19 mod
Patch: https://git.openjdk.org/babylon/pull/400.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/400/head:pull/400
PR: https://git.openjdk.org/babylon/pull/400
More information about the babylon-dev
mailing list