summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-08-30 17:59:56 (GMT)
committerBrad King <brad.king@kitware.com>2006-08-30 17:59:56 (GMT)
commit712f3a3da496f8b80a31a6853d743a7ede5c169c (patch)
treeff43869ffcb603cdaabed2f293e45c81b5fb9126
parent82e5ab5d4f981c46a4f26a5d9e15bf6ea1d81e6d (diff)
downloadCMake-712f3a3da496f8b80a31a6853d743a7ede5c169c.zip
CMake-712f3a3da496f8b80a31a6853d743a7ede5c169c.tar.gz
CMake-712f3a3da496f8b80a31a6853d743a7ede5c169c.tar.bz2
COMP: Fix try-compile to fail properly on HP.
-rw-r--r--Source/kwsys/CMakeLists.txt3
-rw-r--r--Source/kwsys/kwsysPlatformCxxTests.cmake4
2 files changed, 5 insertions, 2 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 921e0d3..b249575 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -267,6 +267,9 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no_implicit_include")
ENDIF(NOT KWSYS_CXX_FLAGS_HAVE_NO_IMPLICIT_INCLUDE)
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+ IF(CMAKE_SYSTEM MATCHES "HP-UX")
+ SET(KWSYS_PLATFORM_CXX_TEST_EXTRA_FLAGS "+p")
+ ENDIF(CMAKE_SYSTEM MATCHES "HP-UX")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
#-----------------------------------------------------------------------------
diff --git a/Source/kwsys/kwsysPlatformCxxTests.cmake b/Source/kwsys/kwsysPlatformCxxTests.cmake
index bd07f61..6560fa3 100644
--- a/Source/kwsys/kwsysPlatformCxxTests.cmake
+++ b/Source/kwsys/kwsysPlatformCxxTests.cmake
@@ -4,7 +4,7 @@ MACRO(KWSYS_PLATFORM_CXX_TEST var description invert)
TRY_COMPILE(${var}_COMPILED
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/kwsysPlatformCxxTests.cxx
- COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
+ COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES} ${KWSYS_PLATFORM_CXX_TEST_EXTRA_FLAGS}
OUTPUT_VARIABLE OUTPUT)
IF(${var}_COMPILED)
FILE(APPEND
@@ -50,7 +50,7 @@ MACRO(KWSYS_PLATFORM_CXX_TEST_RUN var description invert)
TRY_RUN(${var} ${var}_COMPILED
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/kwsysPlatformCxxTests.cxx
- COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
+ COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES} ${KWSYS_PLATFORM_CXX_TEST_EXTRA_FLAGS}
OUTPUT_VARIABLE OUTPUT)
# Note that ${var} will be a 0 return value on success.