From 894ca64bf2bc6b86e61e4c481c9f4efb96ab4f89 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 12 Dec 2019 11:08:31 +0000 Subject: [PATCH] Testing: provide variable to detect if running tests on M$oft Windows --- CMakeLists.txt | 3 ++- tests/include.ctest.sh.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0aacaa17..df074b0c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -292,10 +292,11 @@ if( IEEE_LE ) set( IEEE_BE 0 ) endif() +set( ECCODES_ON_WINDOWS 0 ) if( EC_OS_NAME MATCHES "windows" ) # Symbols need to be explicitly exported on Windows so we can link to dlls. set( CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE ) - set( ECCODES_ON_WINDOWS TRUE ) + set( ECCODES_ON_WINDOWS 1 ) # Suppress compliler warnings - see ECC-850 # Suppress warnings about using 'insecure' functions. Fixing this would require changes all over diff --git a/tests/include.ctest.sh.in b/tests/include.ctest.sh.in index 81ef455c8..148c92e39 100644 --- a/tests/include.ctest.sh.in +++ b/tests/include.ctest.sh.in @@ -40,5 +40,6 @@ HAVE_PNG=@HAVE_PNG@ HAVE_AEC=@HAVE_AEC@ HAVE_EXTRA_TESTS=@HAVE_EXTRA_TESTS@ HAVE_MEMFS=@HAVE_MEMFS@ +ECCODES_ON_WINDOWS=@ECCODES_ON_WINDOWS@ echo "Current directory: `pwd`"