cms icon indicating copy to clipboard operation
cms copied to clipboard

Installation of testlib.h

Open gollux opened this issue 6 months ago • 2 comments

Do we really want to install polygon.h with CMS? It seems to be very specific to a single task preparation system. Installation of this header should be managed by Polygon, not by CMS.

In particular, do we want polygon.h to be accessible to solutions?

gollux avatar Jun 07 '25 20:06 gollux

IMO the answer to both questions is "no", but I also never used that task format.

veluca93 avatar Jun 07 '25 22:06 veluca93

(it's called testlib.h, not polygon.h.)

this file is only necessary when compiling checkers or managers (though it seems the polygon importer only supports batch tasks anyways, so only checkers in this case).

its path doesn't seem to actually matter:

https://github.com/cms-dev/cms/blob/05a3b8d0a131c844e6557bc6a2dd56a735afc067/cmscontrib/loaders/polygon.py#L186-L191

what does matter is that testlib.h exists as a real file somewhere so its path can be passed to g++. if we keep testlib.h as just a data file within the cms package, this is not guaranteed (see the documentation of importlib.resources). so we might need to copy it to a temporary directory (or declare such weird installs unsupported). (edit: i should have read that documentation better, importlib.resources.path already handles creating a temporary directory when needed. how convenient!)

but it probably does not need to be in /usr/local/include.

prandla avatar Jun 07 '25 22:06 prandla