The IS_MSVC variable is only set from CMake, and only if
the platform is MSVC. If it is not set, the Unix slash will
be used.
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1037
64e312b2-a51f-0410-8e61-
82d0ca0eb02a
# slashes because the shell scripts will consume srcdir.
string(REPLACE "/" "\\\\" srcdir "${srcdir}")
set(EXEEXT ".exe")
+ set(IS_MSVC "1")
endif(WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_vars.in
export EXEEXT
HAVE_FORK=@HAVE_FORK@
export HAVE_FORK
+
# path of the tests directory
-SRCDIR=@srcdir@
+if [ x"@srcdir@" != x"." ]; then
+ if [ -z "@IS_MSVC@" ]; then
+ SRCDIR="@srcdir@/"
+ else
+ SRCDIR="@srcdir@\\"
+ fi
+else
+ SRCDIR=""
+fi
+
export SRCDIR