diff options
author | Brad King <brad.king@kitware.com> | 2014-05-08 15:27:55 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-05-08 15:27:55 (GMT) |
commit | 9add7071a589892c856bbfd53aa79b352c3f3c08 (patch) | |
tree | c4af429c2277e941356bdd7358b48f8f31f7286d /Tests/Complex/CMakeLists.txt | |
parent | 7b3def93b630ee7964b1d33b2b601e07c7797438 (diff) | |
parent | b0f277db3885cf75b4a153442a3e30ecedfab049 (diff) | |
download | CMake-9add7071a589892c856bbfd53aa79b352c3f3c08.zip CMake-9add7071a589892c856bbfd53aa79b352c3f3c08.tar.gz CMake-9add7071a589892c856bbfd53aa79b352c3f3c08.tar.bz2 |
Merge topic 'hp-cpp98-tests'
b0f277db HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards
Diffstat (limited to 'Tests/Complex/CMakeLists.txt')
-rw-r--r-- | Tests/Complex/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index d250f53..5fa46bf 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 |