[Openmp-commits] [PATCH] D24959: [cmake] Fix for a bug https://llvm.org/bugs/show_bug.cgi?id=30489 "Cannot build with -DLIBOMP_FORTRAN_MODULES=True"

Chris Bieneman via Openmp-commits openmp-commits at lists.llvm.org
Tue Sep 27 10:16:55 PDT 2016

beanz added a comment.

Creating the directory during configuration time is not good. If someone deletes it from their build directory it will not be re-created until cmake is re-run. A better solution would be to create a separate add_custom_command that creates the directory, and a target that wraps that command. Then have the targets which have these POST_BUILD actions depend on the target that creates the directory.

Also worth noting, you do need to wrap the add_custom_command that creates the directory in a target because custom commands can race if multiple targets reference their outputs as dependencies.



More information about the Openmp-commits mailing list