mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Had to modify test_common.in so that it doesn't append the build type on Visual Studio. Otherwise it looks in the wrong location. Change the location of the utilities so that they are where test_common.sh expects to find them results in the breakage of most of the other shell scripts.
This commit is contained in:
parent
16e050e157
commit
8c48ac9828
@ -65,41 +65,49 @@ IF(ENABLE_TESTS)
|
||||
TARGET_LINK_LIBRARIES(bom netcdf)
|
||||
TARGET_LINK_LIBRARIES(tst_dimsizes netcdf)
|
||||
|
||||
IF(USE_NETCDF4)
|
||||
ADD_EXECUTABLE(tst_fileinfo tst_fileinfo.c)
|
||||
TARGET_LINK_LIBRARIES(tst_fileinfo netcdf)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
IF(USE_NETCDF4)
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
ADD_EXECUTABLE(tst_fileinfo tst_fileinfo.c)
|
||||
TARGET_LINK_LIBRARIES(tst_fileinfo netcdf)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
IF(USE_NETCDF4)
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
ENDIF(USE_NETCDF4)
|
||||
ENDIF()
|
||||
|
||||
# Base tests
|
||||
@ -128,7 +136,7 @@ ENDIF()
|
||||
add_sh_test(ncdump tst_formatx3)
|
||||
add_sh_test(ncdump tst_bom)
|
||||
add_sh_test(ncdump tst_dimsizes)
|
||||
|
||||
|
||||
# The following test script invokes
|
||||
# gcc directly.
|
||||
IF(CMAKE_COMPILER_IS_GNUCC OR APPLE)
|
||||
|
@ -24,9 +24,9 @@ TOPBUILDDIR=@TOPBUILDDIR@
|
||||
# and the notion of a VS configuration type like Debug or Release.
|
||||
# When using VS, executables are placed in a subdirectory of the build
|
||||
# directory. That subdirectory is named by the configuration type.
|
||||
# Thus one finds ncdump.exe in $top_builddir/ncdump/Debug instead of
|
||||
# Thus one finds ncdump.exe in $top_builddir/ncdump/Debug instead of
|
||||
# $top_builddir/ncdump.
|
||||
#
|
||||
#
|
||||
# An additional issue is the extension of an executable: .exe vs nothing.
|
||||
# This code attempts to figure out which is used.
|
||||
|
||||
@ -40,7 +40,7 @@ TOPBUILDDIR=@TOPBUILDDIR@
|
||||
# stuff (.nc, .cdl, etc) is stored.
|
||||
# 5. execdir - absolute path of the directory into which executables are
|
||||
# placed. For all but the VS case, execdir == builddir.
|
||||
#
|
||||
#
|
||||
# The following are defined to support inter-directory references.
|
||||
# 6. NCDUMP - absolute path to the ncdump.exe executable
|
||||
# 7. NCCOPY - absolute path to the nccopy.exe executable
|
||||
@ -50,7 +50,7 @@ TOPBUILDDIR=@TOPBUILDDIR@
|
||||
# Allow global set -x mechanism
|
||||
if test "x$SETX" = x1 ; then set -x ; fi
|
||||
|
||||
# We assume that TOPSRCDIR and TOPBUILDDIR are defined
|
||||
# We assume that TOPSRCDIR and TOPBUILDDIR are defined
|
||||
# At the top of this shell script
|
||||
top_srcdir="$TOPSRCDIR"
|
||||
top_builddir="$TOPBUILDDIR"
|
||||
@ -75,12 +75,12 @@ fi
|
||||
# Compute execdir as well as a suffix to use for accessing
|
||||
# executables. Note that the leading '/' is needed to avoid
|
||||
# occurrences of ...//... in a path
|
||||
if test "x$CMAKE_CONFIG_TYPE" != x ; then
|
||||
#if test "x$CMAKE_CONFIG_TYPE" != x ; then
|
||||
# Assume case #4: visual studio
|
||||
VS="/${CMAKE_CONFIG_TYPE}"
|
||||
else
|
||||
# VS="/${CMAKE_CONFIG_TYPE}"
|
||||
#else
|
||||
VS=
|
||||
fi
|
||||
#fi
|
||||
execdir="${builddir}$VS"
|
||||
|
||||
# pick off the last component as the relative name of this directory
|
||||
@ -118,7 +118,7 @@ else
|
||||
ext=""
|
||||
fi
|
||||
|
||||
# We need to locate certain executables (and other things)
|
||||
# We need to locate certain executables (and other things)
|
||||
# Find the relevant directory
|
||||
NCDUMP="${top_builddir}/ncdump${VS}/ncdump${ext}"
|
||||
NCCOPY="${top_builddir}/ncdump${VS}/nccopy${ext}"
|
||||
|
Loading…
Reference in New Issue
Block a user