[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-2362-g0fb12a6
Rolf Eike Beer
eike at sf-mail.de
Tue Apr 15 13:57:12 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 0fb12a6022e696cd60292ee7483800165e15e0d8 (commit)
via f21ad45d090bf2d6ac83640775bd4597305b02ff (commit)
from 1668a9daac10c0d24294249dccab56ea08eb516b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fb12a6022e696cd60292ee7483800165e15e0d8
commit 0fb12a6022e696cd60292ee7483800165e15e0d8
Merge: 1668a9d f21ad45
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Apr 15 13:57:11 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Apr 15 13:57:11 2014 -0400
Merge topic 'hp-cpp98-tests' into next
f21ad45d HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f21ad45d090bf2d6ac83640775bd4597305b02ff
commit f21ad45d090bf2d6ac83640775bd4597305b02ff
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Apr 15 18:52:30 2014 +0200
Commit: Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Tue Apr 15 19:56:55 2014 +0200
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.
For merge simplicity this patch is based on master since it doesn't collide
with anything from the cxx11-features branch, which this feature depends on.
This branch should only go into master after the CXX_STANDARD variable is
merged to master, and this paragraph should be removed from the commit message
then.
diff --git a/Modules/Compiler/HP-CXX.cmake b/Modules/Compiler/HP-CXX.cmake
index 44470ca..9318b54 100644
--- a/Modules/Compiler/HP-CXX.cmake
+++ b/Modules/Compiler/HP-CXX.cmake
@@ -2,3 +2,14 @@ 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)
+ # The -AA option tells the compiler to use the new C++ lib, which you
+ # usually also want because otherwise many things will not work.
+ set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-AA +hpxstd98")
+endif()
diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt
index 9467fae..448c0dc 100644
--- a/Tests/AliasTarget/CMakeLists.txt
+++ b/Tests/AliasTarget/CMakeLists.txt
@@ -1,7 +1,8 @@
-
cmake_minimum_required(VERSION 2.8.11)
project(AliasTarget)
+set(CXX_STANDARD 98)
+
add_library(foo SHARED empty.cpp)
add_library(PREFIX::Foo ALIAS foo)
add_library(Another::Alias ALIAS foo)
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index d250f53..3e1ce00 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -392,6 +392,10 @@ 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(CXX_STANDARD 98)
#
# Create the libs and the main exe
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index bb00341..89b094a 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -362,6 +362,10 @@ 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(CXX_STANDARD 98)
#
# Create the libs and the main exe
diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/Module/GenerateExportHeader/CMakeLists.txt
index bf867a9..6206ecb 100644
--- a/Tests/Module/GenerateExportHeader/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/CMakeLists.txt
@@ -57,6 +57,8 @@ endif()
include(GenerateExportHeader)
+set(CXX_STANDARD 98)
+
add_subdirectory(lib_shared_and_static)
add_compiler_export_flags()
diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt
index c6ed15d..89cd088 100644
--- a/Tests/Plugin/CMakeLists.txt
+++ b/Tests/Plugin/CMakeLists.txt
@@ -24,6 +24,9 @@ include_directories(
${Plugin_SOURCE_DIR}/include
)
+# We need proper C++98 support from the compiler
+set(CXX_STANDARD 98)
+
# Create an executable that exports an API for use by plugins.
add_executable(example_exe src/example_exe.cxx)
set_target_properties(example_exe PROPERTIES
-----------------------------------------------------------------------
Summary of changes:
Modules/Compiler/HP-CXX.cmake | 11 +++++++++++
Tests/AliasTarget/CMakeLists.txt | 3 ++-
Tests/Complex/CMakeLists.txt | 4 ++++
Tests/ComplexOneConfig/CMakeLists.txt | 4 ++++
Tests/Module/GenerateExportHeader/CMakeLists.txt | 2 ++
Tests/Plugin/CMakeLists.txt | 3 +++
6 files changed, 26 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list