Closed sztomi closed 4 years ago
This is great - thank you very much for your contribution!
At some point I may add an override so this specific project can be built as a static lib even if other projects are built with shared libs, similar to the solution here:
https://stackoverflow.com/questions/53499678/cmake-build-shared-libs-for-single-libraries
This is definitely an improvement though in the meantime. Thanks again!
Thanks!
This PR contains various changes to the CMake build that make it a bit more flexible.
BUILD_SHARED_LIBS
option that allows consumers to select a shared or static library.There was an incomplete link flag passed which caused the shared build to fail. The relevant section in the flags:
-Wl,--version-script -shared -Wl,-soname,libOpenCLRuntimeLoader.so
--version-script
requires an argument, so the next linker option,-soname
was treated as one, leading to this error:I'm not sure what the intention was with this flag, maybe it was a copy-paste error? In any case, this allows building the library in both a shared and static configuration.