@@ -7,6 +7,75 @@ release tags add a leading `v` to the package version.
77
88## Unreleased
99
10+ - Added CMake integration through the packaged ` UsePRIK.cmake ` helper and a
11+ ` prik generate --cmake ` standalone-project mode. CMake generates PRIK wrapper
12+ sources as build outputs and owns native compilation, linking, external
13+ targets, and incremental rebuilds while preserving per-source flags,
14+ compiler-required ABI options, preprocessing dependencies, and linker
15+ language from PRIK's completed build plan.
16+
17+ - CMake contract modules now distinguish semantic ` NATIVE_LANGUAGE ` from the
18+ final ` LINKER_LANGUAGE ` , keep native compilation flags target-local, and
19+ report a clear error when CMake's C language is not enabled.
20+
21+ - CMake dependency targets now propagate their native compile usage
22+ requirements, and standalone ` --cmake --lto ` initializes IPO for native and
23+ generated targets.
24+
25+ - CMake configuration no longer runs PRIK's semantic pipeline. It asks for a
26+ structural plan -- deterministic generated filenames, the link driver, and
27+ compiler-profile ABI flags -- and the full pipeline then runs once at build
28+ time. Configuring a 300-procedure module's plan drops from about 2.5s to
29+ 0.4s, and the structural query no longer grows with source size.
30+
31+ - Generated CMake targets have a fixed source list. The optional collision
32+ adapter and Fortran bridge units are always written, holding a
33+ symbol-free placeholder when unused, so a semantic edit changes file
34+ contents instead of the build graph and never forces a CMake reconfigure.
35+ Transitive semantic inputs now reach CMake through a generated dependency
36+ file, which raises the CMake floor for the packaged helper to 3.21.
37+
38+ - ` prik generate --cmake ` keeps each native link input in its own CMake
39+ category: prebuilt objects, archives, and shared libraries stay filesystem
40+ paths in ` LINK_LIBRARIES ` instead of becoming ambiguous relative tokens,
41+ while library names and linker arguments keep their meaning and order.
42+
43+ - CMake native object targets receive ` LINK_LIBRARIES ` with the caller's link
44+ syntax unchanged, so ` debug ` /` optimized ` keywords and generator-expression
45+ entries keep selecting usage requirements per configuration instead of being
46+ flattened or dropped.
47+
48+ - CMake mode rejects a ` .C ` source suffix, which CMake compiles as C++ while
49+ PRIK plans the source as C, and reports a clear error when a module
50+ contributes native Fortran sources without CMake's Fortran language enabled.
51+
52+ - ` prik_add_module() ` accepts ` LIBRARY_DIRS ` , mapping it to
53+ ` target_link_directories() ` and the extension's ` BUILD_RPATH ` .
54+ ` generate --cmake ` translates ` --native-library-dir ` into ` LIBRARY_DIRS ` , so
55+ a shared native library outside the system search path is found both at link
56+ time and on import without ` LD_LIBRARY_PATH ` .
57+
58+ - ` prik-build.json ` schema 5 records generated/native compilation-unit ABI
59+ flags and explicit native linker-language requirements.
60+
61+ - PRIK's CMake modules are packaged inside the ` prik ` distribution and
62+ discovered automatically. scikit-build-core builds pick the directory up
63+ through a ` cmake.module ` entry point, so ` include(UsePRIK) ` needs no lookup,
64+ and a packaged ` PRIKConfig.cmake ` makes ` find_package(PRIK CONFIG REQUIRED) `
65+ load the same helper. ` prik cmake-dir ` prints the packaged module directory
66+ and ` prik install-dir ` the prefix PRIK's data files are installed under, for
67+ ` -DPRIK_DIR= ` and ` -DCMAKE_PREFIX_PATH= ` . ` cmake_module_dir() ` and the
68+ ` share/prik/cmake ` installation are unchanged.
69+
70+ - The Ubuntu and macOS unit-test jobs now fail when CMake is missing instead of
71+ letting the CMake integration tests deselect themselves, and report a missing
72+ Ninja as a warning because those tests then use the Makefile generator.
73+
74+ - Added the runnable ` examples/cmake/ ` project, which builds one Fortran module
75+ through every CMake discovery route -- scikit-build-core's entry point,
76+ ` CMAKE_MODULE_PATH ` , ` PRIK_DIR ` , and an installation prefix -- with a script
77+ that runs each route and calls the built extension.
78+
1079- Array handles support allocatable and pointer arguments, results, module
1180 variables, derived fields, optional arguments, and matching ordinary-array
1281 parameters. Numeric and character arrays accept supported forward and
0 commit comments