diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2014-04-15 16:52:30 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2014-04-25 15:59:57 (GMT) |
commit | b0f277db3885cf75b4a153442a3e30ecedfab049 (patch) | |
tree | ee8b33d7f74b99fef38dcfa3c446c8a416b793ee /Tests/ComplexOneConfig/CMakeLists.txt | |
parent | fd8bb3427858017754d5b08a2eb1f57116feebb6 (diff) | |
download | CMake-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/ComplexOneConfig/CMakeLists.txt')
-rw-r--r-- | Tests/ComplexOneConfig/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index bb00341..d3d9132 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -362,6 +362,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 |