summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-27 20:45:15 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-27 20:45:15 (GMT)
commitcf1225b9afd6c3f6d2de7f45929eb64afeefed90 (patch)
tree441b654b09b55d31d0f5cafe66e15fe52f68c7cc /Source/kwsys/CMakeLists.txt
parent40850e7f1fea49e863d321291585d9a1ee8e8037 (diff)
downloadCMake-cf1225b9afd6c3f6d2de7f45929eb64afeefed90.zip
CMake-cf1225b9afd6c3f6d2de7f45929eb64afeefed90.tar.gz
CMake-cf1225b9afd6c3f6d2de7f45929eb64afeefed90.tar.bz2
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.
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r--Source/kwsys/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 0a816e2..00d301e 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -337,14 +337,19 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
#-----------------------------------------------------------------------------
# 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)
# Large File Support is requested.
SET(KWSYS_LFS_REQUESTED 1)
# 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)
SET(KWSYS_LFS_AVAILABLE 1)