[CMake] find_path and double symbolic link
Kris Thielemans
kris.f.thielemans at gmail.com
Sat Sep 14 17:31:20 EDT 2019
Hi all
I have a weird situation where find_file finds a file (which is a link to a
link), but find_path sets an empty variable.
find_path(CBLAS_INCLUDE_DIR cblas.h
PATHS /usr/include /usr/local/include )
message(STATUS "KT CBLAS_INCLUDE_DIR ${CBLAS_INCLUDE_DIR}")
find_file(CBLAS_INCLUDE cblas.h
PATHS /usr/include /usr/local/include )
message(STATUS "KT CBLAS_INCLUDE ${CBLAS_INCLUDE}")
Running CMake gives
-- KT CBLAS_INCLUDE_DIR
-- KT CBLAS_INCLUDE /usr/include/x86_64-linux-gnu/cblas.h
Checking the file I see
$ ls -l /usr/include/x86_64-linux-gnu/cblas.h
lrwxrwxrwx 1 root root 42 Mar 14 2019 /usr/include/x86_64-linux-gnu/cblas.h
-> /etc/alternatives/cblas.h-x86_64-linux-gnu
build$ ls -l /etc/alternatives/cblas.h-x86_64-linux-gnu
lrwxrwxrwx 1 root root 46 Mar 14 2019
/etc/alternatives/cblas.h-x86_64-linux-gnu ->
/usr/include/x86_64-linux-gnu/cblas-openblas.h
$ ls -l /usr/include/x86_64-linux-gnu/cblas-openblas.h
-rw-r--r-- 1 root root 45648 Sep 19 2017
/usr/include/x86_64-linux-gnu/cblas-openblas.h
Any ideas ? Is this expected?
I'm running CMake 3.13.1 on Ubuntu 18.04.
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190914/3b1e7656/attachment.html>
More information about the CMake
mailing list