This changes the copy command for libomp.so to use the output of the target as
the source of the copy, rather than trying to find it based on
${LIBOMP_LIBRARY_DIR}, which appears to be incorrect in multi-config generator
builds.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
I'm a little uncomfortable with this line copying things from the build directory to the source directory; I believe the source directory should be able to be immutable and builds should still work. Part of the principle of having out-of-tree builds is that the source tree should remain unmodified.
Regardless, I haven't changed the behaviour here as I don't know why the library gets copied to the source directory. Perhaps someone could clarify that? Until then I am just replicating the existing behaviour but with it also working for multi-config generators.
What would be needed to remove this strange copying step? Do the tests really rely on these directories?
I could run the tests successfully with cmake -DLIBOMP_COPY_EXPORTS=FALSE.
I think this export directory structure is a remainder from the original configure based Intel/OpenMP runtime.
@jlpeyton @AndreyChurbanov is this step still needed?
If Intel relies on this export directory, can we disable by default and you enable it for internal purpose?
I think this is historical artifact that can be removed nowadays.
Maybe, to be on the safe side, we can set LIBOMP_COPY_EXPORTS to false by default, as you suggested.
Then later we can remove the copying functionality at all.