From 05cbb8444b13827d316b9190f87c2c349e1148a0 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Wed, 27 Jul 2016 14:10:05 -0600 Subject: [PATCH] Propegated previous change into cmake-based builds. --- nc-config.cmake.in | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/nc-config.cmake.in b/nc-config.cmake.in index 2ef070641..09aeb8ed0 100755 --- a/nc-config.cmake.in +++ b/nc-config.cmake.in @@ -22,6 +22,7 @@ fi has_nc2="@BUILD_V2@" + if [ -z $has_nc2 -o "$has_nc2" = "OFF" ]; then has_nc2="no" else @@ -73,9 +74,16 @@ fi version="@PACKAGE@ @VERSION@" + +has_fortran="no" has_f90="no" has_f03="no" -if type -p nf-config > /dev/null 2>&1; then + +nfconf=$(which nf-config) + +if [ -f "$nfconf" ]; then + echo "Using nf-config: $nfconf" + has_fortran="yes" fc=`nf-config --fc` fflags=`nf-config --fflags` flibs=`nf-config --flibs` @@ -133,7 +141,7 @@ elif type -p ncxx-config > /dev/null 2>&1; then EOF fi -if type -p nf-config > /dev/null 2>&1; then +if [ -f "$nfconf" ]; then cat < $has_cxx" echo " --cxx -> $cxx" + +# echo " --cxxflags -> $cxxflags" +# echo " --cxxlibs -> $cxxlibs" echo " --has-c++4 -> $has_cxx4" echo " --cxx4 -> $cxx4" echo + +if [ -f "$nfconf" ]; then echo " --fc -> $fc" echo " --fflags -> $fflags" echo " --flibs -> $flibs" echo " --has-f90 -> $has_f90" echo " --has-f03 -> $has_f03" echo +fi echo " --has-dap -> $has_dap" echo " --has-nc2 -> $has_nc2" echo " --has-nc4 -> $has_nc4"