[CMake] find_library disobeying NO_DEFAULT_PATH?
Andrew Brownsword
andrew.e.brownsword at gmail.com
Sun Apr 22 16:20:09 EDT 2018
I solved this problem by discovering that found libraries are one of the things cached between runs of cmake. Deleting CMakeCache.txt solves the problem. Hopefully this serves as a warning to people having the same issue.
> On Apr 21, 2018, at 7:53 PM, Andrew Brownsword <andrew.e.brownsword at gmail.com> wrote:
>
> I’m using this command:
>
> find_library(LIBPQXX_LIBRARY
> NAMES libpqxx.a libpqxx
> PATHS ${LIBPQXX_DEPS_DIR}/src/src
> PATH_SUFFIXES .libs
> NO_DEFAULT_PATH)
> message(STATUS "libpqxx @ " ${LIBPQXX_LIBRARY})
>
> This prints a path to where an older version is installed in /usr/local/lib/. My understanding is that NO_DEFAULT_PATH should limit the search to the supplied PATHS. What am I doing wrong?
>
More information about the CMake
mailing list