onnxruntime: do not use custom flags and run cmake install
Reasons not to use the custom flags:
-
Release
is passed in the build step and then the flags are overwritten - The flags were added when GCC 13 came out but now it builds fine without those for GCC 13
-
RelWithDebInfo
is supported but in the docs they say that some optimizations may be missed in this mode (probably because they build with-O3
withRelease
and-O2
withRelWithDebInfo
On the modification of the installation commands, the issue here is that the cmake files are not being installed and onnxruntime
can not be trivially found from CMake. Instead of copying files manually and having to maintain the commands we can just use what is specified from onnxruntime
, as it is done in Spack.
- In my tests building on Alma9 the library and the cmake files are installed to
lib64
instead oflib
as it is done now. The python files stay inlib
. - The
include
folder changes: currently it looks likeinclude/core/<several-folders>
and with this change it looks likeinclude/onnxruntime/...
where only a subset of the folders are installed.
Edited by Juan Miguel Carceller