Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
"$RUNNER_TEMP/prik-release-check/bin/prik" --version
"$RUNNER_TEMP/prik-release-check/bin/python" -c \
'import importlib.metadata as m, prik; assert prik.__version__ == m.version("prik")'
"$RUNNER_TEMP/prik-release-check/bin/python" -c \
'from prik.cmake import cmake_module_dir; assert (cmake_module_dir() / "UsePRIK.cmake").is_file()'
"$RUNNER_TEMP/prik-release-check/bin/prik" --help
"$RUNNER_TEMP/prik-release-check/bin/python" -m prik --help
- name: Upload distributions
Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,44 @@ release tags add a leading `v` to the package version.

## Unreleased

- Added CMake integration through the packaged `UsePRIK.cmake` helper and a
`prik generate --cmake` standalone-project mode. CMake generates PRIK wrapper
sources as build outputs and owns native compilation, linking, external
targets, and incremental rebuilds while preserving per-source flags,
compiler-required ABI options, preprocessing dependencies, and linker
language from PRIK's completed build plan.

- CMake contract modules now distinguish semantic `NATIVE_LANGUAGE` from the
final `LINKER_LANGUAGE`, keep native compilation flags target-local, and
report a clear error when CMake's C language is not enabled.

- CMake dependency targets now propagate their native compile usage
requirements, and standalone `--cmake --lto` initializes IPO for native and
generated targets.

- `prik generate --cmake` keeps each native link input in its own CMake
category: prebuilt objects, archives, and shared libraries stay filesystem
paths in `LINK_LIBRARIES` instead of becoming ambiguous relative tokens,
while library names and linker arguments keep their meaning and order.

- CMake native object targets receive `LINK_LIBRARIES` with the caller's link
syntax unchanged, so `debug`/`optimized` keywords and generator-expression
entries keep selecting usage requirements per configuration instead of being
flattened or dropped.

- CMake mode rejects a `.C` source suffix, which CMake compiles as C++ while
PRIK plans the source as C, and reports a clear error when a module
contributes native Fortran sources without CMake's Fortran language enabled.

- `prik_add_module()` accepts `LIBRARY_DIRS`, mapping it to
`target_link_directories()` and the extension's `BUILD_RPATH`.
`generate --cmake` translates `--native-library-dir` into `LIBRARY_DIRS`, so
a shared native library outside the system search path is found both at link
time and on import without `LD_LIBRARY_PATH`.

- `prik-build.json` schema 5 records generated/native compilation-unit ABI
flags and explicit native linker-language requirements.

- Array handles support allocatable and pointer arguments, results, module
variables, derived fields, optional arguments, and matching ordinary-array
parameters. Numeric and character arrays accept supported forward and
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include CHANGELOG.md
include CITATION.cff
include .artifacts/.gitignore
recursive-include cmake *.cmake
Loading
Loading