[cmake-commits] king committed CMakeLists.txt 1.301 1.302 cmCTest.cxx 1.311 1.312 cmGeneratedFileStream.cxx 1.16 1.17 cmSystemTools.cxx 1.329 1.330 cmXMLParser.cxx 1.4 1.5

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Oct 19 15:00:10 EDT 2006


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv7338/Source

Modified Files:
	CMakeLists.txt cmCTest.cxx cmGeneratedFileStream.cxx 
	cmSystemTools.cxx cmXMLParser.cxx 
Log Message:
ENH: Add options to build with system utility libraries.  Organize inclusion of third party libraries into a single header per library.  This addresses bug#3653.


Index: cmXMLParser.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmXMLParser.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cmXMLParser.cxx	30 Mar 2006 18:49:55 -0000	1.4
+++ cmXMLParser.cxx	19 Oct 2006 19:00:08 -0000	1.5
@@ -16,7 +16,7 @@
 =========================================================================*/
 #include "cmXMLParser.h"
 
-#include <cmexpat/expat.h>
+#include <cm_expat.h>
 #include <ctype.h>
 
 //----------------------------------------------------------------------------

Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -d -r1.311 -r1.312
--- cmCTest.cxx	19 Oct 2006 14:45:17 -0000	1.311
+++ cmCTest.cxx	19 Oct 2006 19:00:06 -0000	1.312
@@ -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"

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.301
retrieving revision 1.302
diff -u -d -r1.301 -r1.302
--- CMakeLists.txt	3 Oct 2006 19:25:58 -0000	1.301
+++ CMakeLists.txt	19 Oct 2006 19:00:06 -0000	1.302
@@ -352,6 +352,13 @@
     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 @@
       --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 @@
       --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}

Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.329
retrieving revision 1.330
diff -u -d -r1.329 -r1.330
--- cmSystemTools.cxx	26 Jul 2006 15:46:22 -0000	1.329
+++ cmSystemTools.cxx	19 Oct 2006 19:00:08 -0000	1.330
@@ -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 @@
     }
 #endif
 
-  gzf->GZFile = cm_zlib_gzdopen(fd, gzoflags);
+  gzf->GZFile = gzdopen(fd, gzoflags);
   if (!gzf->GZFile)
   {
     errno = ENOMEM;
@@ -1452,20 +1452,20 @@
 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

Index: cmGeneratedFileStream.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGeneratedFileStream.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cmGeneratedFileStream.cxx	10 May 2006 19:56:00 -0000	1.16
+++ cmGeneratedFileStream.cxx	19 Oct 2006 19:00:07 -0000	1.17
@@ -27,7 +27,7 @@
 #endif
 
 #if defined(CMAKE_BUILD_WITH_CMAKE)
-# include <cmzlib/zlib.h>
+# include <cm_zlib.h>
 #endif
 
 //----------------------------------------------------------------------------
@@ -213,7 +213,7 @@
 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 @@
   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



More information about the Cmake-commits mailing list