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.
This commit is contained in:
Rolf Eike Beer
2014-04-15 18:52:30 +02:00
parent fd8bb34278
commit b0f277db38
6 changed files with 67 additions and 1 deletions

View File

@@ -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()