-
Notifications
You must be signed in to change notification settings - Fork 74k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exporting tensorflow package for cmake #14554
Conversation
Can one of the admins verify this patch? |
install(TARGETS tensorflow | ||
target_include_directories(tensorflow PUBLIC | ||
$<INSTALL_INTERFACE:include/> | ||
$<INSTALL_INTERFACE:include/external/nsync/public>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the nsync headers missing a corresponding install(...)
statement somewhere below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The headers are needed within core/platform/default/mutex.h, which will be installed.
The nsync headers are installed, but the tensorflow-target needs the ${install_prefix}/include/external/nsync/public as a target include directories.
We can change the path in the mutex.h file or adding the installed folder to the target within install_interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, leaving it as is sounds good (I'm not particularly clear on how CMake installation works wrt. external packages). If it works for you, SGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be the only target dependent installation property. Maybe the exported libraries will also need some target compile definitions. But these can easily be added
* Exporting Targets * reverting changes within tf_core_framework.cmake
This PR is based on the PR #13867.
It provides the usage of cmake
find_package()
. Therefore it should be easier to intergrate the prebuilt tensorflow code into existing external projects.