[CMake] Robust check/prevention of in source builds
Matthew Woehlke
matthew.woehlke at kitware.com
Fri Aug 2 17:32:32 EDT 2013
On 2013-08-02 17:12, Zaak Beekman wrote:
> I am wondering what the best way to detect and prevent in source builds is.
> Some potential pitfalls are relative paths vs absolute paths, and symbolic
> links (build_dir -> source_dir). If anyone has any suggestions, I'd love to
> hear them. Obviously string comparisons handle neither of these nefarious
> cases.
...get_filename_component(REALPATH) will help with both of those.
--
Matthew
More information about the CMake
mailing list