summaryrefslogtreecommitdiffstats
path: root/Tests/Module/GenerateExportHeader
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2014-04-15 16:52:30 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2014-04-25 15:59:57 (GMT)
commitb0f277db3885cf75b4a153442a3e30ecedfab049 (patch)
treeee8b33d7f74b99fef38dcfa3c446c8a416b793ee /Tests/Module/GenerateExportHeader
parentfd8bb3427858017754d5b08a2eb1f57116feebb6 (diff)
downloadCMake-b0f277db3885cf75b4a153442a3e30ecedfab049.zip
CMake-b0f277db3885cf75b4a153442a3e30ecedfab049.tar.gz
CMake-b0f277db3885cf75b4a153442a3e30ecedfab049.tar.bz2
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/Module/GenerateExportHeader')
-rw-r--r--Tests/Module/GenerateExportHeader/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/Module/GenerateExportHeader/CMakeLists.txt
index bf867a9..b52c44d 100644
--- a/Tests/Module/GenerateExportHeader/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/CMakeLists.txt
@@ -57,6 +57,15 @@ endif()
include(GenerateExportHeader)
+set(CMAKE_CXX_STANDARD 98)
+
+# 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 ()
+
add_subdirectory(lib_shared_and_static)
add_compiler_export_flags()