InterviewSolution
| 1. |
Why Does Cmake Use Full Paths, Or Can I Copy My Build Tree? |
|
Answer» CMake uses full paths because: configured HEADER files may have full paths in them, and moving those files without re-configuring WOULD cause upredictable behavior. because cmake supports out of source builds, if custom commands used RELATIVE paths to the source tree, they would not work when they are run in the build tree because the current DIRECTORY would be incorrect.on Unix systems rpaths might be built into executables so they can find shared libraries at run time. If the build tree is moved old executables may use the old shared libraries, and not the new ones. CMake uses full paths because: configured header files may have full paths in them, and moving those files without re-configuring would cause upredictable behavior. because cmake supports out of source builds, if custom commands used relative paths to the source tree, they would not work when they are run in the build tree because the current directory would be incorrect.on Unix systems rpaths might be built into executables so they can find shared libraries at run time. If the build tree is moved old executables may use the old shared libraries, and not the new ones. |
|