We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake build finds the Fortran NetCDF library when the NetCDF C and Fortran installation are in different directories.
The line
find_library (NETCDF_LIBRARIES_${lang} NAMES ${libs} HINTS "${NetCDF_lib_dirs}" NO_DEFAULT_PATH)
is only searching the path where the C library is installed, but the Fortran NetCDF library is installed is a separate directory.
Choose one of the following or maybe something else
FindNetCDF.cmake
NO_DEFAULT_PATH
CMakeLists.txt
nf-config --flibs
module purge export LMOD_TMOD_FIND_FIRST=yes module use /glade/work/jedipara/cheyenne/spack-stack/modulefiles/misc module load miniconda/3.9.12 module load ecflow/5.8.4 module load mysql/8.0.31 module use /glade/work/epicufsrt/contrib/spack-stack/spack-stack-1.4.0/envs/unified-env-v2/install/modulefiles/Core module load stack-gcc/10.1.0 module load stack-openmpi/4.1.1 module load stack-python/3.9.12 module load jedi-base-env
mkdir build; cd build; cmake ..
main
The text was updated successfully, but these errors were encountered:
Semi related to issue #683
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
CMake build finds the Fortran NetCDF library when the NetCDF C and Fortran installation are in different directories.
Current Behavior
The line
is only searching the path where the C library is installed, but the Fortran NetCDF library is installed is a separate directory.
Possible Solution
Choose one of the following or maybe something else
FindNetCDF.cmake
so it can find the Fortran NetCDF installation.NO_DEFAULT_PATH
workedCMakeLists.txt
or theFindNetCDF.cmake
file extract and use the path fromnf-config --flibs
, it will have the Fortran installation.Steps to Reproduce (for bugs)
mkdir build; cd build; cmake ..
Your Environment
main
branchThe text was updated successfully, but these errors were encountered: