CMake build: Add lib/CMAKE_LIBRARY_ARCHITECTURE to PATH_SUFFIXES to restore multiarch detection.#2350
Open
MHBalsmeier wants to merge 1 commit into
Open
CMake build: Add lib/CMAKE_LIBRARY_ARCHITECTURE to PATH_SUFFIXES to restore multiarch detection.#2350MHBalsmeier wants to merge 1 commit into
MHBalsmeier wants to merge 1 commit into
Conversation
…estore multiarch detection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CMake: Add lib/${CMAKE_LIBRARY_ARCHITECTURE}/ to PATH_SUFFIXES to restore multiarch detection.
TYPE: bug fix
KEYWORDS: CMake, Ubuntu, architecture, build, Netcdf
SOURCE: Max H. Balsmeier
DESCRIPTION OF CHANGES:
Problem:
PR #2161 switched netCDF-Fortran library detection to use nf-config --prefix plus lib/ and lib64/ suffixes. On Debian/Ubuntu multiarch systems libnetcdff.so lives in /lib// (e.g. /usr/lib/x86_64-linux-gnu/), so find_library fails with Could NOT find netCDF-Fortran (missing: netCDF-Fortran_LIBRARY) even though netCDF-Fortran is correctly installed.
Solution:
Add lib/${CMAKE_LIBRARY_ARCHITECTURE}/ to PATH_SUFFIXES.
LIST OF MODIFIED FILES: cmake/modules/FindnetCDF-Fortran.cmake
TESTS CONDUCTED:
RELEASE NOTE: Restored multiarch detection of Netcdf library in CMake builds.