summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt9
-rw-r--r--Source/CPack/cmCPackTGZGenerator.cxx7
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx17
-rw-r--r--Source/cmCTest.cxx2
-rw-r--r--Source/cmGeneratedFileStream.cxx10
-rw-r--r--Source/cmSystemTools.cxx10
-rw-r--r--Source/cmXMLParser.cxx2
7 files changed, 34 insertions, 23 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 17aa18d..8bd39a1 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -352,6 +352,13 @@ IF(BUILD_TESTING)
SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
ENDIF(NOT CMAKE_TEST_GENERATOR)
+ SET(CMAKE_TEST_SYSTEM_LIBRARIES 0)
+ FOREACH(util CURL EXPAT XMLRPC ZLIB)
+ IF(CMAKE_USE_SYSTEM_${util})
+ SET(CMAKE_TEST_SYSTEM_LIBRARIES 1)
+ ENDIF(CMAKE_USE_SYSTEM_${util})
+ ENDFOREACH(util)
+
# This variable is set by cmake, however to
# test cmake we want to make sure that
# the ctest from this cmake is used for testing
@@ -602,6 +609,7 @@ IF(BUILD_TESTING)
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Complex/bin"
--build-options
-DCMAKE_TEST_DIFFERENT_GENERATOR:BOOL=${CMAKE_TEST_DIFFERENT_GENERATOR}
+ -DCMAKE_TEST_SYSTEM_LIBRARIES:BOOL=${CMAKE_TEST_SYSTEM_LIBRARIES}
--test-command complex
)
@@ -615,6 +623,7 @@ IF(BUILD_TESTING)
--build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexOneConfig/bin"
--build-options
-DCMAKE_TEST_DIFFERENT_GENERATOR:BOOL=${CMAKE_TEST_DIFFERENT_GENERATOR}
+ -DCMAKE_TEST_SYSTEM_LIBRARIES:BOOL=${CMAKE_TEST_SYSTEM_LIBRARIES}
--test-command complex)
# ADD_TEST(complexRelativePaths ${CMAKE_CTEST_COMMAND}
diff --git a/Source/CPack/cmCPackTGZGenerator.cxx b/Source/CPack/cmCPackTGZGenerator.cxx
index d4663db..133fe0a 100644
--- a/Source/CPack/cmCPackTGZGenerator.cxx
+++ b/Source/CPack/cmCPackTGZGenerator.cxx
@@ -26,7 +26,7 @@
#include "cmCPackLog.h"
#include <cmsys/SystemTools.hxx>
-#include <cmzlib/zutil.h>
+#include <cm_zlib.h>
#include <libtar/libtar.h>
#include <memory> // auto_ptr
#include <fcntl.h>
@@ -94,7 +94,7 @@ int cmCPackTGZ_Data_Open(void *client_data, const char* pathname,
mydata->ZLibStream.opaque = Z_NULL;
int strategy = Z_DEFAULT_STRATEGY;
if ( deflateInit2(&mydata->ZLibStream, mydata->CompressionLevel,
- Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy) != Z_OK )
+ Z_DEFLATED, -MAX_WBITS, 8, strategy) != Z_OK )
{
return -1;
}
@@ -281,7 +281,8 @@ int cmCPackTGZGenerator::GenerateHeader(std::ostream* os)
const int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
char header[11];
sprintf(header, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
- Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
+ Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/,
+ 3 /* zlib os code for UNIX, not really used anyway */);
os->write(header, 10);
}
return 1;
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index b20388c..6fd24de 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -25,11 +25,10 @@ PURPOSE. See the above copyright notices for more information.
#include <cmsys/Base64.h>
// For XML-RPC submission
-#include "xmlrpc.h"
-#include "xmlrpc_client.h"
+#include "cm_xmlrpc.h"
// For curl submission
-#include "cmcurl/curl/curl.h"
+#include "cm_curl.h"
#include <sys/stat.h>
@@ -644,12 +643,14 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix,
const cmStdString& url)
{
xmlrpc_env env;
- std::string ctestVersion = cmVersion::GetCMakeVersion();
+ char ctestString[] = "CTest";
+ std::string ctestVersionString = cmVersion::GetCMakeVersion();
+ char* ctestVersion = const_cast<char*>(ctestVersionString.c_str());
cmStdString realURL = url + "/" + remoteprefix + "/Command/";
/* Start up our XML-RPC client library. */
- xmlrpc_client_init(XMLRPC_CLIENT_NO_FLAGS, "CTest", ctestVersion.c_str());
+ xmlrpc_client_init(XMLRPC_CLIENT_NO_FLAGS, ctestString, ctestVersion);
/* Initialize our error-handling environment. */
xmlrpc_env_init(&env);
@@ -697,9 +698,9 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix,
}
fclose(fp);
- std::string remoteCommand = "Submit.put";
- result = xmlrpc_client_call(&env, realURL.c_str(),
- remoteCommand.c_str(),
+ char remoteCommand[] = "Submit.put";
+ char* pRealURL = const_cast<char*>(realURL.c_str());
+ result = xmlrpc_client_call(&env, pRealURL, remoteCommand,
"(6)", fileBuffer, (xmlrpc_int32)fileSize );
delete [] fileBuffer;
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 8d05762..653fc12 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -14,7 +14,7 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
-#include "cmcurl/curl/curl.h"
+#include "cm_curl.h"
#include "cmCTest.h"
#include "cmake.h"
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index e8be5fd..82ac2b7 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -27,7 +27,7 @@
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
-# include <cmzlib/zlib.h>
+# include <cm_zlib.h>
#endif
//----------------------------------------------------------------------------
@@ -213,7 +213,7 @@ void cmGeneratedFileStreamBase::Close()
int cmGeneratedFileStreamBase::CompressFile(const char* oldname,
const char* newname)
{
- gzFile gf = cm_zlib_gzopen(newname, "w");
+ gzFile gf = gzopen(newname, "w");
if ( !gf )
{
return 0;
@@ -228,15 +228,15 @@ int cmGeneratedFileStreamBase::CompressFile(const char* oldname,
char buffer[BUFFER_SIZE];
while ( (res = fread(buffer, 1, BUFFER_SIZE, ifs)) > 0 )
{
- if ( !cm_zlib_gzwrite(gf, buffer, res) )
+ if ( !gzwrite(gf, buffer, res) )
{
fclose(ifs);
- cm_zlib_gzclose(gf);
+ gzclose(gf);
return 0;
}
}
fclose(ifs);
- cm_zlib_gzclose(gf);
+ gzclose(gf);
return 1;
}
#else
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 4d257b2..8746c7a 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -48,7 +48,7 @@
# include <libtar/libtar.h>
# include <memory> // auto_ptr
# include <fcntl.h>
-# include <cmzlib/zlib.h>
+# include <cm_zlib.h>
#endif
#if defined(__sgi) && !defined(__GNUC__)
@@ -1439,7 +1439,7 @@ int cmSystemToolsGZStructOpen(void* call_data, const char *pathname,
}
#endif
- gzf->GZFile = cm_zlib_gzdopen(fd, gzoflags);
+ gzf->GZFile = gzdopen(fd, gzoflags);
if (!gzf->GZFile)
{
errno = ENOMEM;
@@ -1452,20 +1452,20 @@ int cmSystemToolsGZStructOpen(void* call_data, const char *pathname,
int cmSystemToolsGZStructClose(void* call_data)
{
cmSystemToolsGZStruct* gzf = static_cast<cmSystemToolsGZStruct*>(call_data);
- return cm_zlib_gzclose(gzf->GZFile);
+ return gzclose(gzf->GZFile);
}
ssize_t cmSystemToolsGZStructRead(void* call_data, void* buf, size_t count)
{
cmSystemToolsGZStruct* gzf = static_cast<cmSystemToolsGZStruct*>(call_data);
- return cm_zlib_gzread(gzf->GZFile, buf, count);
+ return gzread(gzf->GZFile, buf, count);
}
ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf,
size_t count)
{
cmSystemToolsGZStruct* gzf = static_cast<cmSystemToolsGZStruct*>(call_data);
- return cm_zlib_gzwrite(gzf->GZFile, (void*)buf, count);
+ return gzwrite(gzf->GZFile, (void*)buf, count);
}
#endif
diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx
index 58f3656..2894090 100644
--- a/Source/cmXMLParser.cxx
+++ b/Source/cmXMLParser.cxx
@@ -16,7 +16,7 @@
=========================================================================*/
#include "cmXMLParser.h"
-#include <cmexpat/expat.h>
+#include <cm_expat.h>
#include <ctype.h>
//----------------------------------------------------------------------------