On 01/19/2011 06:00 AM, Jack Poulson wrote: > I've thoroughly read through the CMake documentation for the 2.8 release and > for the life of me I can't seem to get a simple case working for > find_library using PATH_SUFFIXES. > > For instance, I am trying to find the library libiomp5.a located at > /opt/intel/Compiler/11.1/072/lib/intel64/libiomp5.a. Though the following > command works (in CMake 2.8.2): > > find_library(IOMP5_LIB iomp5 PATH /opt/intel/Compiler/11.1/072/lib/intel64) > > the following does _not_ work, > > set(INTEL_ARCH_SUBDIRS lib/em64t lib/intel64) > find_library(IOMP5_LIB iomp5 PATH /opt/intel/Compiler/11.1/072/lib/intel64 > PATH_SUFFIXES ${INTEL_ARCH_SUBDIRS})
find_library(IOMP5_LIB iomp5 PATHS /opt/intel/... ^^^^^ > and neither does > > set(INTEL_ARCH_SUBDIRS lib/em64t lib/intel64) > find_library(IOMP5_LIB iomp5 PATH /opt/intel/Compiler/11.1/072 PATH_SUFFIXES > ${INTEL_ARCH_SUBDIRS}) find_library(IOMP5_LIB iomp5 PATHS /opt/intel/... ^^^^^ > Am I missing something about how PATH_SUFFIXES should be used, or is it > broken? Any feedback is greatly appreciated. The correct option to specify hard-coded search paths for the find functions is "PATHS". Apparently, FIND_LIBRARY() is tangled if you say "PATH" instead, so the following PATH_SUFFIXES doesn't work as expected. Regards, Michael _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake