File tree Expand file tree Collapse file tree 5 files changed +21
-6
lines changed
Expand file tree Collapse file tree 5 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -1886,6 +1886,13 @@ FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h
18861886SET (EXTRA_DIST ${EXTRA_DIST} ${CMAKE_SOURCE_DIR} /test_common.in)
18871887SET (TOPSRCDIR "${CMAKE_SOURCE_DIR} " )
18881888SET (TOPBUILDDIR "${CMAKE_BINARY_DIR} " )
1889+ IF (MSVC )
1890+ # Seems this is always upper-case by this point :-(
1891+ SET (VS_CONFIGURATION "/${CMAKE_BUILD_TYPE} " )
1892+ ELSE ()
1893+ SET (VS_CONFIGURATION "" )
1894+ ENDIF ()
1895+
18891896configure_file (${CMAKE_SOURCE_DIR} /test_common.in ${CMAKE_BINARY_DIR} /test_common.sh @ONLY NEWLINE_STYLE LF )
18901897
18911898#####
Original file line number Diff line number Diff line change @@ -1346,6 +1346,7 @@ AC_SUBST(HAS_MMAP,[$enable_mmap])
13461346AC_SUBST ( HAS_JNA ,[ $enable_jna] )
13471347AC_SUBST ( RELAX_COORD_BOUND ,[ $enable_relax_coord_bound] )
13481348AC_SUBST ( HAS_ERANGE_FILL ,[ $enable_erange_fill] )
1349+ AC_SUBST ( VS_CONFIGURATION ,[ ] )
13491350
13501351# Include some specifics for netcdf on windows.
13511352# AH_VERBATIM([_WIN32_STRICMP],
Original file line number Diff line number Diff line change 22# This shell script runs the cmp test on the example programs.
33# $Id: do_comps.sh,v 1.1 2006/06/27 17:44:54 ed Exp $
44
5+ . ../../test_common.sh
6+
57set -e
68
79# #
@@ -11,13 +13,13 @@ set -e
1113echo " "
1214echo " *** Creating example data files from CDL scripts."
1315echo " *** creating simple_xy.nc..."
14- ../../ncgen/ncgen -b -o simple_xy.nc $srcdir /simple_xy.cdl
16+ ../../ncgen${VS} /ncgen -b -o simple_xy.nc $srcdir /simple_xy.cdl
1517
1618echo " *** checking sfc_pres_temp.nc..."
17- ../../ncgen/ncgen -b -o sfc_pres_temp.nc $srcdir /sfc_pres_temp.cdl
19+ ../../ncgen${VS} /ncgen -b -o sfc_pres_temp.nc $srcdir /sfc_pres_temp.cdl
1820
1921echo " *** checking pres_temp_4D.nc..."
20- ../../ncgen/ncgen -b -o pres_temp_4D.nc $srcdir /pres_temp_4D.cdl
22+ ../../ncgen${VS} /ncgen -b -o pres_temp_4D.nc $srcdir /pres_temp_4D.cdl
2123
2224echo " *** All example creations worked!"
2325
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ ${NCDUMP} tst_nans.nc | sed 's/e+0/e+/g' > tst_nans.cdl ; ERR
7474diff -b tst_nans.cdl $srcdir /ref_tst_nans.cdl ; ERR
7575
7676# Do unicode test only if it exists => BUILD_UTF8 is true
77- if test -f ./tst_unicode -o -f ./tst_unicode.exe ; then
77+ if test -f ./tst_unicode -o -f ./tst_unicode.exe -o -f ${execdir} /tst_unicode.exe ; then
7878 echo " *** dumping tst_unicode.nc to tst_unicode.cdl..."
7979 ${execdir} /tst_unicode ; ERR
8080${NCDUMP} tst_unicode.nc | sed ' s/e+0/e+/g' > tst_unicode.cdl ; ERR
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ if test "x$SETX" = x1 ; then set -x ; fi
5959top_srcdir="$TOPSRCDIR"
6060top_builddir="$TOPBUILDDIR"
6161
62- # Currently not used, but left as a Visual Studio placeholder.
63- # VS=Debug
62+ # Only set via CMake builds, where it must contain a leading '/'
63+ export VS=@VS_CONFIGURATION@
6464
6565# srcdir may or may not be defined, but if not, then create it
6666if test "x$srcdir" = x ; then
@@ -77,6 +77,11 @@ builddir=`pwd`
7777# execdir is an alias for builddir
7878execdir="${builddir}"
7979
80+ # VS build dir support
81+ if test -d "${execdir}${VS}"; then
82+ execdir="${execdir}${VS}"
83+ fi
84+
8085# pick off the last component as the relative name of this directory
8186thisdir=`basename $srcdir`
8287
You can’t perform that action at this time.
0 commit comments