Skip to content
New issue

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

Bring behavior of nc-config in line with pkgconfig --libs --static netcdf #1383

Merged
merged 2 commits into from
Apr 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Updating template files for nc-config in support of #1360. Still have…
… a linebreak to deal with to bring this into line with the behavior of pkgconfig, currently nc-config --libs --static will print two separate lines.
WardF committed Apr 8, 2019
commit 3ec310829aee2c7619e622786ab06460ff3699e0
7 changes: 7 additions & 0 deletions nc-config.cmake.in
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ includedir="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@"
cc="@CMAKE_C_COMPILER@"
cflags="-I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@"
libs="-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ @NC_LIBS@"
libsprivate="@LIBS@"

has_dap2="@ENABLE_DAP2@"
if [ -z $has_dap2 -o "$has_dap2" = "OFF" ]; then
@@ -163,6 +164,7 @@ Available values for OPTION include:
--has-parallel4 whether has parallel IO support via HDF5
--has-parallel whether has parallel IO support via HDF5 or PnetCDF
--libs library linking information for netcdf
--static library linking information for statically-compiled netcdf
--prefix Install prefix
--includedir Include directory
--libdir Library directory
@@ -202,6 +204,7 @@ all()
echo " --cc -> $cc"
echo " --cflags -> $cflags"
echo " --libs -> $libs"
echo " --static -> $libsprivate"
echo
echo " --has-c++ -> $has_cxx"
echo " --cxx -> $cxx"
@@ -336,6 +339,10 @@ while test $# -gt 0; do
echo $libs
;;

--static)
echo $libs $libsprivate
;;

--prefix)
echo "${prefix}"
;;
7 changes: 7 additions & 0 deletions nc-config.in
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ includedir=@includedir@
cc="@CC@"
cflags="-I${includedir} @CPPFLAGS@"
libs="-L${libdir} @NC_LIBS@"
libsprivate="@LIBS@"


has_dap="@HAS_DAP@"
has_dap4="@HAS_DAP4@"
@@ -90,6 +92,7 @@ Available values for OPTION include:
--has-parallel4 whether has parallel IO support via HDF5
--has-parallel whether has parallel IO support via HDF5 or PnetCDF
--libs library linking information for netcdf
--static library linking information for statically-compiled netcdf
--prefix Install prefix
--includedir Include directory
--libdir Library directory
@@ -129,6 +132,7 @@ all()
echo " --cc -> $cc"
echo " --cflags -> $cflags"
echo " --libs -> $libs"
echo " --static -> $libsprivate"
echo
echo " --has-c++ -> $has_cxx"
echo " --cxx -> $cxx"
@@ -262,6 +266,9 @@ while test $# -gt 0; do
--libs)
echo $libs
;;
--static)
echo $libs $libsprivate
;;

--prefix)
echo "${prefix}"