summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-15 14:22:18 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-04-15 14:22:18 (GMT)
commit27c141131ead0eec87195724f3d21cb246168a32 (patch)
treee323a4ff6505a88cdccfa70e627eccc9b4458ce7
parenteda0dd6ffb05f21036286b15df922558d1514b0d (diff)
parent185b4efe332d3d5465b307b29e5439427e863b2c (diff)
downloadCMake-27c141131ead0eec87195724f3d21cb246168a32.zip
CMake-27c141131ead0eec87195724f3d21cb246168a32.tar.gz
CMake-27c141131ead0eec87195724f3d21cb246168a32.tar.bz2
Merge topic 'hpux-acc-ansi98'
185b4efe CompileFlags: add better selection which aCC version gets -AA +hpxstd98 flags
-rw-r--r--CompileFlags.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index 873af8f..5874031 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -54,8 +54,12 @@ if(CMAKE_SYSTEM MATCHES "OSF1-V.*")
endif()
if(CMAKE_SYSTEM_NAME MATCHES "HP-UX" AND CMAKE_CXX_COMPILER_ID MATCHES "HP")
- # it is known that version 3.85 fails and 6.25 works without these flags
- if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
+ # 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.
+ # Versions prior to 3.80 will not be able to build CMake. Current assumption:
+ # it 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)
# use new C++ library and improved template support
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA +hpxstd98")
endif()