[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.145 1.146 kwsysPlatformTestsCXX.cxx 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jul 27 16:45:18 EDT 2009


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

Modified Files:
	CMakeLists.txt kwsysPlatformTestsCXX.cxx 
Log Message:
BUG: Enable large files only if <cstdio> works

Some AIX/gcc version combinations the <cstdio> header breaks when large
file support is enabled.  See this GCC issue for details:

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366

We work around the problem by enhancing the configuration check for
large file support to include <cstdio> when available.  This will cause
LFS to be disabled when the above problem occurs.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/CMakeLists.txt,v
retrieving revision 1.145
retrieving revision 1.146
diff -C 2 -d -r1.145 -r1.146
*** CMakeLists.txt	10 Jun 2009 15:46:05 -0000	1.145
--- CMakeLists.txt	27 Jul 2009 20:45:15 -0000	1.146
***************
*** 338,341 ****
--- 338,343 ----
  #-----------------------------------------------------------------------------
  # Configure Large File Support.
+ KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_CSTDIO
+   "Checking whether header cstdio is available" DIRECT)
  SET(KWSYS_LFS_AVAILABLE 0)
  IF(KWSYS_LFS_REQUESTED)
***************
*** 344,349 ****
--- 346,354 ----
  
    # Check for large file support.
+   SET(KWSYS_PLATFORM_CXX_TEST_DEFINES
+     -DKWSYS_CXX_HAS_CSTDIO=${KWSYS_CXX_HAS_CSTDIO})
    KWSYS_PLATFORM_CXX_TEST_RUN(KWSYS_LFS_WORKS
      "Checking for Large File Support" DIRECT)
+   SET(KWSYS_PLATFORM_CXX_TEST_DEFINES)
  
    IF(KWSYS_LFS_WORKS)

Index: kwsysPlatformTestsCXX.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/kwsysPlatformTestsCXX.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** kwsysPlatformTestsCXX.cxx	31 Jan 2008 13:32:08 -0000	1.3
--- kwsysPlatformTestsCXX.cxx	27 Jul 2009 20:45:15 -0000	1.4
***************
*** 92,95 ****
--- 92,100 ----
  #endif
  
+ #ifdef TEST_KWSYS_CXX_HAS_CSTDIO
+ #include <cstdio>
+ int main() { return 0; }
+ #endif
+ 
  #ifdef TEST_KWSYS_CXX_HAS_CSTDDEF
  #include <cstddef>
***************
*** 332,335 ****
--- 337,343 ----
  #include <sys/stat.h>
  #include <assert.h>
+ #if KWSYS_CXX_HAS_CSTDIO
+ # include <cstdio>
+ #endif
  #include <stdio.h>
  



More information about the Cmake-commits mailing list