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 /Modules | |
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 'Modules')
-rw-r--r-- | Modules/Compiler/HP-CXX.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/Compiler/HP-CXX.cmake b/Modules/Compiler/HP-CXX.cmake index 44470ca..6411dac 100644 --- a/Modules/Compiler/HP-CXX.cmake +++ b/Modules/Compiler/HP-CXX.cmake @@ -2,3 +2,12 @@ set(CMAKE_CXX_VERBOSE_FLAG "-v") set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + +# HP aCC since version 3.80 supports the flag +hpxstd98 to get ANSI C++98 +# template support. It is known that version 6.25 doesn't need that flag. +# Current assumption: the flag is needed for every version from 3.80 to 4 +# to get it working. +if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4 AND + NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.80) + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "+hpxstd98") +endif() |