ngraph-tf
ngraph-tf copied to clipboard
Build ngraph-tf not only on Centos
When ngraph-tf is being built on a 64-bits OS another than Centos, the directory with libraries ('build/artifacts/lib64') could not be found since CMakeLists.txt and *.cmake files make a reference to 'lib64' if and only if the host OS is Centos:
if(OS_VERSION STREQUAL ""centos"")
But if the host OS is not Centos (SUSE for example), the condition is always false and the 'lib' directory instead of 'lib64' will be looked for. To fix the situation the condition is changed to something similar to:
if(EXISTS ${NGRAPH_INSTALL_DIR}/lib64)
In order to create the right one of the 'build/install/lib64' or 'build/install/lib' directories, the 'GNUInstallDirs' CMake module is used on the Linux platform (the idea is stolen from NGraph). The 'NGTF_INSTALL_LIB_DIR' option is set to '${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}':
set(NGTF_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
Signed-off-by: Pavel Samolysov [email protected]
@avijit-nervana I've updates the comment. Could you please merge the PR if there is no concerns more? I'm working on OpenSUSE and making manual changing after each git pull
makes me unhappy :-(
@avijit-nervana What can we do to merge the PR? Do I have to sign any contribution agreement or something like this?
Same problem on Manjaro. Creating a link from lib64 to lib works, but i would really appreciate not to have to do this.