[CMake] Finding all the libraries except for one located in the last path dir

Salazar De Troya, Miguel salazardetro1 at llnl.gov
Tue Apr 5 15:55:59 EDT 2016


Hello

I am calling find_library in a loop, using the same variable for HINTS. This variable (lib_dirs) is set using a script, and when I simply print it using message(), I obtain this output:

message(${lib_dirs})


/usr/lib/lib/usr/lib64/usr/local/tools/vtk-6.1.0/lib/g/g92/miguel/petsc-3.6.2/miguel-opt/lib/usr/local/tools/openmpi-intel-1.8.4/lib/usr/local/tools/ic-14.0.174/composer_xe_2013_sp1.3.174/compiler/lib/intel64/usr/lib/gcc/x86_64-redhat-linux/4.4.7/g/g92/miguel/code/libmesh_2D/lib


The variable lib_dirs is the output variable of a script that I call using execute_process(). The actual script output (in the terminal) is


/usr/lib;/lib;/usr/lib64;/usr/local/tools/vtk-6.1.0/lib;/g/g92/miguel/petsc-3.6.2/miguel-opt/lib;/usr/local/tools/openmpi-intel-1.8.4/lib;/usr/local/tools/ic-14.0.174/composer_xe_2013_sp1.3.174/compiler/lib/intel64;/usr/lib/gcc/x86_64-redhat-linux/4.4.7;/g/g92/miguel/code/libmesh_2D/lib;


but cmakes removes all the semicolons and puts them all together, why?


Now when I call find_library() for several libraries, I can find them all except the one located in /g/g92/miguel/code/libmesh_2D/lib, why?


Thanks

Miguel



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160405/c4295070/attachment.html>


More information about the CMake mailing list