summaryrefslogtreecommitdiff
path: root/Tests/Complex
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2014-04-15 18:52:30 +0200
committerRolf Eike Beer <eike@sf-mail.de>2014-04-25 17:59:57 +0200
commitb0f277db3885cf75b4a153442a3e30ecedfab049 (patch)
treeee8b33d7f74b99fef38dcfa3c446c8a416b793ee /Tests/Complex
parentfd8bb3427858017754d5b08a2eb1f57116feebb6 (diff)
downloadcmake-b0f277db3885cf75b4a153442a3e30ecedfab049.tar.gz
HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards
Old versions of aCC need a special compiler flag to get full C++98 template support as e.g. CMake itself or the Complex and ComplexOneConfig tests need. The same versions need a special flag to get a proper C++ library, too.
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index d250f539e6..5fa46bf9e7 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -392,6 +392,21 @@ if(NOT RESULT STREQUAL "a[b]c[d]e")
"string(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")")
endif()
+#
+# This tests needs Ansi C++98
+#
+set(CMAKE_CXX_STANDARD 98)
+#
+# GNU extensions are needed for stricmp() on Windows.
+#
+set(CMAKE_CXX_EXTENSIONS TRUE)
+
+# Those versions of the HP compiler that need a flag to get proper C++98
+# template support also need a flag to use the newer C++ library.
+if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
+ CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA")
+endif ()
#
# Create the libs and the main exe