summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt23
-rw-r--r--Modules/Compiler/GNU-C.cmake13
-rw-r--r--Modules/FindCUDA.cmake7
-rw-r--r--Source/CMakeLists.txt2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/kwsys/FStream.hxx.in10
-rw-r--r--Source/kwsys/ProcessWin32.c12
-rw-r--r--Source/kwsys/SystemInformation.cxx6
-rw-r--r--Source/kwsys/SystemTools.cxx6
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt3
-rw-r--r--Tests/CompileFeatures/feature_test.c10
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt2
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/main.cpp4
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp4
-rw-r--r--Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-cp-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-cp-stderr.txt4
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-cp-stdout.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-ftp-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-ftp-stderr.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-ftp-stdout.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-http-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-http-stderr.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-http-stdout.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-https-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-https-stderr.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-https-stdout.txt3
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-scp-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-scp-stderr.txt2
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-scp-stdout.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-result.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stderr.txt2
-rw-r--r--Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stdout.txt1
-rw-r--r--Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake8
-rw-r--r--Utilities/cmThirdParty.h.in1
-rw-r--r--Utilities/cm_jsoncpp_reader.h7
-rw-r--r--Utilities/cm_jsoncpp_value.h7
-rw-r--r--Utilities/cm_jsoncpp_writer.h7
38 files changed, 150 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d3c424b..bdc160d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
# Allow the user to enable/disable all system utility library options by
# defining CMAKE_USE_SYSTEM_LIBRARIES or CMAKE_USE_SYSTEM_LIBRARY_${util}.
- set(UTILITIES BZIP2 CURL EXPAT FORM LIBARCHIVE LIBLZMA ZLIB)
+ set(UTILITIES BZIP2 CURL EXPAT FORM JSONCPP LIBARCHIVE LIBLZMA ZLIB)
foreach(util ${UTILITIES})
if(NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util}
AND DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
@@ -104,6 +104,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_LIBLZMA "Use system-installed liblzma"
"${CMAKE_USE_SYSTEM_LIBRARY_LIBLZMA}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
option(CMAKE_USE_SYSTEM_FORM "Use system-installed libform" "${CMAKE_USE_SYSTEM_LIBRARY_FORM}")
+ option(CMAKE_USE_SYSTEM_JSONCPP "Use system-installed jsoncpp" "${CMAKE_USE_SYSTEM_LIBRARY_JSONCPP}")
# Mention to the user what system libraries are being used.
foreach(util ${UTILITIES})
@@ -373,8 +374,24 @@ macro (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Build jsoncpp library.
- add_subdirectory(Utilities/cmjsoncpp)
- CMAKE_SET_TARGET_FOLDER(cmjsoncpp "Utilities/3rdParty")
+ if(CMAKE_USE_SYSTEM_JSONCPP)
+ if(EXISTS ${CMAKE_ROOT}/Modules/FindJsonCpp.cmake)
+ find_package(JsonCpp)
+ elseif(NOT CMAKE_VERSION VERSION_LESS 3.0)
+ include(${CMake_SOURCE_DIR}/Modules/FindJsonCpp.cmake)
+ else()
+ message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0")
+ endif()
+ if(NOT JsonCpp_FOUND)
+ message(FATAL_ERROR
+ "CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!")
+ endif()
+ set(CMAKE_JSONCPP_LIBRARIES JsonCpp::JsonCpp)
+ else()
+ set(CMAKE_JSONCPP_LIBRARIES cmjsoncpp)
+ add_subdirectory(Utilities/cmjsoncpp)
+ CMAKE_SET_TARGET_FOLDER(cmjsoncpp "Utilities/3rdParty")
+ endif()
#---------------------------------------------------------------------
# Build XMLRPC library for CMake and CTest.
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index 3036057..fa97a94 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -1,10 +1,15 @@
include(Compiler/GNU)
__compiler_gnu(C)
-if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
+if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
+elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
+ set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89")
+ set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89")
+endif()
+if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
endif()
@@ -12,7 +17,7 @@ endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
-elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
+elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c1x")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu1x")
endif()
@@ -29,8 +34,10 @@ macro(cmake_record_c_compile_features)
endmacro()
set(_result 0)
- if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
+ if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
_get_gcc_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES)
+ endif()
+ if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
if (_result EQUAL 0)
_get_gcc_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES)
endif()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 4f1f09a..cae9214 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -276,6 +276,8 @@
# Only available for CUDA version 4.0+.
# CUDA_curand_LIBRARY -- CUDA Random Number Generation library.
# Only available for CUDA version 3.2+.
+# CUDA_cusolver_LIBRARY -- CUDA Direct Solver library.
+# Only available for CUDA version 7.0+.
# CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library.
# Only available for CUDA version 3.2+.
# CUDA_npp_LIBRARY -- NVIDIA Performance Primitives lib.
@@ -518,6 +520,7 @@ macro(cuda_unset_include_and_libraries)
unset(CUDA_cufft_LIBRARY CACHE)
unset(CUDA_cufftemu_LIBRARY CACHE)
unset(CUDA_curand_LIBRARY CACHE)
+ unset(CUDA_cusolver_LIBRARY CACHE)
unset(CUDA_cusparse_LIBRARY CACHE)
unset(CUDA_npp_LIBRARY CACHE)
unset(CUDA_nppc_LIBRARY CACHE)
@@ -754,6 +757,10 @@ if(CUDA_VERSION VERSION_GREATER "5.0")
elseif(NOT CUDA_VERSION VERSION_LESS "4.0")
find_cuda_helper_libs(npp)
endif()
+if(NOT CUDA_VERSION VERSION_LESS "7.0")
+ # cusolver showed up in version 7.0
+ find_cuda_helper_libs(cusolver)
+endif()
if (CUDA_BUILD_EMULATION)
set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY})
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index c54b943..c04cf9a 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -503,7 +503,7 @@ target_link_libraries(CMakeLib cmsys
${CMAKE_EXPAT_LIBRARIES} ${CMAKE_ZLIB_LIBRARIES}
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
${CMAKE_CURL_LIBRARIES}
- cmjsoncpp
+ ${CMAKE_JSONCPP_LIBRARIES}
)
# On Apple we need CoreFoundation
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 3dd8e7b..2f4cb8a 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 1)
-set(CMake_VERSION_PATCH 20150120)
+set(CMake_VERSION_PATCH 20150122)
#set(CMake_VERSION_RC 1)
diff --git a/Source/kwsys/FStream.hxx.in b/Source/kwsys/FStream.hxx.in
index 45425ff..37055d6 100644
--- a/Source/kwsys/FStream.hxx.in
+++ b/Source/kwsys/FStream.hxx.in
@@ -18,6 +18,11 @@
namespace @KWSYS_NAMESPACE@
{
#if defined(_MSC_VER) && _MSC_VER >= 1400
+# if defined(_NOEXCEPT)
+# define @KWSYS_NAMESPACE@_FStream_NOEXCEPT _NOEXCEPT
+# else
+# define @KWSYS_NAMESPACE@_FStream_NOEXCEPT
+# endif
template<typename CharType,typename Traits>
class basic_filebuf : public std::basic_filebuf<CharType,Traits>
{
@@ -85,7 +90,7 @@ namespace @KWSYS_NAMESPACE@
return buf_;
}
- ~basic_ifstream()
+ ~basic_ifstream() @KWSYS_NAMESPACE@_FStream_NOEXCEPT
{
buf_->close();
delete buf_;
@@ -147,7 +152,7 @@ class basic_ofstream : public std::basic_ostream<CharType,Traits>
{
return buf_.get();
}
- ~basic_ofstream()
+ ~basic_ofstream() @KWSYS_NAMESPACE@_FStream_NOEXCEPT
{
buf_->close();
delete buf_;
@@ -160,6 +165,7 @@ class basic_ofstream : public std::basic_ostream<CharType,Traits>
typedef basic_ifstream<char> ifstream;
typedef basic_ofstream<char> ofstream;
+# undef @KWSYS_NAMESPACE@_FStream_NOEXCEPT
#else
using @KWSYS_NAMESPACE@_ios_namespace::ofstream;
using @KWSYS_NAMESPACE@_ios_namespace::ifstream;
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index ef71f26..c2965ea 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -340,7 +340,11 @@ kwsysProcess* kwsysProcess_New(void)
osv.dwOSVersionInfoSize = sizeof(osv);
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning (push)
-# pragma warning (disable:4996)
+# ifdef __INTEL_COMPILER
+# pragma warning (disable:1478)
+# else
+# pragma warning (disable:4996)
+# endif
#endif
GetVersionEx(&osv);
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
@@ -2382,7 +2386,11 @@ static kwsysProcess_List* kwsysProcess_List_New(void)
osv.dwOSVersionInfoSize = sizeof(osv);
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning (push)
-# pragma warning (disable:4996)
+# ifdef __INTEL_COMPILER
+# pragma warning (disable:1478)
+# else
+# pragma warning (disable:4996)
+# endif
#endif
GetVersionEx(&osv);
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 3d5e728..9c7ceee 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -5069,7 +5069,11 @@ bool SystemInformationImplementation::QueryOSInformation()
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEXW);
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning (push)
-# pragma warning (disable:4996)
+# ifdef __INTEL_COMPILER
+# pragma warning (disable:1478)
+# else
+# pragma warning (disable:4996)
+# endif
#endif
bOsVersionInfoEx = GetVersionExW ((OSVERSIONINFOW*)&osvi);
if (!bOsVersionInfoEx)
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index c2b6097..2708211 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -4732,7 +4732,11 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion()
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning (push)
-# pragma warning (disable:4996)
+# ifdef __INTEL_COMPILER
+# pragma warning (disable:1478)
+# else
+# pragma warning (disable:4996)
+# endif
#endif
bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *)&osvi);
if (!bOsVersionInfoEx)
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 5cd0836..ef37dcb 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -103,8 +103,9 @@ foreach(lang CXX C)
try_compile(${feature}_works
"${CMAKE_CURRENT_BINARY_DIR}/${feature}_test"
"${CMAKE_CURRENT_SOURCE_DIR}/feature_test.${${lang}_ext}"
- COMPILE_DEFINITIONS "-DTEST=${CMAKE_CURRENT_SOURCE_DIR}/${feature}.${${lang}_ext}"
+ COMPILE_DEFINITIONS "-DTEST=${feature}.${${lang}_ext}"
CMAKE_FLAGS "-DCMAKE_${lang}_STANDARD=${${lang}_standard_flag}"
+ "-DINCLUDE_DIRECTORIES=${CMAKE_CURRENT_SOURCE_DIR}"
OUTPUT_VARIABLE OUTPUT
)
if (${feature}_works)
diff --git a/Tests/CompileFeatures/feature_test.c b/Tests/CompileFeatures/feature_test.c
new file mode 100644
index 0000000..4147f1f
--- /dev/null
+++ b/Tests/CompileFeatures/feature_test.c
@@ -0,0 +1,10 @@
+
+#define STRINGIFY_IMPL(X) #X
+#define STRINGIFY(X) STRINGIFY_IMPL(X)
+
+#include STRINGIFY(TEST)
+
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index b5e46c0..78c4a6a 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -71,7 +71,7 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
add_executable(C_undefined c_undefined.c)
- set_property(TARGET C_undefined PROPERTY CXX_STANDARD 90)
+ set_property(TARGET C_undefined PROPERTY C_STANDARD 90)
target_compile_options(C_undefined PRIVATE -Werror=undef)
endif()
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main.cpp b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
index 82b2191..192094c 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/main.cpp
+++ b/Tests/Module/WriteCompilerDetectionHeader/main.cpp
@@ -4,6 +4,10 @@
#define PREFIX TEST
#include "compile_tests.h"
+#ifdef TEST_COMPILER_C_STATIC_ASSERT
+#error Expect no C features defined
+#endif
+
int main()
{
return 0;
diff --git a/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp b/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
index ca29823..1635091 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
+++ b/Tests/Module/WriteCompilerDetectionHeader/multi_files.cpp
@@ -4,6 +4,10 @@
#define PREFIX MULTI
#include "compile_tests.h"
+#ifdef MULTI_COMPILER_C_STATIC_ASSERT
+#error Expect no C features defined
+#endif
+
int main()
{
return 0;
diff --git a/Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in b/Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in
index f0e1653..378a85a 100644
--- a/Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in
+++ b/Tests/RunCMake/CTestSubmit/CTestConfig.cmake.in
@@ -3,3 +3,4 @@ set(CTEST_PROJECT_NAME "CTestSubmit@CASE_NAME@")
# Intentionally leave out other upload-related CTestConfig.cmake settings
# so that any ctest_submit calls fail with an error message.
set(CTEST_DROP_METHOD "@CASE_DROP_METHOD@")
+set(CTEST_DROP_SITE "@CASE_DROP_SITE@")
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-cp-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-cp-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-cp-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-cp-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-cp-stderr.txt
new file mode 100644
index 0000000..b451315
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-cp-stderr.txt
@@ -0,0 +1,4 @@
+Missing arguments for submit via cp:
+.*
+ Problems when submitting via CP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-cp/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-cp-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-cp-stdout.txt
new file mode 100644
index 0000000..fa6e004
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-cp-stdout.txt
@@ -0,0 +1 @@
+Submit files \(using cp\)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-ftp-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stderr.txt
new file mode 100644
index 0000000..a622fac
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stderr.txt
@@ -0,0 +1,3 @@
+Error message was: .*
+ Problems when submitting via FTP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-ftp/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stdout.txt
new file mode 100644
index 0000000..345bb62
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-ftp-stdout.txt
@@ -0,0 +1,3 @@
+Submit files \(using ftp\)
+ Using FTP submit method
+ Drop site: ftp://
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-http-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-http-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-http-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-http-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-http-stderr.txt
new file mode 100644
index 0000000..6870d2e
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-http-stderr.txt
@@ -0,0 +1,3 @@
+Error message was: .*
+ Problems when submitting via HTTP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-http/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-http-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-http-stdout.txt
new file mode 100644
index 0000000..c7f35c5
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-http-stdout.txt
@@ -0,0 +1,3 @@
+Submit files \(using http\)
+ Using HTTP submit method
+ Drop site:http://
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-https-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-https-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-https-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-https-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-https-stderr.txt
new file mode 100644
index 0000000..a3c0cd5
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-https-stderr.txt
@@ -0,0 +1,3 @@
+Error message was: .*
+ Problems when submitting via HTTP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-https/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-https-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-https-stdout.txt
new file mode 100644
index 0000000..19f8234
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-https-stdout.txt
@@ -0,0 +1,3 @@
+Submit files \(using https\)
+ Using HTTP submit method
+ Drop site:https://
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-scp-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-scp-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-scp-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-scp-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-scp-stderr.txt
new file mode 100644
index 0000000..42b8f50
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-scp-stderr.txt
@@ -0,0 +1,2 @@
+ Problems when submitting via SCP
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-scp/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-scp-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-scp-stdout.txt
new file mode 100644
index 0000000..ec2ce92
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-scp-stdout.txt
@@ -0,0 +1 @@
+Submit files \(using scp\)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-result.txt b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stderr.txt b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stderr.txt
new file mode 100644
index 0000000..020b615
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stderr.txt
@@ -0,0 +1,2 @@
+ (Problems when submitting via XML-RPC|Submission method "xmlrpc" not compiled into CTest!)
+Error in read script: .*/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc/test.cmake
diff --git a/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stdout.txt b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stdout.txt
new file mode 100644
index 0000000..ed2acb5
--- /dev/null
+++ b/Tests/RunCMake/CTestSubmit/FailDrop-xmlrpc-stdout.txt
@@ -0,0 +1 @@
+Submit files \(using xmlrpc\)
diff --git a/Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake b/Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake
index bfb3b96..797365d 100644
--- a/Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestSubmit/RunCMakeTest.cmake
@@ -2,6 +2,7 @@ include(RunCMake)
# Default case parameters.
set(CASE_DROP_METHOD "http")
+set(CASE_DROP_SITE "-no-site-")
set(CASE_CTEST_SUBMIT_ARGS "")
function(run_ctest CASE_NAME)
@@ -53,4 +54,9 @@ function(run_ctest_submit_FailDrop CASE_DROP_METHOD)
run_ctest(FailDrop-${CASE_DROP_METHOD})
endfunction()
-# TODO: call run_ctest_submit_FailDrop() for each submission protocol
+run_ctest_submit_FailDrop(cp)
+run_ctest_submit_FailDrop(ftp)
+run_ctest_submit_FailDrop(http)
+run_ctest_submit_FailDrop(https)
+run_ctest_submit_FailDrop(scp)
+run_ctest_submit_FailDrop(xmlrpc)
diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in
index b883284..0cb6809 100644
--- a/Utilities/cmThirdParty.h.in
+++ b/Utilities/cmThirdParty.h.in
@@ -20,6 +20,7 @@
#cmakedefine CMAKE_USE_SYSTEM_LIBARCHIVE
#cmakedefine CMAKE_USE_SYSTEM_LIBLZMA
#cmakedefine CMAKE_USE_SYSTEM_FORM
+#cmakedefine CMAKE_USE_SYSTEM_JSONCPP
#cmakedefine CTEST_USE_XMLRPC
#endif
diff --git a/Utilities/cm_jsoncpp_reader.h b/Utilities/cm_jsoncpp_reader.h
index d7cb50e..22f2d81 100644
--- a/Utilities/cm_jsoncpp_reader.h
+++ b/Utilities/cm_jsoncpp_reader.h
@@ -13,6 +13,11 @@
#define cm_jsoncpp_reader_h
/* Use the jsoncpp library configured for CMake. */
-#include <cmjsoncpp/include/json/reader.h>
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_JSONCPP
+# include <json/reader.h>
+#else
+# include <cmjsoncpp/include/json/reader.h>
+#endif
#endif
diff --git a/Utilities/cm_jsoncpp_value.h b/Utilities/cm_jsoncpp_value.h
index 15e1088..b4cf620 100644
--- a/Utilities/cm_jsoncpp_value.h
+++ b/Utilities/cm_jsoncpp_value.h
@@ -13,6 +13,11 @@
#define cm_jsoncpp_value_h
/* Use the jsoncpp library configured for CMake. */
-#include <cmjsoncpp/include/json/value.h>
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_JSONCPP
+# include <json/value.h>
+#else
+# include <cmjsoncpp/include/json/value.h>
+#endif
#endif
diff --git a/Utilities/cm_jsoncpp_writer.h b/Utilities/cm_jsoncpp_writer.h
index c410369..c99a0d0 100644
--- a/Utilities/cm_jsoncpp_writer.h
+++ b/Utilities/cm_jsoncpp_writer.h
@@ -13,6 +13,11 @@
#define cm_jsoncpp_writer_h
/* Use the jsoncpp library configured for CMake. */
-#include <cmjsoncpp/include/json/writer.h>
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_JSONCPP
+# include <json/writer.h>
+#else
+# include <cmjsoncpp/include/json/writer.h>
+#endif
#endif