From kwrobot at kitware.com Fri Jul 1 00:01:08 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Jul 2016 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.0-rc4-292-gf408a5b Message-ID: <20160701040108.C2DB1F392D@public.kitware.com> 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, master has been updated via f408a5b1b9ebb7649537b78cf1303b46860eafee (commit) from b1883bc8b7bd4211037bcc181edffdcce646f43a (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f408a5b1b9ebb7649537b78cf1303b46860eafee commit f408a5b1b9ebb7649537b78cf1303b46860eafee Author: Kitware Robot AuthorDate: Fri Jul 1 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Fri Jul 1 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 94f6daf..2a98911 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 6) -set(CMake_VERSION_PATCH 20160630) +set(CMake_VERSION_PATCH 20160701) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Jul 1 09:12:39 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 1 Jul 2016 09:12:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.0-rc4-295-gcff9c11 Message-ID: <20160701131239.22DB3F2ABA@public.kitware.com> 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, master has been updated via cff9c11de779e44f3deceaa46f4adf31491b44e8 (commit) via c05d240ef7b4705e6a03d29a432412672193c11c (commit) via dab3ccf29422105fe9d200bfecb6beccdb659190 (commit) from f408a5b1b9ebb7649537b78cf1303b46860eafee (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cff9c11de779e44f3deceaa46f4adf31491b44e8 commit cff9c11de779e44f3deceaa46f4adf31491b44e8 Merge: f408a5b c05d240 Author: Brad King AuthorDate: Fri Jul 1 09:12:36 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Jul 1 09:12:36 2016 -0400 Merge topic 'doc-updates' c05d240e Help: Document CMAKE_TRY_COMPILE_PLATFORM_VARIABLES example dab3ccf2 InstallRequiredSystemLibraries: Document UCRT option use case ----------------------------------------------------------------------- Summary of changes: Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst | 16 ++++++++++++++++ Modules/InstallRequiredSystemLibraries.cmake | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Jul 1 09:12:42 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 1 Jul 2016 09:12:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.0-rc4-297-g6e55605 Message-ID: <20160701131242.2702EF2AE7@public.kitware.com> 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, master has been updated via 6e55605db199a4be4d3159c92c40a5e62b880fd5 (commit) via 73a3c0cd9857b519350df09811f78c29e3fbd7be (commit) from cff9c11de779e44f3deceaa46f4adf31491b44e8 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e55605db199a4be4d3159c92c40a5e62b880fd5 commit 6e55605db199a4be4d3159c92c40a5e62b880fd5 Merge: cff9c11 73a3c0c Author: Brad King AuthorDate: Fri Jul 1 09:12:40 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Jul 1 09:12:40 2016 -0400 Merge topic 'cmake-gui-static-xcb' 73a3c0cd cmake-gui: Add build option to use Qt5 xcb plugin statically ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/CMakeLists.txt | 6 ++++++ Source/QtDialog/CMakeSetup.cxx | 5 +++++ 2 files changed, 11 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Jul 1 09:12:45 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 1 Jul 2016 09:12:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.0-rc4-299-g4c476cc Message-ID: <20160701131245.8B854F2AEE@public.kitware.com> 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, master has been updated via 4c476cc9b2441f7cf36fd87c7c7338c373905678 (commit) via a77d597b86d2632372ab16963c075858d1a292fd (commit) from 6e55605db199a4be4d3159c92c40a5e62b880fd5 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c476cc9b2441f7cf36fd87c7c7338c373905678 commit 4c476cc9b2441f7cf36fd87c7c7338c373905678 Merge: 6e55605 a77d597 Author: Brad King AuthorDate: Fri Jul 1 09:12:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Jul 1 09:12:43 2016 -0400 Merge topic 'clang-format-script' a77d597b clang-format.bash: Fix filter-branch example documentation ----------------------------------------------------------------------- Summary of changes: Utilities/Scripts/clang-format.bash | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Jul 1 09:13:05 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 1 Jul 2016 09:13:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-646-ge6474f6 Message-ID: <20160701131305.7CD20F2AEE@public.kitware.com> 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 e6474f61a96dc4abb68094fed11243db1dc00ed2 (commit) via 4c476cc9b2441f7cf36fd87c7c7338c373905678 (commit) via 6e55605db199a4be4d3159c92c40a5e62b880fd5 (commit) via cff9c11de779e44f3deceaa46f4adf31491b44e8 (commit) via f408a5b1b9ebb7649537b78cf1303b46860eafee (commit) from d2541c763f55bc4f31d7a42c77d9488f6e81c31e (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6474f61a96dc4abb68094fed11243db1dc00ed2 commit e6474f61a96dc4abb68094fed11243db1dc00ed2 Merge: d2541c7 4c476cc Author: Brad King AuthorDate: Fri Jul 1 09:12:53 2016 -0400 Commit: Brad King CommitDate: Fri Jul 1 09:12:53 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Jul 1 09:14:38 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 1 Jul 2016 09:14:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-649-ga1695a8 Message-ID: <20160701131438.F02A5F3967@public.kitware.com> 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 a1695a8cbfd24765b7d372aaabcff6a38869012a (commit) via aec1d43f5d4cdb289b67726f2b8e5151933fa16d (commit) via f7d23e675357c1ac895e81fda08957007794bb66 (commit) from e6474f61a96dc4abb68094fed11243db1dc00ed2 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1695a8cbfd24765b7d372aaabcff6a38869012a commit a1695a8cbfd24765b7d372aaabcff6a38869012a Merge: e6474f6 aec1d43 Author: Brad King AuthorDate: Fri Jul 1 09:14:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Jul 1 09:14:38 2016 -0400 Merge topic 'update-kwsys' into next aec1d43f Merge branch 'upstream-KWSys' into update-kwsys f7d23e67 KWSys 2016-06-30 (96f06c8e) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aec1d43f5d4cdb289b67726f2b8e5151933fa16d commit aec1d43f5d4cdb289b67726f2b8e5151933fa16d Merge: 4c476cc f7d23e6 Author: Brad King AuthorDate: Fri Jul 1 09:13:38 2016 -0400 Commit: Brad King CommitDate: Fri Jul 1 09:13:38 2016 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2016-06-30 (96f06c8e) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7d23e675357c1ac895e81fda08957007794bb66 commit f7d23e675357c1ac895e81fda08957007794bb66 Author: KWSys Upstream AuthorDate: Thu Jun 30 10:11:53 2016 -0400 Commit: Brad King CommitDate: Fri Jul 1 09:13:38 2016 -0400 KWSys 2016-06-30 (96f06c8e) Code extracted from: http://public.kitware.com/KWSys.git at commit 96f06c8e93d2b5e0395c9f413d1649563a2015d8 (master). Upstream Shortlog ----------------- Brad King (1): 96f06c8e Drop the auto_ptr.hxx component of KWSys diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b15394..39b03b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -663,7 +663,6 @@ SET(KWSYS_CLASSES) SET(KWSYS_H_FILES Configure SharedForward) SET(KWSYS_HXX_FILES Configure String hashtable hash_fun hash_map hash_set - auto_ptr ) # Add selected C++ classes. @@ -903,7 +902,6 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) # C++ tests IF(NOT WATCOM) SET(KWSYS_CXX_TESTS - testAutoPtr testHashSTL ) ENDIF() diff --git a/auto_ptr.hxx.in b/auto_ptr.hxx.in deleted file mode 100644 index ad9654c..0000000 --- a/auto_ptr.hxx.in +++ /dev/null @@ -1,219 +0,0 @@ -/*============================================================================ - KWSys - Kitware System Library - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifndef @KWSYS_NAMESPACE at _auto_ptr_hxx -#define @KWSYS_NAMESPACE at _auto_ptr_hxx - -#include <@KWSYS_NAMESPACE@/Configure.hxx> - -// The HP compiler and VS6 cannot handle the conversions necessary to use -// auto_ptr_ref to pass an auto_ptr returned from one function -// directly to another function as in use_auto_ptr(get_auto_ptr()). -// We instead use const_cast to achieve the syntax on those platforms. -// We do not use const_cast on other platforms to maintain the C++ -// standard design and guarantee that if an auto_ptr is bound -// to a reference-to-const then ownership will be maintained. -#if defined(__HP_aCC) || (defined(_MSC_VER) && _MSC_VER <= 1200) -# define @KWSYS_NAMESPACE at _AUTO_PTR_REF 0 -# define @KWSYS_NAMESPACE at _AUTO_PTR_CONST const -# define @KWSYS_NAMESPACE at _AUTO_PTR_CAST(a) cast(a) -#else -# define @KWSYS_NAMESPACE at _AUTO_PTR_REF 1 -# define @KWSYS_NAMESPACE at _AUTO_PTR_CONST -# define @KWSYS_NAMESPACE at _AUTO_PTR_CAST(a) a -#endif - -// In C++11, clang will warn about using dynamic exception specifications -// as they are deprecated. But as this class is trying to faithfully -// mimic std::auto_ptr, we want to keep the 'throw()' decorations below. -// So we suppress the warning. -#if defined(__clang__) && defined(__has_warning) -# if __has_warning("-Wdeprecated") -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wdeprecated" -# endif -#endif - -namespace @KWSYS_NAMESPACE@ -{ - -template class auto_ptr; - -#if @KWSYS_NAMESPACE at _AUTO_PTR_REF -namespace detail -{ -// The auto_ptr_ref template is supposed to be a private member of -// auto_ptr but Borland 5.8 cannot handle it. Instead put it in -// a private namespace. -template struct auto_ptr_ref -{ - Y* p_; - - // The extra constructor argument prevents implicit conversion to - // auto_ptr_ref from auto_ptr through the constructor. Normally - // this should be done with the explicit keyword but Borland 5.x - // generates code in the conversion operator to call itself - // infinately. - auto_ptr_ref(Y* p, int): p_(p) {} -}; -} -#endif - -/** C++98 Standard Section 20.4.5 - Template class auto_ptr. */ -template -class auto_ptr -{ -#if !@KWSYS_NAMESPACE at _AUTO_PTR_REF - template - static inline auto_ptr& cast(auto_ptr const& a) - { return const_cast&>(a); } -#endif - - /** The pointer to the object held. */ - X* x_; - -public: - /** The type of object held by the auto_ptr. */ - typedef X element_type; - - /** Construct from an auto_ptr holding a compatible object. This - transfers ownership to the newly constructed auto_ptr. */ - template - auto_ptr(auto_ptr @KWSYS_NAMESPACE at _AUTO_PTR_CONST& a) throw(): - x_(@KWSYS_NAMESPACE at _AUTO_PTR_CAST(a).release()) - { - } - - /** Assign from an auto_ptr holding a compatible object. This - transfers ownership to the left-hand-side of the assignment. */ - template - auto_ptr& operator=(auto_ptr @KWSYS_NAMESPACE at _AUTO_PTR_CONST& a) throw() - { - this->reset(@KWSYS_NAMESPACE at _AUTO_PTR_CAST(a).release()); - return *this; - } - - /** - * Explicitly construct from a raw pointer. This is typically - * called with the result of operator new. For example: - * - * auto_ptr ptr(new X()); - */ - explicit auto_ptr(X* p=0) throw(): x_(p) - { - } - - /** Construct from another auto_ptr holding an object of the same - type. This transfers ownership to the newly constructed - auto_ptr. */ - auto_ptr(auto_ptr @KWSYS_NAMESPACE at _AUTO_PTR_CONST& a) throw(): - x_(@KWSYS_NAMESPACE at _AUTO_PTR_CAST(a).release()) - { - } - - /** Assign from another auto_ptr holding an object of the same type. - This transfers ownership to the newly constructed auto_ptr. */ - auto_ptr& operator=(auto_ptr @KWSYS_NAMESPACE at _AUTO_PTR_CONST& a) throw() - { - this->reset(@KWSYS_NAMESPACE at _AUTO_PTR_CAST(a).release()); - return *this; - } - - /** Destruct and delete the object held. */ - ~auto_ptr() throw() - { - // Assume object destructor is nothrow. - delete this->x_; - } - - /** Dereference and return a reference to the object held. */ - X& operator*() const throw() - { - return *this->x_; - } - - /** Return a pointer to the object held. */ - X* operator->() const throw() - { - return this->x_; - } - - /** Return a pointer to the object held. */ - X* get() const throw() - { - return this->x_; - } - - /** Return a pointer to the object held and reset to hold no object. - This transfers ownership to the caller. */ - X* release() throw() - { - X* x = this->x_; - this->x_ = 0; - return x; - } - - /** Assume ownership of the given object. The object previously - held is deleted. */ - void reset(X* p=0) throw() - { - if(this->x_ != p) - { - // Assume object destructor is nothrow. - delete this->x_; - this->x_ = p; - } - } - - /** Convert to an auto_ptr holding an object of a compatible type. - This transfers ownership to the returned auto_ptr. */ - template operator auto_ptr() throw() - { - return auto_ptr(this->release()); - } - -#if @KWSYS_NAMESPACE at _AUTO_PTR_REF - /** Construct from an auto_ptr_ref. This is used when the - constructor argument is a call to a function returning an - auto_ptr. */ - auto_ptr(detail::auto_ptr_ref r) throw(): x_(r.p_) - { - } - - /** Assign from an auto_ptr_ref. This is used when a function - returning an auto_ptr is passed on the right-hand-side of an - assignment. */ - auto_ptr& operator=(detail::auto_ptr_ref r) throw() - { - this->reset(r.p_); - return *this; - } - - /** Convert to an auto_ptr_ref. This is used when a function - returning an auto_ptr is the argument to the constructor of - another auto_ptr. */ - template operator detail::auto_ptr_ref() throw() - { - return detail::auto_ptr_ref(this->release(), 1); - } -#endif -}; - -} // namespace @KWSYS_NAMESPACE@ - -// Undo warning suppression. -#if defined(__clang__) && defined(__has_warning) -# if __has_warning("-Wdeprecated") -# pragma clang diagnostic pop -# endif -#endif - -#endif diff --git a/testAutoPtr.cxx b/testAutoPtr.cxx deleted file mode 100644 index ed75ff4..0000000 --- a/testAutoPtr.cxx +++ /dev/null @@ -1,166 +0,0 @@ -/*============================================================================ - KWSys - Kitware System Library - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifdef __BORLANDC__ -# pragma warn -8027 /* 'for' not inlined. */ -# pragma warn -8026 /* exception not inlined. */ -#endif -#include "kwsysPrivate.h" -#include KWSYS_HEADER(auto_ptr.hxx) -// Work-around CMake dependency scanning limitation. This must -// duplicate the above list of headers. -#if 0 -# include "auto_ptr.hxx.in" -#endif - -#include - -#define ASSERT(x,y) if (!(x)) { printf("FAIL: " y "\n"); status = 1; } - -int instances = 0; // don't declare as static - -struct A -{ - A() { ++instances; } - ~A() { --instances; } - A* self() {return this; } -}; -struct B: public A {}; - -static int function_call(kwsys::auto_ptr a) -{ - return a.get()? 1:0; -} - -static A* get_A(A& a) { return &a; } - -static kwsys::auto_ptr generate_auto_ptr_A() -{ - return kwsys::auto_ptr(new A); -} - -static kwsys::auto_ptr generate_auto_ptr_B() -{ - return kwsys::auto_ptr(new B); -} - -int testAutoPtr(int, char*[]) -{ - int status = 0; - - // Keep everything in a subscope so we can detect leaks. - { - kwsys::auto_ptr pa0; - kwsys::auto_ptr pa1(new A()); - kwsys::auto_ptr pb1(new B()); - kwsys::auto_ptr pb2(new B()); - kwsys::auto_ptr pa2(new B()); - - A* ptr = get_A(*pa1); - ASSERT(ptr == pa1.get(), - "auto_ptr does not return correct object when dereferenced"); - ptr = pa1->self(); - ASSERT(ptr == pa1.get(), - "auto_ptr does not return correct pointer from operator->"); - - A* before = pa0.get(); - pa0.reset(new A()); - ASSERT(pa0.get() && pa0.get() != before, - "auto_ptr empty after reset(new A())"); - - before = pa0.get(); - pa0.reset(new B()); - ASSERT(pa0.get() && pa0.get() != before, - "auto_ptr empty after reset(new B())"); - - delete pa0.release(); - ASSERT(!pa0.get(), "auto_ptr holds an object after release()"); - - kwsys::auto_ptr pa3(pb1); - ASSERT(!pb1.get(), - "auto_ptr full after being used to construct another"); - ASSERT(pa3.get(), - "auto_ptr empty after construction from another"); - - { - kwsys::auto_ptr pa; - pa = pa3; - ASSERT(!pa3.get(), - "auto_ptr full after assignment to another"); - ASSERT(pa.get(), - "auto_ptr empty after assignment from another"); - } - - { - kwsys::auto_ptr pa; - pa = pb2; - ASSERT(!pb2.get(), - "auto_ptr full after assignment to compatible"); - ASSERT(pa.get(), - "auto_ptr empty after assignment from compatible"); - } - - { - int receive = function_call(pa2); - ASSERT(receive, - "auto_ptr did not receive ownership in called function"); - ASSERT(!pa2.get(), - "auto_ptr did not release ownership to called function"); - } - - { - int received = function_call(generate_auto_ptr_A()); - ASSERT(received, - "auto_ptr in called function did not take ownership " - "from factory function"); - } - -#if 0 - // Is this allowed by the standard? - { - int received = function_call(generate_auto_ptr_B()); - ASSERT(received, - "auto_ptr in called function did not take ownership " - "from factory function with conversion"); - } -#endif - - { - kwsys::auto_ptr pa(generate_auto_ptr_A()); - ASSERT(pa.get(), - "auto_ptr empty after construction from factory function"); - } - - { - kwsys::auto_ptr pa; - pa = generate_auto_ptr_A(); - ASSERT(pa.get(), - "auto_ptr empty after assignment from factory function"); - } - - { - kwsys::auto_ptr pa(generate_auto_ptr_B()); - ASSERT(pa.get(), - "auto_ptr empty after construction from compatible factory function"); - } - - { - kwsys::auto_ptr pa; - pa = generate_auto_ptr_B(); - ASSERT(pa.get(), - "auto_ptr empty after assignment from compatible factory function"); - } - } - - ASSERT(instances == 0, "auto_ptr leaked an object"); - - return status; -} ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CMakeLists.txt | 2 - Source/kwsys/auto_ptr.hxx.in | 219 ------------------------------------------ Source/kwsys/testAutoPtr.cxx | 166 -------------------------------- 3 files changed, 387 deletions(-) delete mode 100644 Source/kwsys/auto_ptr.hxx.in delete mode 100644 Source/kwsys/testAutoPtr.cxx hooks/post-receive -- CMake From brad.king at kitware.com Fri Jul 1 11:26:46 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 1 Jul 2016 11:26:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-651-g4856cde Message-ID: <20160701152646.AF702F3AAD@public.kitware.com> 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 4856cde243efc07419d7027497457a858f2b5d4f (commit) via e1e54295e82ef93e9c88bccb097721f13537e16d (commit) from a1695a8cbfd24765b7d372aaabcff6a38869012a (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4856cde243efc07419d7027497457a858f2b5d4f commit 4856cde243efc07419d7027497457a858f2b5d4f Merge: a1695a8 e1e5429 Author: Brad King AuthorDate: Fri Jul 1 11:26:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Jul 1 11:26:45 2016 -0400 Merge topic 'update-osx-release' into next e1e54295 Utilities/Release: Compile OS X binary as C++11 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1e54295e82ef93e9c88bccb097721f13537e16d commit e1e54295e82ef93e9c88bccb097721f13537e16d Author: Brad King AuthorDate: Fri Jul 1 11:16:38 2016 -0400 Commit: Brad King CommitDate: Fri Jul 1 11:17:09 2016 -0400 Utilities/Release: Compile OS X binary as C++11 We already compile with `-stdlib=libc++` as required for Qt 5.6. We can compile as C++11 and still deploy to OS X 10.7. diff --git a/Utilities/Release/osx_release.cmake b/Utilities/Release/osx_release.cmake index 35705ed..e7e5ba4 100644 --- a/Utilities/Release/osx_release.cmake +++ b/Utilities/Release/osx_release.cmake @@ -13,6 +13,8 @@ set(CFLAGS "") set(CXXFLAGS "-stdlib=libc++") set(INITIAL_CACHE " CMAKE_BUILD_TYPE:STRING=Release +CMAKE_C_STANDARD:STRING=11 +CMAKE_CXX_STANDARD:STRING=11 CMAKE_OSX_ARCHITECTURES:STRING=x86_64 CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE @@ -21,8 +23,6 @@ BUILD_QtDialog:BOOL=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3 CMake_INSTALL_DEPENDENCIES:BOOL=ON CMAKE_SKIP_RPATH:BOOL=TRUE -CMake_NO_C_STANDARD:BOOL=TRUE -CMake_NO_CXX_STANDARD:BOOL=TRUE CMake_TEST_NO_FindPackageModeMakefileTest:BOOL=TRUE ") set(ENV [[ ----------------------------------------------------------------------- Summary of changes: Utilities/Release/osx_release.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Jul 1 15:37:13 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 1 Jul 2016 15:37:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-654-g210d3b3 Message-ID: <20160701193714.B0A86F3D12@public.kitware.com> 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 210d3b38dfc195bf35d3a66054713b13642ebdf9 (commit) via 4d69023253723eec011bb5a6b8c62c9351148915 (commit) via 3643390d49b567214f9008091aa0e1f4ebe7782a (commit) from 4856cde243efc07419d7027497457a858f2b5d4f (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=210d3b38dfc195bf35d3a66054713b13642ebdf9 commit 210d3b38dfc195bf35d3a66054713b13642ebdf9 Merge: 4856cde 4d69023 Author: Brad King AuthorDate: Fri Jul 1 15:37:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Jul 1 15:37:06 2016 -0400 Merge topic 'toolchain-flag-init' into next 4d690232 Honor CMAKE__FLAGS[_]_INIT set in toolchain files 3643390d Strip CMAKE__FLAGS[_] initializer whitespace https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d69023253723eec011bb5a6b8c62c9351148915 commit 4d69023253723eec011bb5a6b8c62c9351148915 Author: Brad King AuthorDate: Fri Jul 1 14:17:26 2016 -0400 Commit: Brad King CommitDate: Fri Jul 1 15:13:40 2016 -0400 Honor CMAKE__FLAGS[_]_INIT set in toolchain files Document these variables. Change our convention for setting these variables from: set(CMAKE_C_FLAGS_INIT "...") to string(APPEND CMAKE_C_FLAGS_INIT " ...") so that any value previously set by a toolchain file will be used. Automate the conversion with: sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \ Modules/Compiler/*.cmake Modules/Platform/*.cmake and follow up with some manual fixes (e.g. to cases that already meant to append). Also revert the automated changes to contexts that are not protected from running multiple times. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 36d00dc..e134a1a 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -344,10 +344,15 @@ Variables for Languages /variable/CMAKE_LANG_CREATE_SHARED_MODULE /variable/CMAKE_LANG_CREATE_STATIC_LIBRARY /variable/CMAKE_LANG_FLAGS_DEBUG + /variable/CMAKE_LANG_FLAGS_DEBUG_INIT /variable/CMAKE_LANG_FLAGS_MINSIZEREL + /variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT /variable/CMAKE_LANG_FLAGS_RELEASE + /variable/CMAKE_LANG_FLAGS_RELEASE_INIT /variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO + /variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT /variable/CMAKE_LANG_FLAGS + /variable/CMAKE_LANG_FLAGS_INIT /variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG /variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL /variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE diff --git a/Help/release/dev/toolchain-flag-init.rst b/Help/release/dev/toolchain-flag-init.rst new file mode 100644 index 0000000..251484b --- /dev/null +++ b/Help/release/dev/toolchain-flag-init.rst @@ -0,0 +1,7 @@ +toolchain-flag-init +------------------- + +* :variable:`Toolchain files ` may now set a + :variable:`CMAKE__FLAGS_INIT` variable to initialize the + :variable:`CMAKE__FLAGS` cache entry the first time a language is + enabled in a build tree. diff --git a/Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst new file mode 100644 index 0000000..dcddb2e --- /dev/null +++ b/Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst @@ -0,0 +1,10 @@ +CMAKE__FLAGS_DEBUG_INIT +----------------------------- + +Value used to initialize the :variable:`CMAKE__FLAGS_DEBUG` cache +entry the first time a build tree is configured for language ````. +This variable is meant to be set by a :variable:`toolchain file +`. CMake may prepend or append content to +the value based on the environment and target platform. + +See also :variable:`CMAKE__FLAGS_INIT`. diff --git a/Help/variable/CMAKE_LANG_FLAGS_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_INIT.rst new file mode 100644 index 0000000..1d32cc3 --- /dev/null +++ b/Help/variable/CMAKE_LANG_FLAGS_INIT.rst @@ -0,0 +1,15 @@ +CMAKE__FLAGS_INIT +----------------------- + +Value used to initialize the :variable:`CMAKE__FLAGS` cache entry +the first time a build tree is configured for language ````. +This variable is meant to be set by a :variable:`toolchain file +`. CMake may prepend or append content to +the value based on the environment and target platform. + +See also the configuration-specific variables: + +* :variable:`CMAKE__FLAGS_DEBUG_INIT` +* :variable:`CMAKE__FLAGS_RELEASE_INIT` +* :variable:`CMAKE__FLAGS_MINSIZEREL_INIT` +* :variable:`CMAKE__FLAGS_RELWITHDEBINFO_INIT` diff --git a/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst new file mode 100644 index 0000000..c0aedf4 --- /dev/null +++ b/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst @@ -0,0 +1,10 @@ +CMAKE__FLAGS_MINSIZEREL_INIT +---------------------------------- + +Value used to initialize the :variable:`CMAKE__FLAGS_MINSIZEREL` +cache entry the first time a build tree is configured for language ````. +This variable is meant to be set by a :variable:`toolchain file +`. CMake may prepend or append content to +the value based on the environment and target platform. + +See also :variable:`CMAKE__FLAGS_INIT`. diff --git a/Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst new file mode 100644 index 0000000..59f92ff --- /dev/null +++ b/Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst @@ -0,0 +1,10 @@ +CMAKE__FLAGS_RELEASE_INIT +------------------------------- + +Value used to initialize the :variable:`CMAKE__FLAGS_RELEASE` +cache entry the first time a build tree is configured for language ````. +This variable is meant to be set by a :variable:`toolchain file +`. CMake may prepend or append content to +the value based on the environment and target platform. + +See also :variable:`CMAKE__FLAGS_INIT`. diff --git a/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst new file mode 100644 index 0000000..915f023 --- /dev/null +++ b/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst @@ -0,0 +1,10 @@ +CMAKE__FLAGS_RELWITHDEBINFO_INIT +-------------------------------------- + +Value used to initialize the :variable:`CMAKE__FLAGS_RELWITHDEBINFO` +cache entry the first time a build tree is configured for language ````. +This variable is meant to be set by a :variable:`toolchain file +`. CMake may prepend or append content to +the value based on the environment and target platform. + +See also :variable:`CMAKE__FLAGS_INIT`. diff --git a/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst b/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst index 9af0d97..622278e 100644 --- a/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst +++ b/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst @@ -14,8 +14,10 @@ variables that must be set before CMake builds its first test project to check that the compiler for a language works. It should not be used to load a file in cases that a normal :command:`include` will work. Use it only as a last resort for behavior that cannot be achieved any -other way. For example, one may set ``CMAKE_C_FLAGS_INIT`` to change the -default value used to initialize :variable:`CMAKE_C_FLAGS _FLAGS>` +other way. For example, one may set the +:variable:`CMAKE_C_FLAGS_INIT _FLAGS_INIT>` variable +to change the default value used to initialize the +:variable:`CMAKE_C_FLAGS _FLAGS>` variable before it is cached. The override file should NOT be used to set anything that could be set after languages are enabled, such as variables like :variable:`CMAKE_RUNTIME_OUTPUT_DIRECTORY` that affect the placement of diff --git a/Modules/Compiler/ARMCC.cmake b/Modules/Compiler/ARMCC.cmake index 3cf628c..2ec75c3 100644 --- a/Modules/Compiler/ARMCC.cmake +++ b/Modules/Compiler/ARMCC.cmake @@ -20,11 +20,11 @@ set(CMAKE_AR "${CMAKE_ARMCC_AR}" CACHE FILEPATH "The ARMCC archiver" FORCE) mark_as_advanced(CMAKE_ARMCC_AR) macro(__compiler_armcc lang) - set(CMAKE_${lang}_FLAGS_INIT "") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Ospace -DNDEBUG") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-Otime -DNDEBUG") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + string(APPEND CMAKE_${lang}_FLAGS_INIT " ") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Ospace -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -Otime -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") set(CMAKE_${lang}_OUTPUT_EXTENSION ".o") set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1) diff --git a/Modules/Compiler/Absoft-Fortran.cmake b/Modules/Compiler/Absoft-Fortran.cmake index 2e1666f..da1fc80 100644 --- a/Modules/Compiler/Absoft-Fortran.cmake +++ b/Modules/Compiler/Absoft-Fortran.cmake @@ -1,8 +1,8 @@ -set(CMAKE_Fortran_FLAGS_INIT "") -set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") -set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "") -set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") -set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +string(APPEND CMAKE_Fortran_FLAGS_INIT " ") +string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " ") +string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3") +string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") set(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=") set(CMAKE_Fortran_MODPATH_FLAG "-p") set(CMAKE_Fortran_VERBOSE_FLAG "-v") diff --git a/Modules/Compiler/Bruce-C.cmake b/Modules/Compiler/Bruce-C.cmake index 23676ec..cfabe65 100644 --- a/Modules/Compiler/Bruce-C.cmake +++ b/Modules/Compiler/Bruce-C.cmake @@ -1,7 +1,7 @@ # Bruce C Compiler ignores "-g" flag and optimization cannot be # enabled here (it is implemented only for 8086 target). -set (CMAKE_C_FLAGS_INIT "-D__CLASSIC_C__") -set (CMAKE_C_FLAGS_DEBUG_INIT "-g") -set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG") -set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG") -set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_INIT " -D__CLASSIC_C__") +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG") diff --git a/Modules/Compiler/G95-Fortran.cmake b/Modules/Compiler/G95-Fortran.cmake index fd84848..2c83fb8 100644 --- a/Modules/Compiler/G95-Fortran.cmake +++ b/Modules/Compiler/G95-Fortran.cmake @@ -1,8 +1,8 @@ -set(CMAKE_Fortran_FLAGS_INIT "") -set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") -set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") -set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") -set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +string(APPEND CMAKE_Fortran_FLAGS_INIT " ") +string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os") +string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3") +string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") set(CMAKE_Fortran_MODDIR_FLAG "-fmod=") set(CMAKE_Fortran_VERBOSE_FLAG "-v") set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form") diff --git a/Modules/Compiler/GHS-C.cmake b/Modules/Compiler/GHS-C.cmake index 3072715..c30bdec 100644 --- a/Modules/Compiler/GHS-C.cmake +++ b/Modules/Compiler/GHS-C.cmake @@ -3,11 +3,11 @@ include(Compiler/GHS) set(CMAKE_C_VERBOSE_FLAG "-v") set(CMAKE_C_OUTPUT_EXTENSION ".o") -set(CMAKE_C_FLAGS_INIT "") -set(CMAKE_C_FLAGS_DEBUG_INIT "-Odebug -g") -set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Ospace") -set(CMAKE_C_FLAGS_RELEASE_INIT "-O") -set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O -g") +string(APPEND CMAKE_C_FLAGS_INIT " ") +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -Odebug -g") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -Ospace") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -O") +string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -O -g") set(CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT "-ldebug ${CMAKE_C_FLAGS_DEBUG_INIT}") set(CMAKE_C_GHS_KERNEL_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT}") diff --git a/Modules/Compiler/GHS-CXX.cmake b/Modules/Compiler/GHS-CXX.cmake index a51591b..b3018a7 100644 --- a/Modules/Compiler/GHS-CXX.cmake +++ b/Modules/Compiler/GHS-CXX.cmake @@ -3,11 +3,11 @@ include(Compiler/GHS) set(CMAKE_CXX_VERBOSE_FLAG "-v") set(CMAKE_CXX_OUTPUT_EXTENSION ".o") -set(CMAKE_CXX_FLAGS_INIT "") -set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Odebug -g") -set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Ospace") -set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O -g") +string(APPEND CMAKE_CXX_FLAGS_INIT " ") +string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -Odebug -g") +string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -Ospace") +string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -O") +string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -O -g") set(CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT "-ldebug ${CMAKE_CXX_FLAGS_DEBUG_INIT}") diff --git a/Modules/Compiler/GNU-Fortran.cmake b/Modules/Compiler/GNU-Fortran.cmake index e9c8a59..fc848ac 100644 --- a/Modules/Compiler/GNU-Fortran.cmake +++ b/Modules/Compiler/GNU-Fortran.cmake @@ -5,8 +5,8 @@ set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form") # No -DNDEBUG for Fortran. -set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") -set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") +string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os") +string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3") # No -isystem for Fortran because it will not find .mod files. unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran) diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index c2d393d..34d4eaf 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -45,11 +45,11 @@ macro(__compiler_gnu lang) endif() # Initial configuration flags. - set(CMAKE_${lang}_FLAGS_INIT "") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_INIT " ") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462 diff --git a/Modules/Compiler/Intel-ASM.cmake b/Modules/Compiler/Intel-ASM.cmake index 74ceb0a..aee3dc2 100644 --- a/Modules/Compiler/Intel-ASM.cmake +++ b/Modules/Compiler/Intel-ASM.cmake @@ -1,10 +1,10 @@ set(CMAKE_ASM_VERBOSE_FLAG "-v") -set(CMAKE_ASM_FLAGS_INIT "") -set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g") -set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") -set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") -set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_INIT " ") +string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") if(UNIX) set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S) diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index eb9602a..e9e6334 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -1,10 +1,10 @@ set(CMAKE_C_VERBOSE_FLAG "-v") -set(CMAKE_C_FLAGS_INIT "") -set(CMAKE_C_FLAGS_DEBUG_INIT "-g") -set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") -set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") -set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_INIT " ") +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") set(CMAKE_DEPFILE_FLAGS_C "-MD -MT -MF ") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 369e041..0855af5 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -1,10 +1,10 @@ set(CMAKE_CXX_VERBOSE_FLAG "-v") -set(CMAKE_CXX_FLAGS_INIT "") -set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") -set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_INIT " ") +string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT -MF ") diff --git a/Modules/Compiler/Intel-Fortran.cmake b/Modules/Compiler/Intel-Fortran.cmake index 671d284..d3edd87 100644 --- a/Modules/Compiler/Intel-Fortran.cmake +++ b/Modules/Compiler/Intel-Fortran.cmake @@ -1,8 +1,8 @@ -set(CMAKE_Fortran_FLAGS_INIT "") -set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") -set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") -set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") -set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +string(APPEND CMAKE_Fortran_FLAGS_INIT " ") +string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os") +string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3") +string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") set(CMAKE_Fortran_MODDIR_FLAG "-module ") set(CMAKE_Fortran_VERBOSE_FLAG "-v") set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed") diff --git a/Modules/Compiler/PGI-C.cmake b/Modules/Compiler/PGI-C.cmake index da88c01..85d6e7e 100644 --- a/Modules/Compiler/PGI-C.cmake +++ b/Modules/Compiler/PGI-C.cmake @@ -1,4 +1,4 @@ include(Compiler/PGI) __compiler_pgi(C) -set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG") -set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") diff --git a/Modules/Compiler/PGI-CXX.cmake b/Modules/Compiler/PGI-CXX.cmake index 97c9555..896e298 100644 --- a/Modules/Compiler/PGI-CXX.cmake +++ b/Modules/Compiler/PGI-CXX.cmake @@ -1,4 +1,4 @@ include(Compiler/PGI) __compiler_pgi(CXX) -set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG") diff --git a/Modules/Compiler/PGI-Fortran.cmake b/Modules/Compiler/PGI-Fortran.cmake index 2866254..3765079 100644 --- a/Modules/Compiler/PGI-Fortran.cmake +++ b/Modules/Compiler/PGI-Fortran.cmake @@ -4,7 +4,7 @@ __compiler_pgi(Fortran) set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform") -set(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee") -set(CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT} -Mbounds") +string(APPEND CMAKE_Fortran_FLAGS_INIT " -Mpreprocess -Kieee") +string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -Mbounds") set(CMAKE_Fortran_MODDIR_FLAG "-module ") diff --git a/Modules/Compiler/PGI.cmake b/Modules/Compiler/PGI.cmake index 797945f..51069c2 100644 --- a/Modules/Compiler/PGI.cmake +++ b/Modules/Compiler/PGI.cmake @@ -23,11 +23,11 @@ macro(__compiler_pgi lang) set(CMAKE_${lang}_VERBOSE_FLAG "-v") # Initial configuration flags. - set(CMAKE_${lang}_FLAGS_INIT "") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g -O0") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O2 -s") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-fast -O3 -Mipa=fast") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -gopt") + string(APPEND CMAKE_${lang}_FLAGS_INIT " ") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O2 -s") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -fast -O3 -Mipa=fast") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -gopt") # Preprocessing and assembly rules. set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") diff --git a/Modules/Compiler/PathScale-C.cmake b/Modules/Compiler/PathScale-C.cmake index 9db54af..94c7d08 100644 --- a/Modules/Compiler/PathScale-C.cmake +++ b/Modules/Compiler/PathScale-C.cmake @@ -1,4 +1,4 @@ include(Compiler/PathScale) __compiler_pathscale(C) -set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG") -set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") diff --git a/Modules/Compiler/PathScale-CXX.cmake b/Modules/Compiler/PathScale-CXX.cmake index 4dd7660..276b81b 100644 --- a/Modules/Compiler/PathScale-CXX.cmake +++ b/Modules/Compiler/PathScale-CXX.cmake @@ -1,4 +1,4 @@ include(Compiler/PathScale) __compiler_pathscale(CXX) -set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG") diff --git a/Modules/Compiler/PathScale.cmake b/Modules/Compiler/PathScale.cmake index 107f779..09ee2ba 100644 --- a/Modules/Compiler/PathScale.cmake +++ b/Modules/Compiler/PathScale.cmake @@ -23,9 +23,9 @@ macro(__compiler_pathscale lang) set(CMAKE_${lang}_VERBOSE_FLAG "-v") # Initial configuration flags. - set(CMAKE_${lang}_FLAGS_INIT "") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g -O0") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-g -O2") + string(APPEND CMAKE_${lang}_FLAGS_INIT " ") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g -O2") endmacro() diff --git a/Modules/Compiler/SunPro-ASM.cmake b/Modules/Compiler/SunPro-ASM.cmake index 2fa8b99..0d67400 100644 --- a/Modules/Compiler/SunPro-ASM.cmake +++ b/Modules/Compiler/SunPro-ASM.cmake @@ -8,11 +8,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG "-R") set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h") -set(CMAKE_ASM_FLAGS_INIT "") -set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g") -set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") -set(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") -set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_INIT " ") +string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG") # Initialize ASM link type selection flags. These flags are used when # building a shared library, shared module, or executable that links diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake index c452983..503684a 100644 --- a/Modules/Compiler/SunPro-C.cmake +++ b/Modules/Compiler/SunPro-C.cmake @@ -7,11 +7,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R") set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h") -set(CMAKE_C_FLAGS_INIT "") -set(CMAKE_C_FLAGS_DEBUG_INIT "-g") -set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") -set(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") -set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_INIT " ") +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG") # Initialize C link type selection flags. These flags are used when # building a shared library, shared module, or executable that links diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake index b4a5591..ce01cdd 100644 --- a/Modules/Compiler/SunPro-CXX.cmake +++ b/Modules/Compiler/SunPro-CXX.cmake @@ -7,11 +7,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R") set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h") -set(CMAKE_CXX_FLAGS_INIT "") -set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") -set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_INIT " ") +string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG") # Initialize C link type selection flags. These flags are used when # building a shared library, shared module, or executable that links diff --git a/Modules/Compiler/SunPro-Fortran.cmake b/Modules/Compiler/SunPro-Fortran.cmake index 610e191..a0e07d4 100644 --- a/Modules/Compiler/SunPro-Fortran.cmake +++ b/Modules/Compiler/SunPro-Fortran.cmake @@ -10,11 +10,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-h") set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-R") -set(CMAKE_Fortran_FLAGS_INIT "") -set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") -set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") -set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") -set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") +string(APPEND CMAKE_Fortran_FLAGS_INIT " ") +string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG") +string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG") +string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG") set(CMAKE_Fortran_MODDIR_FLAG "-moddir=") set(CMAKE_Fortran_MODPATH_FLAG "-M") diff --git a/Modules/Compiler/TinyCC-C.cmake b/Modules/Compiler/TinyCC-C.cmake index f7937ac..fbd2841 100644 --- a/Modules/Compiler/TinyCC-C.cmake +++ b/Modules/Compiler/TinyCC-C.cmake @@ -1,8 +1,8 @@ set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # no optimization in tcc: -set (CMAKE_C_FLAGS_INIT "") -set (CMAKE_C_FLAGS_DEBUG_INIT "-g") -set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG") -set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG") -set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_INIT " ") +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG") diff --git a/Modules/Compiler/XL-ASM.cmake b/Modules/Compiler/XL-ASM.cmake index 212179e..9177b39 100644 --- a/Modules/Compiler/XL-ASM.cmake +++ b/Modules/Compiler/XL-ASM.cmake @@ -2,11 +2,11 @@ set(CMAKE_ASM_VERBOSE_FLAG "-V") # -qthreaded = Ensures that all optimizations will be thread-safe # -qhalt=e = Halt on error messages (rather than just severe errors) -set(CMAKE_ASM_FLAGS_INIT "-qthreaded -qhalt=e -qsourcetype=assembler") +string(APPEND CMAKE_ASM_FLAGS_INIT " -qthreaded -qhalt=e -qsourcetype=assembler") -set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g") -set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG") -set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG") -set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -O -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -O -DNDEBUG") +string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG") set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s ) diff --git a/Modules/Compiler/XL-C.cmake b/Modules/Compiler/XL-C.cmake index 97dd017..f976c99 100644 --- a/Modules/Compiler/XL-C.cmake +++ b/Modules/Compiler/XL-C.cmake @@ -1,8 +1,8 @@ include(Compiler/XL) __compiler_xl(C) -set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG") -set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") # -qthreaded = Ensures that all optimizations will be thread-safe # -qhalt=e = Halt on error messages (rather than just severe errors) -set(CMAKE_C_FLAGS_INIT "-qthreaded -qhalt=e") +string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded -qhalt=e") diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake index 41372c1..545d657 100644 --- a/Modules/Compiler/XL-CXX.cmake +++ b/Modules/Compiler/XL-CXX.cmake @@ -1,11 +1,11 @@ include(Compiler/XL) __compiler_xl(CXX) -set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG") -set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG") # -qthreaded = Ensures that all optimizations will be thread-safe # -qhalt=e = Halt on error messages (rather than just severe errors) -set(CMAKE_CXX_FLAGS_INIT "-qthreaded -qhalt=e") +string(APPEND CMAKE_CXX_FLAGS_INIT " -qthreaded -qhalt=e") set(CMAKE_CXX_COMPILE_OBJECT " -+ -o -c ") diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake index ae9df4e..6bab6f6 100644 --- a/Modules/Compiler/XL-Fortran.cmake +++ b/Modules/Compiler/XL-Fortran.cmake @@ -10,7 +10,7 @@ set(CMAKE_Fortran_DEFINE_FLAG "-WF,-D") # -qthreaded = Ensures that all optimizations will be thread-safe # -qhalt=e = Halt on error messages (rather than just severe errors) -set(CMAKE_Fortran_FLAGS_INIT "-qthreaded -qhalt=e") +string(APPEND CMAKE_Fortran_FLAGS_INIT " -qthreaded -qhalt=e") # xlf: 1501-214 (W) command option E reserved for future use - ignored set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE) diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake index bf4f554..1f2b145 100644 --- a/Modules/Compiler/XL.cmake +++ b/Modules/Compiler/XL.cmake @@ -29,10 +29,10 @@ macro(__compiler_xl lang) set(CMAKE_${lang}_VERBOSE_FLAG "-V") set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-g") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/Platform/ARTOS-GNU-C.cmake b/Modules/Platform/ARTOS-GNU-C.cmake index 967d0e7..fe8d782 100644 --- a/Modules/Platform/ARTOS-GNU-C.cmake +++ b/Modules/Platform/ARTOS-GNU-C.cmake @@ -1,9 +1,9 @@ # Define ARTOS to select proper behaviour and tell preprocessor to accept C++ style comments. -set(CMAKE_C_FLAGS_INIT "-DARTOS -Xp -+") +string(APPEND CMAKE_C_FLAGS_INIT " -DARTOS -Xp -+") # ac doesn't support -g properly and doesn't support the normal gcc optimization options. Just use the defaults set by ac. -set(CMAKE_C_FLAGS_DEBUG_INIT "") -set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG") -set(CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG") -set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-DNDEBUG") +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") +string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG") # Most projects expect the stdio functions to be available. set(CMAKE_C_STANDARD_LIBRARIES_INIT "stdio.a") diff --git a/Modules/Platform/Generic-ADSP-C.cmake b/Modules/Platform/Generic-ADSP-C.cmake index 4b9ed9d..de1cee2 100644 --- a/Modules/Platform/Generic-ADSP-C.cmake +++ b/Modules/Platform/Generic-ADSP-C.cmake @@ -4,10 +4,10 @@ include(Platform/Generic-ADSP-Common) set(CMAKE_C_OUTPUT_EXTENSION ".doj") -set(CMAKE_C_FLAGS_DEBUG_INIT "-g") -set(CMAKE_C_FLAGS_MINSIZEREL_INIT "") -set(CMAKE_C_FLAGS_RELEASE_INIT "") -set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "") +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " ") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ") +string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " ") set(CMAKE_C_CREATE_STATIC_LIBRARY " -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") diff --git a/Modules/Platform/Generic-ADSP-CXX.cmake b/Modules/Platform/Generic-ADSP-CXX.cmake index 9673aef..0cde8f2 100644 --- a/Modules/Platform/Generic-ADSP-CXX.cmake +++ b/Modules/Platform/Generic-ADSP-CXX.cmake @@ -2,10 +2,10 @@ include(Platform/Generic-ADSP-Common) set(CMAKE_CXX_OUTPUT_EXTENSION ".doj") -set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") -set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "") -set(CMAKE_CXX_FLAGS_RELEASE_INIT "") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "") +string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " ") +string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ") +string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " ") set(CMAKE_CXX_CREATE_STATIC_LIBRARY " -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake index a1ca812..bbefe19 100644 --- a/Modules/Platform/Generic-SDCC-C.cmake +++ b/Modules/Platform/Generic-SDCC-C.cmake @@ -30,7 +30,7 @@ set(CMAKE_AR "${SDCCLIB_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE) # CMAKE_C_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT should be set in a CMAKE_SYSTEM_PROCESSOR file if(NOT DEFINED CMAKE_C_FLAGS_INIT) - set(CMAKE_C_FLAGS_INIT "-mmcs51 --model-small") + string(APPEND CMAKE_C_FLAGS_INIT " -mmcs51 --model-small") endif() if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) diff --git a/Modules/Platform/HP-UX-HP-CXX.cmake b/Modules/Platform/HP-UX-HP-CXX.cmake index 6d90191..d37d2b0 100644 --- a/Modules/Platform/HP-UX-HP-CXX.cmake +++ b/Modules/Platform/HP-UX-HP-CXX.cmake @@ -8,7 +8,7 @@ set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "rm -f `basename \"\" | sed 's/\\.[^./]*$$//'`.o" ) -set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") -set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g") +string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " +O3 -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " +O2 -DNDEBUG") +string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g") diff --git a/Modules/Platform/HP-UX-HP.cmake b/Modules/Platform/HP-UX-HP.cmake index 3935c31..398d6fb 100644 --- a/Modules/Platform/HP-UX-HP.cmake +++ b/Modules/Platform/HP-UX-HP.cmake @@ -27,7 +27,7 @@ macro(__hpux_compiler_hp lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") - set(CMAKE_${lang}_FLAGS_INIT "") + string(APPEND CMAKE_${lang}_FLAGS_INIT " ") set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") endmacro() diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake index 102e3a6..8a87db3 100644 --- a/Modules/Platform/Windows-Embarcadero.cmake +++ b/Modules/Platform/Windows-Embarcadero.cmake @@ -132,10 +132,10 @@ macro(__embarcadero_language lang) ) # Initial configuration flags. - set(CMAKE_${lang}_FLAGS_INIT "${_tM}") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-Od -v") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O1 -DNDEBUG") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-Od") + string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_tM}") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -Od -v") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O1 -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2 -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Od") set(CMAKE_${lang}_STANDARD_LIBRARIES_INIT "import32.lib") endmacro() diff --git a/Modules/Platform/Windows-Intel-Fortran.cmake b/Modules/Platform/Windows-Intel-Fortran.cmake index 1b93db8..3981a09 100644 --- a/Modules/Platform/Windows-Intel-Fortran.cmake +++ b/Modules/Platform/Windows-Intel-Fortran.cmake @@ -4,8 +4,8 @@ set(_COMPILE_Fortran " /fpp") set(CMAKE_Fortran_MODDIR_FLAG "-module:") set(CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib") __windows_compiler_intel(Fortran) -set (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads") -set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/Od /debug:full /dbglibs") -set (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O1 /DNDEBUG") -set (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O2 /DNDEBUG") -set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /debug:full /DNDEBUG") +string(APPEND CMAKE_Fortran_FLAGS_INIT " /W1 /nologo /fpp /libs:dll /threads") +string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " /Od /debug:full /dbglibs") +string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " /O1 /DNDEBUG") +string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " /O2 /DNDEBUG") +string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " /O2 /debug:full /DNDEBUG") diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 6c254ed..fd242af 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -301,17 +301,17 @@ macro(__windows_compiler_msvc lang) if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*") # note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects # that include MS's own headers. CMake itself is affected project too. - set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD -O2 -DNDEBUG") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD -gline-tables-only -O2 -fno-inline -DNDEBUG") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD -DNDEBUG") # TODO: Add '-Os' once VS generator maps it properly for Clang + string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " /MD -O2 -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " /MD -gline-tables-only -O2 -fno-inline -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " /MD -DNDEBUG") # TODO: Add '-Os' once VS generator maps it properly for Clang else() - set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") - set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /DNDEBUG") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /DNDEBUG") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " /D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " /MD /O2 /Ob2 /DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " /MD /Zi /O2 /Ob1 /DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " /MD /O1 /Ob1 /DNDEBUG") endif() set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON) set(CMAKE_NINJA_DEPTYPE_${lang} msvc) @@ -320,7 +320,7 @@ macro(__windows_compiler_msvc lang) set(CMAKE_RC_COMPILER_INIT rc) endif() if(NOT CMAKE_RC_FLAGS_INIT) - set(CMAKE_RC_FLAGS_INIT "${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}") + string(APPEND CMAKE_RC_FLAGS_INIT " ${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}") endif() enable_language(RC) diff --git a/Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt b/Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt new file mode 100644 index 0000000..9969a25 --- /dev/null +++ b/Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt @@ -0,0 +1,10 @@ +-- CMAKE_C_FLAGS='-DMY_FLAGS_INIT[^']*' +-- CMAKE_C_FLAGS_DEBUG='-DMY_FLAGS_DEBUG_INIT[^']*' +-- CMAKE_C_FLAGS_RELEASE='-DMY_FLAGS_RELEASE_INIT[^']*' +-- CMAKE_C_FLAGS_MINSIZEREL='-DMY_FLAGS_MINSIZEREL_INIT[^']*' +-- CMAKE_C_FLAGS_RELWITHDEBINFO='-DMY_FLAGS_RELWITHDEBINFO_INIT[^']*' +-- CMAKE_CXX_FLAGS='-DMY_FLAGS_INIT[^']*' +-- CMAKE_CXX_FLAGS_DEBUG='-DMY_FLAGS_DEBUG_INIT[^']*' +-- CMAKE_CXX_FLAGS_RELEASE='-DMY_FLAGS_RELEASE_INIT[^']*' +-- CMAKE_CXX_FLAGS_MINSIZEREL='-DMY_FLAGS_MINSIZEREL_INIT[^']*' +-- CMAKE_CXX_FLAGS_RELWITHDEBINFO='-DMY_FLAGS_RELWITHDEBINFO_INIT[^']*' diff --git a/Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake b/Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake new file mode 100644 index 0000000..4c794b6 --- /dev/null +++ b/Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake @@ -0,0 +1,7 @@ +foreach(lang C CXX) + set(CMAKE_${lang}_FLAGS_INIT -DMY_FLAGS_INIT) + set(CMAKE_${lang}_FLAGS_DEBUG_INIT -DMY_FLAGS_DEBUG_INIT) + set(CMAKE_${lang}_FLAGS_RELEASE_INIT -DMY_FLAGS_RELEASE_INIT) + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT -DMY_FLAGS_MINSIZEREL_INIT) + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT -DMY_FLAGS_RELWITHDEBINFO_INIT) +endforeach() diff --git a/Tests/RunCMake/ToolchainFile/FlagsInit.cmake b/Tests/RunCMake/ToolchainFile/FlagsInit.cmake new file mode 100644 index 0000000..98873bf --- /dev/null +++ b/Tests/RunCMake/ToolchainFile/FlagsInit.cmake @@ -0,0 +1,7 @@ +enable_language(C) +enable_language(CXX) +foreach(lang C CXX) + foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) + message(STATUS "CMAKE_${lang}_FLAGS${c}='${CMAKE_${lang}_FLAGS${c}}'") + endforeach() +endforeach() diff --git a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake index 75293e7..88c8216 100644 --- a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake +++ b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake @@ -7,3 +7,4 @@ endfunction() run_cmake_toolchain(CallEnableLanguage) run_cmake_toolchain(CallProject) +run_cmake_toolchain(FlagsInit) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3643390d49b567214f9008091aa0e1f4ebe7782a commit 3643390d49b567214f9008091aa0e1f4ebe7782a Author: Brad King AuthorDate: Fri Jul 1 13:52:10 2016 -0400 Commit: Brad King CommitDate: Fri Jul 1 14:01:41 2016 -0400 Strip CMAKE__FLAGS[_] initializer whitespace diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake index 0e547c4..1bb16ac 100644 --- a/Modules/CMakeASMInformation.cmake +++ b/Modules/CMakeASMInformation.cmake @@ -76,10 +76,11 @@ endif() # Support for CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT and friends: set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}") -# avoid just having a space as the initial value for the cache -if(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ") - set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT) -endif() + +foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) + string(STRIP "${CMAKE_ASM${ASM_DIALECT}_FLAGS${c}_INIT}" CMAKE_ASM${ASM_DIALECT}_FLAGS${c}_INIT) +endforeach() + set (CMAKE_ASM${ASM_DIALECT}_FLAGS "${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}" CACHE STRING "Flags used by the assembler during all build types.") diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index fa87ca8..98eedc4 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -111,10 +111,11 @@ if(NOT CMAKE_MODULE_EXISTS) endif() set(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}") -# avoid just having a space as the initial value for the cache -if(CMAKE_C_FLAGS_INIT STREQUAL " ") - set(CMAKE_C_FLAGS_INIT) -endif() + +foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) + string(STRIP "${CMAKE_C_FLAGS${c}_INIT}" CMAKE_C_FLAGS${c}_INIT) +endforeach() + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING "Flags used by the compiler during all build types.") diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index b35280f..07e4f39 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -206,10 +206,11 @@ endforeach() # use _INIT variables so that this only happens the first time # and you can set these flags in the cmake cache set(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}") -# avoid just having a space as the initial value for the cache -if(CMAKE_CXX_FLAGS_INIT STREQUAL " ") - set(CMAKE_CXX_FLAGS_INIT) -endif() + +foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) + string(STRIP "${CMAKE_CXX_FLAGS${c}_INIT}" CMAKE_CXX_FLAGS${c}_INIT) +endforeach() + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING "Flags used by the compiler during all build types.") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 1fd0972..45dbfcc 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -173,10 +173,11 @@ endif() set(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.") set(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}") -# avoid just having a space as the initial value for the cache -if(CMAKE_Fortran_FLAGS_INIT STREQUAL " ") - set(CMAKE_Fortran_FLAGS_INIT) -endif() + +foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) + string(STRIP "${CMAKE_Fortran_FLAGS${c}_INIT}" CMAKE_Fortran_FLAGS${c}_INIT) +endforeach() + set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING "Flags for Fortran compiler.") diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake index 94abd4b..60276e2 100644 --- a/Modules/CMakeRCInformation.cmake +++ b/Modules/CMakeRCInformation.cmake @@ -28,9 +28,9 @@ set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +string(STRIP "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CMAKE_RC_FLAGS_INIT) - -set (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING +set (CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS_INIT}" CACHE STRING "Flags for Windows Resource Compiler.") # These are the only types of flags that should be passed to the rc ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 5 +++++ Help/release/dev/toolchain-flag-init.rst | 7 +++++++ Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst | 10 +++++++++ Help/variable/CMAKE_LANG_FLAGS_INIT.rst | 15 +++++++++++++ Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst | 10 +++++++++ Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst | 10 +++++++++ .../CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst | 10 +++++++++ Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst | 6 ++++-- Modules/CMakeASMInformation.cmake | 9 ++++---- Modules/CMakeCInformation.cmake | 9 ++++---- Modules/CMakeCXXInformation.cmake | 9 ++++---- Modules/CMakeFortranInformation.cmake | 9 ++++---- Modules/CMakeRCInformation.cmake | 4 ++-- Modules/Compiler/ARMCC.cmake | 10 ++++----- Modules/Compiler/Absoft-Fortran.cmake | 10 ++++----- Modules/Compiler/Bruce-C.cmake | 10 ++++----- Modules/Compiler/G95-Fortran.cmake | 10 ++++----- Modules/Compiler/GHS-C.cmake | 10 ++++----- Modules/Compiler/GHS-CXX.cmake | 10 ++++----- Modules/Compiler/GNU-Fortran.cmake | 4 ++-- Modules/Compiler/GNU.cmake | 10 ++++----- Modules/Compiler/Intel-ASM.cmake | 10 ++++----- Modules/Compiler/Intel-C.cmake | 10 ++++----- Modules/Compiler/Intel-CXX.cmake | 10 ++++----- Modules/Compiler/Intel-Fortran.cmake | 10 ++++----- Modules/Compiler/PGI-C.cmake | 4 ++-- Modules/Compiler/PGI-CXX.cmake | 4 ++-- Modules/Compiler/PGI-Fortran.cmake | 4 ++-- Modules/Compiler/PGI.cmake | 10 ++++----- Modules/Compiler/PathScale-C.cmake | 4 ++-- Modules/Compiler/PathScale-CXX.cmake | 4 ++-- Modules/Compiler/PathScale.cmake | 10 ++++----- Modules/Compiler/SunPro-ASM.cmake | 10 ++++----- Modules/Compiler/SunPro-C.cmake | 10 ++++----- Modules/Compiler/SunPro-CXX.cmake | 10 ++++----- Modules/Compiler/SunPro-Fortran.cmake | 10 ++++----- Modules/Compiler/TinyCC-C.cmake | 10 ++++----- Modules/Compiler/XL-ASM.cmake | 10 ++++----- Modules/Compiler/XL-C.cmake | 6 +++--- Modules/Compiler/XL-CXX.cmake | 6 +++--- Modules/Compiler/XL-Fortran.cmake | 2 +- Modules/Compiler/XL.cmake | 8 +++---- Modules/Platform/ARTOS-GNU-C.cmake | 10 ++++----- Modules/Platform/Generic-ADSP-C.cmake | 8 +++---- Modules/Platform/Generic-ADSP-CXX.cmake | 8 +++---- Modules/Platform/Generic-SDCC-C.cmake | 2 +- Modules/Platform/HP-UX-HP-CXX.cmake | 8 +++---- Modules/Platform/HP-UX-HP.cmake | 2 +- Modules/Platform/Windows-Embarcadero.cmake | 10 ++++----- Modules/Platform/Windows-Intel-Fortran.cmake | 10 ++++----- Modules/Platform/Windows-MSVC.cmake | 22 ++++++++++---------- Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt | 10 +++++++++ .../ToolchainFile/FlagsInit-toolchain.cmake | 7 +++++++ Tests/RunCMake/ToolchainFile/FlagsInit.cmake | 7 +++++++ Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake | 1 + 55 files changed, 276 insertions(+), 178 deletions(-) create mode 100644 Help/release/dev/toolchain-flag-init.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_INIT.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst create mode 100644 Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst create mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt create mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake create mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Sat Jul 2 00:01:10 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 2 Jul 2016 00:01:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.0-rc4-300-gb02814e Message-ID: <20160702040110.924CBF38AC@public.kitware.com> 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, master has been updated via b02814ed7464f11286db2d0038cc88c66ce18676 (commit) from 4c476cc9b2441f7cf36fd87c7c7338c373905678 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b02814ed7464f11286db2d0038cc88c66ce18676 commit b02814ed7464f11286db2d0038cc88c66ce18676 Author: Kitware Robot AuthorDate: Sat Jul 2 00:01:08 2016 -0400 Commit: Kitware Robot CommitDate: Sat Jul 2 00:01:08 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2a98911..2ff8100 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 6) -set(CMake_VERSION_PATCH 20160701) +set(CMake_VERSION_PATCH 20160702) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Jul 2 08:14:19 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 2 Jul 2016 08:14:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-656-gb47b0a9 Message-ID: <20160702121419.ABB2FF2311@public.kitware.com> 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 b47b0a9c02550b01322fd7c2563e4e5b39f1e300 (commit) via eae7dc325d5f68d2fd09340286439d8c04f45549 (commit) from 210d3b38dfc195bf35d3a66054713b13642ebdf9 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b47b0a9c02550b01322fd7c2563e4e5b39f1e300 commit b47b0a9c02550b01322fd7c2563e4e5b39f1e300 Merge: 210d3b3 eae7dc3 Author: Brad King AuthorDate: Sat Jul 2 08:14:18 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Jul 2 08:14:18 2016 -0400 Merge topic 'toolchain-flag-init' into next eae7dc32 Revert "Honor CMAKE__FLAGS[_]_INIT set in toolchain files" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eae7dc325d5f68d2fd09340286439d8c04f45549 commit eae7dc325d5f68d2fd09340286439d8c04f45549 Author: Brad King AuthorDate: Sat Jul 2 08:13:06 2016 -0400 Commit: Brad King CommitDate: Sat Jul 2 08:13:06 2016 -0400 Revert "Honor CMAKE__FLAGS[_]_INIT set in toolchain files" This reverts commit 4d69023253723eec011bb5a6b8c62c9351148915. Some set-not-append cases must be intentional and need to be found and refactored to preserve old flags. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index e134a1a..36d00dc 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -344,15 +344,10 @@ Variables for Languages /variable/CMAKE_LANG_CREATE_SHARED_MODULE /variable/CMAKE_LANG_CREATE_STATIC_LIBRARY /variable/CMAKE_LANG_FLAGS_DEBUG - /variable/CMAKE_LANG_FLAGS_DEBUG_INIT /variable/CMAKE_LANG_FLAGS_MINSIZEREL - /variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT /variable/CMAKE_LANG_FLAGS_RELEASE - /variable/CMAKE_LANG_FLAGS_RELEASE_INIT /variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO - /variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT /variable/CMAKE_LANG_FLAGS - /variable/CMAKE_LANG_FLAGS_INIT /variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG /variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL /variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE diff --git a/Help/release/dev/toolchain-flag-init.rst b/Help/release/dev/toolchain-flag-init.rst deleted file mode 100644 index 251484b..0000000 --- a/Help/release/dev/toolchain-flag-init.rst +++ /dev/null @@ -1,7 +0,0 @@ -toolchain-flag-init -------------------- - -* :variable:`Toolchain files ` may now set a - :variable:`CMAKE__FLAGS_INIT` variable to initialize the - :variable:`CMAKE__FLAGS` cache entry the first time a language is - enabled in a build tree. diff --git a/Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst deleted file mode 100644 index dcddb2e..0000000 --- a/Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst +++ /dev/null @@ -1,10 +0,0 @@ -CMAKE__FLAGS_DEBUG_INIT ------------------------------ - -Value used to initialize the :variable:`CMAKE__FLAGS_DEBUG` cache -entry the first time a build tree is configured for language ````. -This variable is meant to be set by a :variable:`toolchain file -`. CMake may prepend or append content to -the value based on the environment and target platform. - -See also :variable:`CMAKE__FLAGS_INIT`. diff --git a/Help/variable/CMAKE_LANG_FLAGS_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_INIT.rst deleted file mode 100644 index 1d32cc3..0000000 --- a/Help/variable/CMAKE_LANG_FLAGS_INIT.rst +++ /dev/null @@ -1,15 +0,0 @@ -CMAKE__FLAGS_INIT ------------------------ - -Value used to initialize the :variable:`CMAKE__FLAGS` cache entry -the first time a build tree is configured for language ````. -This variable is meant to be set by a :variable:`toolchain file -`. CMake may prepend or append content to -the value based on the environment and target platform. - -See also the configuration-specific variables: - -* :variable:`CMAKE__FLAGS_DEBUG_INIT` -* :variable:`CMAKE__FLAGS_RELEASE_INIT` -* :variable:`CMAKE__FLAGS_MINSIZEREL_INIT` -* :variable:`CMAKE__FLAGS_RELWITHDEBINFO_INIT` diff --git a/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst deleted file mode 100644 index c0aedf4..0000000 --- a/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst +++ /dev/null @@ -1,10 +0,0 @@ -CMAKE__FLAGS_MINSIZEREL_INIT ----------------------------------- - -Value used to initialize the :variable:`CMAKE__FLAGS_MINSIZEREL` -cache entry the first time a build tree is configured for language ````. -This variable is meant to be set by a :variable:`toolchain file -`. CMake may prepend or append content to -the value based on the environment and target platform. - -See also :variable:`CMAKE__FLAGS_INIT`. diff --git a/Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst deleted file mode 100644 index 59f92ff..0000000 --- a/Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst +++ /dev/null @@ -1,10 +0,0 @@ -CMAKE__FLAGS_RELEASE_INIT -------------------------------- - -Value used to initialize the :variable:`CMAKE__FLAGS_RELEASE` -cache entry the first time a build tree is configured for language ````. -This variable is meant to be set by a :variable:`toolchain file -`. CMake may prepend or append content to -the value based on the environment and target platform. - -See also :variable:`CMAKE__FLAGS_INIT`. diff --git a/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst b/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst deleted file mode 100644 index 915f023..0000000 --- a/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst +++ /dev/null @@ -1,10 +0,0 @@ -CMAKE__FLAGS_RELWITHDEBINFO_INIT --------------------------------------- - -Value used to initialize the :variable:`CMAKE__FLAGS_RELWITHDEBINFO` -cache entry the first time a build tree is configured for language ````. -This variable is meant to be set by a :variable:`toolchain file -`. CMake may prepend or append content to -the value based on the environment and target platform. - -See also :variable:`CMAKE__FLAGS_INIT`. diff --git a/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst b/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst index 622278e..9af0d97 100644 --- a/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst +++ b/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst @@ -14,10 +14,8 @@ variables that must be set before CMake builds its first test project to check that the compiler for a language works. It should not be used to load a file in cases that a normal :command:`include` will work. Use it only as a last resort for behavior that cannot be achieved any -other way. For example, one may set the -:variable:`CMAKE_C_FLAGS_INIT _FLAGS_INIT>` variable -to change the default value used to initialize the -:variable:`CMAKE_C_FLAGS _FLAGS>` variable +other way. For example, one may set ``CMAKE_C_FLAGS_INIT`` to change the +default value used to initialize :variable:`CMAKE_C_FLAGS _FLAGS>` before it is cached. The override file should NOT be used to set anything that could be set after languages are enabled, such as variables like :variable:`CMAKE_RUNTIME_OUTPUT_DIRECTORY` that affect the placement of diff --git a/Modules/Compiler/ARMCC.cmake b/Modules/Compiler/ARMCC.cmake index 2ec75c3..3cf628c 100644 --- a/Modules/Compiler/ARMCC.cmake +++ b/Modules/Compiler/ARMCC.cmake @@ -20,11 +20,11 @@ set(CMAKE_AR "${CMAKE_ARMCC_AR}" CACHE FILEPATH "The ARMCC archiver" FORCE) mark_as_advanced(CMAKE_ARMCC_AR) macro(__compiler_armcc lang) - string(APPEND CMAKE_${lang}_FLAGS_INIT " ") - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Ospace -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -Otime -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") + set(CMAKE_${lang}_FLAGS_INIT "") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Ospace -DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-Otime -DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") set(CMAKE_${lang}_OUTPUT_EXTENSION ".o") set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1) diff --git a/Modules/Compiler/Absoft-Fortran.cmake b/Modules/Compiler/Absoft-Fortran.cmake index da1fc80..2e1666f 100644 --- a/Modules/Compiler/Absoft-Fortran.cmake +++ b/Modules/Compiler/Absoft-Fortran.cmake @@ -1,8 +1,8 @@ -string(APPEND CMAKE_Fortran_FLAGS_INIT " ") -string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " ") -string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3") -string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") +set(CMAKE_Fortran_FLAGS_INIT "") +set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") +set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "") +set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") +set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") set(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=") set(CMAKE_Fortran_MODPATH_FLAG "-p") set(CMAKE_Fortran_VERBOSE_FLAG "-v") diff --git a/Modules/Compiler/Bruce-C.cmake b/Modules/Compiler/Bruce-C.cmake index cfabe65..23676ec 100644 --- a/Modules/Compiler/Bruce-C.cmake +++ b/Modules/Compiler/Bruce-C.cmake @@ -1,7 +1,7 @@ # Bruce C Compiler ignores "-g" flag and optimization cannot be # enabled here (it is implemented only for 8086 target). -string(APPEND CMAKE_C_FLAGS_INIT " -D__CLASSIC_C__") -string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG") +set (CMAKE_C_FLAGS_INIT "-D__CLASSIC_C__") +set (CMAKE_C_FLAGS_DEBUG_INIT "-g") +set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG") +set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG") +set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG") diff --git a/Modules/Compiler/G95-Fortran.cmake b/Modules/Compiler/G95-Fortran.cmake index 2c83fb8..fd84848 100644 --- a/Modules/Compiler/G95-Fortran.cmake +++ b/Modules/Compiler/G95-Fortran.cmake @@ -1,8 +1,8 @@ -string(APPEND CMAKE_Fortran_FLAGS_INIT " ") -string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os") -string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3") -string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") +set(CMAKE_Fortran_FLAGS_INIT "") +set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") +set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") +set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") +set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") set(CMAKE_Fortran_MODDIR_FLAG "-fmod=") set(CMAKE_Fortran_VERBOSE_FLAG "-v") set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form") diff --git a/Modules/Compiler/GHS-C.cmake b/Modules/Compiler/GHS-C.cmake index c30bdec..3072715 100644 --- a/Modules/Compiler/GHS-C.cmake +++ b/Modules/Compiler/GHS-C.cmake @@ -3,11 +3,11 @@ include(Compiler/GHS) set(CMAKE_C_VERBOSE_FLAG "-v") set(CMAKE_C_OUTPUT_EXTENSION ".o") -string(APPEND CMAKE_C_FLAGS_INIT " ") -string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -Odebug -g") -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -Ospace") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -O") -string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -O -g") +set(CMAKE_C_FLAGS_INIT "") +set(CMAKE_C_FLAGS_DEBUG_INIT "-Odebug -g") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Ospace") +set(CMAKE_C_FLAGS_RELEASE_INIT "-O") +set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O -g") set(CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT "-ldebug ${CMAKE_C_FLAGS_DEBUG_INIT}") set(CMAKE_C_GHS_KERNEL_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT}") diff --git a/Modules/Compiler/GHS-CXX.cmake b/Modules/Compiler/GHS-CXX.cmake index b3018a7..a51591b 100644 --- a/Modules/Compiler/GHS-CXX.cmake +++ b/Modules/Compiler/GHS-CXX.cmake @@ -3,11 +3,11 @@ include(Compiler/GHS) set(CMAKE_CXX_VERBOSE_FLAG "-v") set(CMAKE_CXX_OUTPUT_EXTENSION ".o") -string(APPEND CMAKE_CXX_FLAGS_INIT " ") -string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -Odebug -g") -string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -Ospace") -string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -O") -string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -O -g") +set(CMAKE_CXX_FLAGS_INIT "") +set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Odebug -g") +set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Ospace") +set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O -g") set(CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT "-ldebug ${CMAKE_CXX_FLAGS_DEBUG_INIT}") diff --git a/Modules/Compiler/GNU-Fortran.cmake b/Modules/Compiler/GNU-Fortran.cmake index fc848ac..e9c8a59 100644 --- a/Modules/Compiler/GNU-Fortran.cmake +++ b/Modules/Compiler/GNU-Fortran.cmake @@ -5,8 +5,8 @@ set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form") # No -DNDEBUG for Fortran. -string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os") -string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3") +set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") +set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") # No -isystem for Fortran because it will not find .mod files. unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran) diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index 34d4eaf..c2d393d 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -45,11 +45,11 @@ macro(__compiler_gnu lang) endif() # Initial configuration flags. - string(APPEND CMAKE_${lang}_FLAGS_INIT " ") - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") + set(CMAKE_${lang}_FLAGS_INIT "") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462 diff --git a/Modules/Compiler/Intel-ASM.cmake b/Modules/Compiler/Intel-ASM.cmake index aee3dc2..74ceb0a 100644 --- a/Modules/Compiler/Intel-ASM.cmake +++ b/Modules/Compiler/Intel-ASM.cmake @@ -1,10 +1,10 @@ set(CMAKE_ASM_VERBOSE_FLAG "-v") -string(APPEND CMAKE_ASM_FLAGS_INIT " ") -string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") -string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") -string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") +set(CMAKE_ASM_FLAGS_INIT "") +set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g") +set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") if(UNIX) set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S) diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index e9e6334..eb9602a 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -1,10 +1,10 @@ set(CMAKE_C_VERBOSE_FLAG "-v") -string(APPEND CMAKE_C_FLAGS_INIT " ") -string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") +set(CMAKE_C_FLAGS_INIT "") +set(CMAKE_C_FLAGS_DEBUG_INIT "-g") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") set(CMAKE_DEPFILE_FLAGS_C "-MD -MT -MF ") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 0855af5..369e041 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -1,10 +1,10 @@ set(CMAKE_CXX_VERBOSE_FLAG "-v") -string(APPEND CMAKE_CXX_FLAGS_INIT " ") -string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") +set(CMAKE_CXX_FLAGS_INIT "") +set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT -MF ") diff --git a/Modules/Compiler/Intel-Fortran.cmake b/Modules/Compiler/Intel-Fortran.cmake index d3edd87..671d284 100644 --- a/Modules/Compiler/Intel-Fortran.cmake +++ b/Modules/Compiler/Intel-Fortran.cmake @@ -1,8 +1,8 @@ -string(APPEND CMAKE_Fortran_FLAGS_INIT " ") -string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os") -string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3") -string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") +set(CMAKE_Fortran_FLAGS_INIT "") +set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") +set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") +set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") +set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") set(CMAKE_Fortran_MODDIR_FLAG "-module ") set(CMAKE_Fortran_VERBOSE_FLAG "-v") set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed") diff --git a/Modules/Compiler/PGI-C.cmake b/Modules/Compiler/PGI-C.cmake index 85d6e7e..da88c01 100644 --- a/Modules/Compiler/PGI-C.cmake +++ b/Modules/Compiler/PGI-C.cmake @@ -1,4 +1,4 @@ include(Compiler/PGI) __compiler_pgi(C) -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG") diff --git a/Modules/Compiler/PGI-CXX.cmake b/Modules/Compiler/PGI-CXX.cmake index 896e298..97c9555 100644 --- a/Modules/Compiler/PGI-CXX.cmake +++ b/Modules/Compiler/PGI-CXX.cmake @@ -1,4 +1,4 @@ include(Compiler/PGI) __compiler_pgi(CXX) -string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG") +set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG") diff --git a/Modules/Compiler/PGI-Fortran.cmake b/Modules/Compiler/PGI-Fortran.cmake index 3765079..2866254 100644 --- a/Modules/Compiler/PGI-Fortran.cmake +++ b/Modules/Compiler/PGI-Fortran.cmake @@ -4,7 +4,7 @@ __compiler_pgi(Fortran) set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform") -string(APPEND CMAKE_Fortran_FLAGS_INIT " -Mpreprocess -Kieee") -string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -Mbounds") +set(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee") +set(CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT} -Mbounds") set(CMAKE_Fortran_MODDIR_FLAG "-module ") diff --git a/Modules/Compiler/PGI.cmake b/Modules/Compiler/PGI.cmake index 51069c2..797945f 100644 --- a/Modules/Compiler/PGI.cmake +++ b/Modules/Compiler/PGI.cmake @@ -23,11 +23,11 @@ macro(__compiler_pgi lang) set(CMAKE_${lang}_VERBOSE_FLAG "-v") # Initial configuration flags. - string(APPEND CMAKE_${lang}_FLAGS_INIT " ") - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O2 -s") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -fast -O3 -Mipa=fast") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -gopt") + set(CMAKE_${lang}_FLAGS_INIT "") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g -O0") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O2 -s") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-fast -O3 -Mipa=fast") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -gopt") # Preprocessing and assembly rules. set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") diff --git a/Modules/Compiler/PathScale-C.cmake b/Modules/Compiler/PathScale-C.cmake index 94c7d08..9db54af 100644 --- a/Modules/Compiler/PathScale-C.cmake +++ b/Modules/Compiler/PathScale-C.cmake @@ -1,4 +1,4 @@ include(Compiler/PathScale) __compiler_pathscale(C) -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG") diff --git a/Modules/Compiler/PathScale-CXX.cmake b/Modules/Compiler/PathScale-CXX.cmake index 276b81b..4dd7660 100644 --- a/Modules/Compiler/PathScale-CXX.cmake +++ b/Modules/Compiler/PathScale-CXX.cmake @@ -1,4 +1,4 @@ include(Compiler/PathScale) __compiler_pathscale(CXX) -string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG") +set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG") diff --git a/Modules/Compiler/PathScale.cmake b/Modules/Compiler/PathScale.cmake index 09ee2ba..107f779 100644 --- a/Modules/Compiler/PathScale.cmake +++ b/Modules/Compiler/PathScale.cmake @@ -23,9 +23,9 @@ macro(__compiler_pathscale lang) set(CMAKE_${lang}_VERBOSE_FLAG "-v") # Initial configuration flags. - string(APPEND CMAKE_${lang}_FLAGS_INIT " ") - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g -O2") + set(CMAKE_${lang}_FLAGS_INIT "") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g -O0") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-g -O2") endmacro() diff --git a/Modules/Compiler/SunPro-ASM.cmake b/Modules/Compiler/SunPro-ASM.cmake index 0d67400..2fa8b99 100644 --- a/Modules/Compiler/SunPro-ASM.cmake +++ b/Modules/Compiler/SunPro-ASM.cmake @@ -8,11 +8,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG "-R") set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h") -string(APPEND CMAKE_ASM_FLAGS_INIT " ") -string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG") -string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG") -string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG") +set(CMAKE_ASM_FLAGS_INIT "") +set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g") +set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") +set(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") +set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") # Initialize ASM link type selection flags. These flags are used when # building a shared library, shared module, or executable that links diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake index 503684a..c452983 100644 --- a/Modules/Compiler/SunPro-C.cmake +++ b/Modules/Compiler/SunPro-C.cmake @@ -7,11 +7,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R") set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h") -string(APPEND CMAKE_C_FLAGS_INIT " ") -string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG") +set(CMAKE_C_FLAGS_INIT "") +set(CMAKE_C_FLAGS_DEBUG_INIT "-g") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") +set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") # Initialize C link type selection flags. These flags are used when # building a shared library, shared module, or executable that links diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake index ce01cdd..b4a5591 100644 --- a/Modules/Compiler/SunPro-CXX.cmake +++ b/Modules/Compiler/SunPro-CXX.cmake @@ -7,11 +7,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R") set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h") -string(APPEND CMAKE_CXX_FLAGS_INIT " ") -string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG") +set(CMAKE_CXX_FLAGS_INIT "") +set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") # Initialize C link type selection flags. These flags are used when # building a shared library, shared module, or executable that links diff --git a/Modules/Compiler/SunPro-Fortran.cmake b/Modules/Compiler/SunPro-Fortran.cmake index a0e07d4..610e191 100644 --- a/Modules/Compiler/SunPro-Fortran.cmake +++ b/Modules/Compiler/SunPro-Fortran.cmake @@ -10,11 +10,11 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-h") set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-R") -string(APPEND CMAKE_Fortran_FLAGS_INIT " ") -string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG") -string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG") -string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG") +set(CMAKE_Fortran_FLAGS_INIT "") +set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") +set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") +set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") +set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") set(CMAKE_Fortran_MODDIR_FLAG "-moddir=") set(CMAKE_Fortran_MODPATH_FLAG "-M") diff --git a/Modules/Compiler/TinyCC-C.cmake b/Modules/Compiler/TinyCC-C.cmake index fbd2841..f7937ac 100644 --- a/Modules/Compiler/TinyCC-C.cmake +++ b/Modules/Compiler/TinyCC-C.cmake @@ -1,8 +1,8 @@ set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # no optimization in tcc: -string(APPEND CMAKE_C_FLAGS_INIT " ") -string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG") +set (CMAKE_C_FLAGS_INIT "") +set (CMAKE_C_FLAGS_DEBUG_INIT "-g") +set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG") +set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG") +set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG") diff --git a/Modules/Compiler/XL-ASM.cmake b/Modules/Compiler/XL-ASM.cmake index 9177b39..212179e 100644 --- a/Modules/Compiler/XL-ASM.cmake +++ b/Modules/Compiler/XL-ASM.cmake @@ -2,11 +2,11 @@ set(CMAKE_ASM_VERBOSE_FLAG "-V") # -qthreaded = Ensures that all optimizations will be thread-safe # -qhalt=e = Halt on error messages (rather than just severe errors) -string(APPEND CMAKE_ASM_FLAGS_INIT " -qthreaded -qhalt=e -qsourcetype=assembler") +set(CMAKE_ASM_FLAGS_INIT "-qthreaded -qhalt=e -qsourcetype=assembler") -string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -O -DNDEBUG") -string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -O -DNDEBUG") -string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -g -DNDEBUG") +set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g") +set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG") +set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG") +set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG") set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s ) diff --git a/Modules/Compiler/XL-C.cmake b/Modules/Compiler/XL-C.cmake index f976c99..97dd017 100644 --- a/Modules/Compiler/XL-C.cmake +++ b/Modules/Compiler/XL-C.cmake @@ -1,8 +1,8 @@ include(Compiler/XL) __compiler_xl(C) -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT} -DNDEBUG") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG") # -qthreaded = Ensures that all optimizations will be thread-safe # -qhalt=e = Halt on error messages (rather than just severe errors) -string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded -qhalt=e") +set(CMAKE_C_FLAGS_INIT "-qthreaded -qhalt=e") diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake index 545d657..41372c1 100644 --- a/Modules/Compiler/XL-CXX.cmake +++ b/Modules/Compiler/XL-CXX.cmake @@ -1,11 +1,11 @@ include(Compiler/XL) __compiler_xl(CXX) -string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELEASE_INIT "${CMAKE_CXX_FLAGS_RELEASE_INIT} -DNDEBUG") +set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG") # -qthreaded = Ensures that all optimizations will be thread-safe # -qhalt=e = Halt on error messages (rather than just severe errors) -string(APPEND CMAKE_CXX_FLAGS_INIT " -qthreaded -qhalt=e") +set(CMAKE_CXX_FLAGS_INIT "-qthreaded -qhalt=e") set(CMAKE_CXX_COMPILE_OBJECT " -+ -o -c ") diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake index 6bab6f6..ae9df4e 100644 --- a/Modules/Compiler/XL-Fortran.cmake +++ b/Modules/Compiler/XL-Fortran.cmake @@ -10,7 +10,7 @@ set(CMAKE_Fortran_DEFINE_FLAG "-WF,-D") # -qthreaded = Ensures that all optimizations will be thread-safe # -qhalt=e = Halt on error messages (rather than just severe errors) -string(APPEND CMAKE_Fortran_FLAGS_INIT " -qthreaded -qhalt=e") +set(CMAKE_Fortran_FLAGS_INIT "-qthreaded -qhalt=e") # xlf: 1501-214 (W) command option E reserved for future use - ignored set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE) diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake index 1f2b145..bf4f554 100644 --- a/Modules/Compiler/XL.cmake +++ b/Modules/Compiler/XL.cmake @@ -29,10 +29,10 @@ macro(__compiler_xl lang) set(CMAKE_${lang}_VERBOSE_FLAG "-V") set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic") - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-g") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/Platform/ARTOS-GNU-C.cmake b/Modules/Platform/ARTOS-GNU-C.cmake index fe8d782..967d0e7 100644 --- a/Modules/Platform/ARTOS-GNU-C.cmake +++ b/Modules/Platform/ARTOS-GNU-C.cmake @@ -1,9 +1,9 @@ # Define ARTOS to select proper behaviour and tell preprocessor to accept C++ style comments. -string(APPEND CMAKE_C_FLAGS_INIT " -DARTOS -Xp -+") +set(CMAKE_C_FLAGS_INIT "-DARTOS -Xp -+") # ac doesn't support -g properly and doesn't support the normal gcc optimization options. Just use the defaults set by ac. -string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ") -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") -string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG") +set(CMAKE_C_FLAGS_DEBUG_INIT "") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG") +set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-DNDEBUG") # Most projects expect the stdio functions to be available. set(CMAKE_C_STANDARD_LIBRARIES_INIT "stdio.a") diff --git a/Modules/Platform/Generic-ADSP-C.cmake b/Modules/Platform/Generic-ADSP-C.cmake index de1cee2..4b9ed9d 100644 --- a/Modules/Platform/Generic-ADSP-C.cmake +++ b/Modules/Platform/Generic-ADSP-C.cmake @@ -4,10 +4,10 @@ include(Platform/Generic-ADSP-Common) set(CMAKE_C_OUTPUT_EXTENSION ".doj") -string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " ") -string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ") -string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " ") +set(CMAKE_C_FLAGS_DEBUG_INIT "-g") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "") +set(CMAKE_C_FLAGS_RELEASE_INIT "") +set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "") set(CMAKE_C_CREATE_STATIC_LIBRARY " -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") diff --git a/Modules/Platform/Generic-ADSP-CXX.cmake b/Modules/Platform/Generic-ADSP-CXX.cmake index 0cde8f2..9673aef 100644 --- a/Modules/Platform/Generic-ADSP-CXX.cmake +++ b/Modules/Platform/Generic-ADSP-CXX.cmake @@ -2,10 +2,10 @@ include(Platform/Generic-ADSP-Common) set(CMAKE_CXX_OUTPUT_EXTENSION ".doj") -string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " ") -string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ") -string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " ") +set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "") +set(CMAKE_CXX_FLAGS_RELEASE_INIT "") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "") set(CMAKE_CXX_CREATE_STATIC_LIBRARY " -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake index bbefe19..a1ca812 100644 --- a/Modules/Platform/Generic-SDCC-C.cmake +++ b/Modules/Platform/Generic-SDCC-C.cmake @@ -30,7 +30,7 @@ set(CMAKE_AR "${SDCCLIB_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE) # CMAKE_C_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT should be set in a CMAKE_SYSTEM_PROCESSOR file if(NOT DEFINED CMAKE_C_FLAGS_INIT) - string(APPEND CMAKE_C_FLAGS_INIT " -mmcs51 --model-small") + set(CMAKE_C_FLAGS_INIT "-mmcs51 --model-small") endif() if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) diff --git a/Modules/Platform/HP-UX-HP-CXX.cmake b/Modules/Platform/HP-UX-HP-CXX.cmake index d37d2b0..6d90191 100644 --- a/Modules/Platform/HP-UX-HP-CXX.cmake +++ b/Modules/Platform/HP-UX-HP-CXX.cmake @@ -8,7 +8,7 @@ set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "rm -f `basename \"\" | sed 's/\\.[^./]*$$//'`.o" ) -string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -g") -string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " +O3 -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " +O2 -DNDEBUG") -string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g") +set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g") diff --git a/Modules/Platform/HP-UX-HP.cmake b/Modules/Platform/HP-UX-HP.cmake index 398d6fb..3935c31 100644 --- a/Modules/Platform/HP-UX-HP.cmake +++ b/Modules/Platform/HP-UX-HP.cmake @@ -27,7 +27,7 @@ macro(__hpux_compiler_hp lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") - string(APPEND CMAKE_${lang}_FLAGS_INIT " ") + set(CMAKE_${lang}_FLAGS_INIT "") set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") endmacro() diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake index 8a87db3..102e3a6 100644 --- a/Modules/Platform/Windows-Embarcadero.cmake +++ b/Modules/Platform/Windows-Embarcadero.cmake @@ -132,10 +132,10 @@ macro(__embarcadero_language lang) ) # Initial configuration flags. - string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_tM}") - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -Od -v") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O1 -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O2 -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Od") + set(CMAKE_${lang}_FLAGS_INIT "${_tM}") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-Od -v") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O1 -DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-Od") set(CMAKE_${lang}_STANDARD_LIBRARIES_INIT "import32.lib") endmacro() diff --git a/Modules/Platform/Windows-Intel-Fortran.cmake b/Modules/Platform/Windows-Intel-Fortran.cmake index 3981a09..1b93db8 100644 --- a/Modules/Platform/Windows-Intel-Fortran.cmake +++ b/Modules/Platform/Windows-Intel-Fortran.cmake @@ -4,8 +4,8 @@ set(_COMPILE_Fortran " /fpp") set(CMAKE_Fortran_MODDIR_FLAG "-module:") set(CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib") __windows_compiler_intel(Fortran) -string(APPEND CMAKE_Fortran_FLAGS_INIT " /W1 /nologo /fpp /libs:dll /threads") -string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " /Od /debug:full /dbglibs") -string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " /O1 /DNDEBUG") -string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " /O2 /DNDEBUG") -string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " /O2 /debug:full /DNDEBUG") +set (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads") +set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/Od /debug:full /dbglibs") +set (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O1 /DNDEBUG") +set (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O2 /DNDEBUG") +set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /debug:full /DNDEBUG") diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index fd242af..6c254ed 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -301,17 +301,17 @@ macro(__windows_compiler_msvc lang) if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*") # note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects # that include MS's own headers. CMake itself is affected project too. - string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}") - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " /MD -O2 -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " /MD -gline-tables-only -O2 -fno-inline -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " /MD -DNDEBUG") # TODO: Add '-Os' once VS generator maps it properly for Clang + set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD -O2 -DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD -gline-tables-only -O2 -fno-inline -DNDEBUG") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD -DNDEBUG") # TODO: Add '-Os' once VS generator maps it properly for Clang else() - string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " /D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " /MD /O2 /Ob2 /DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " /MD /Zi /O2 /Ob1 /DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " /MD /O1 /Ob1 /DNDEBUG") + set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") + set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /DNDEBUG") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /DNDEBUG") endif() set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON) set(CMAKE_NINJA_DEPTYPE_${lang} msvc) @@ -320,7 +320,7 @@ macro(__windows_compiler_msvc lang) set(CMAKE_RC_COMPILER_INIT rc) endif() if(NOT CMAKE_RC_FLAGS_INIT) - string(APPEND CMAKE_RC_FLAGS_INIT " ${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}") + set(CMAKE_RC_FLAGS_INIT "${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}") endif() enable_language(RC) diff --git a/Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt b/Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt deleted file mode 100644 index 9969a25..0000000 --- a/Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt +++ /dev/null @@ -1,10 +0,0 @@ --- CMAKE_C_FLAGS='-DMY_FLAGS_INIT[^']*' --- CMAKE_C_FLAGS_DEBUG='-DMY_FLAGS_DEBUG_INIT[^']*' --- CMAKE_C_FLAGS_RELEASE='-DMY_FLAGS_RELEASE_INIT[^']*' --- CMAKE_C_FLAGS_MINSIZEREL='-DMY_FLAGS_MINSIZEREL_INIT[^']*' --- CMAKE_C_FLAGS_RELWITHDEBINFO='-DMY_FLAGS_RELWITHDEBINFO_INIT[^']*' --- CMAKE_CXX_FLAGS='-DMY_FLAGS_INIT[^']*' --- CMAKE_CXX_FLAGS_DEBUG='-DMY_FLAGS_DEBUG_INIT[^']*' --- CMAKE_CXX_FLAGS_RELEASE='-DMY_FLAGS_RELEASE_INIT[^']*' --- CMAKE_CXX_FLAGS_MINSIZEREL='-DMY_FLAGS_MINSIZEREL_INIT[^']*' --- CMAKE_CXX_FLAGS_RELWITHDEBINFO='-DMY_FLAGS_RELWITHDEBINFO_INIT[^']*' diff --git a/Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake b/Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake deleted file mode 100644 index 4c794b6..0000000 --- a/Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake +++ /dev/null @@ -1,7 +0,0 @@ -foreach(lang C CXX) - set(CMAKE_${lang}_FLAGS_INIT -DMY_FLAGS_INIT) - set(CMAKE_${lang}_FLAGS_DEBUG_INIT -DMY_FLAGS_DEBUG_INIT) - set(CMAKE_${lang}_FLAGS_RELEASE_INIT -DMY_FLAGS_RELEASE_INIT) - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT -DMY_FLAGS_MINSIZEREL_INIT) - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT -DMY_FLAGS_RELWITHDEBINFO_INIT) -endforeach() diff --git a/Tests/RunCMake/ToolchainFile/FlagsInit.cmake b/Tests/RunCMake/ToolchainFile/FlagsInit.cmake deleted file mode 100644 index 98873bf..0000000 --- a/Tests/RunCMake/ToolchainFile/FlagsInit.cmake +++ /dev/null @@ -1,7 +0,0 @@ -enable_language(C) -enable_language(CXX) -foreach(lang C CXX) - foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) - message(STATUS "CMAKE_${lang}_FLAGS${c}='${CMAKE_${lang}_FLAGS${c}}'") - endforeach() -endforeach() diff --git a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake index 88c8216..75293e7 100644 --- a/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake +++ b/Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake @@ -7,4 +7,3 @@ endfunction() run_cmake_toolchain(CallEnableLanguage) run_cmake_toolchain(CallProject) -run_cmake_toolchain(FlagsInit) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 5 ----- Help/release/dev/toolchain-flag-init.rst | 7 ------- Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst | 10 --------- Help/variable/CMAKE_LANG_FLAGS_INIT.rst | 15 ------------- Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst | 10 --------- Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst | 10 --------- .../CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst | 10 --------- Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst | 6 ++---- Modules/Compiler/ARMCC.cmake | 10 ++++----- Modules/Compiler/Absoft-Fortran.cmake | 10 ++++----- Modules/Compiler/Bruce-C.cmake | 10 ++++----- Modules/Compiler/G95-Fortran.cmake | 10 ++++----- Modules/Compiler/GHS-C.cmake | 10 ++++----- Modules/Compiler/GHS-CXX.cmake | 10 ++++----- Modules/Compiler/GNU-Fortran.cmake | 4 ++-- Modules/Compiler/GNU.cmake | 10 ++++----- Modules/Compiler/Intel-ASM.cmake | 10 ++++----- Modules/Compiler/Intel-C.cmake | 10 ++++----- Modules/Compiler/Intel-CXX.cmake | 10 ++++----- Modules/Compiler/Intel-Fortran.cmake | 10 ++++----- Modules/Compiler/PGI-C.cmake | 4 ++-- Modules/Compiler/PGI-CXX.cmake | 4 ++-- Modules/Compiler/PGI-Fortran.cmake | 4 ++-- Modules/Compiler/PGI.cmake | 10 ++++----- Modules/Compiler/PathScale-C.cmake | 4 ++-- Modules/Compiler/PathScale-CXX.cmake | 4 ++-- Modules/Compiler/PathScale.cmake | 10 ++++----- Modules/Compiler/SunPro-ASM.cmake | 10 ++++----- Modules/Compiler/SunPro-C.cmake | 10 ++++----- Modules/Compiler/SunPro-CXX.cmake | 10 ++++----- Modules/Compiler/SunPro-Fortran.cmake | 10 ++++----- Modules/Compiler/TinyCC-C.cmake | 10 ++++----- Modules/Compiler/XL-ASM.cmake | 10 ++++----- Modules/Compiler/XL-C.cmake | 6 +++--- Modules/Compiler/XL-CXX.cmake | 6 +++--- Modules/Compiler/XL-Fortran.cmake | 2 +- Modules/Compiler/XL.cmake | 8 +++---- Modules/Platform/ARTOS-GNU-C.cmake | 10 ++++----- Modules/Platform/Generic-ADSP-C.cmake | 8 +++---- Modules/Platform/Generic-ADSP-CXX.cmake | 8 +++---- Modules/Platform/Generic-SDCC-C.cmake | 2 +- Modules/Platform/HP-UX-HP-CXX.cmake | 8 +++---- Modules/Platform/HP-UX-HP.cmake | 2 +- Modules/Platform/Windows-Embarcadero.cmake | 10 ++++----- Modules/Platform/Windows-Intel-Fortran.cmake | 10 ++++----- Modules/Platform/Windows-MSVC.cmake | 22 ++++++++++---------- Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt | 10 --------- .../ToolchainFile/FlagsInit-toolchain.cmake | 7 ------- Tests/RunCMake/ToolchainFile/FlagsInit.cmake | 7 ------- Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake | 1 - 50 files changed, 160 insertions(+), 254 deletions(-) delete mode 100644 Help/release/dev/toolchain-flag-init.rst delete mode 100644 Help/variable/CMAKE_LANG_FLAGS_DEBUG_INIT.rst delete mode 100644 Help/variable/CMAKE_LANG_FLAGS_INIT.rst delete mode 100644 Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT.rst delete mode 100644 Help/variable/CMAKE_LANG_FLAGS_RELEASE_INIT.rst delete mode 100644 Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.rst delete mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit-stdout.txt delete mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit-toolchain.cmake delete mode 100644 Tests/RunCMake/ToolchainFile/FlagsInit.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Sun Jul 3 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 3 Jul 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.0-rc4-301-ga24cd65 Message-ID: <20160703040107.E50FCF3105@public.kitware.com> 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, master has been updated via a24cd6525ad656901b663f4d7bc0990db4c8c8ec (commit) from b02814ed7464f11286db2d0038cc88c66ce18676 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a24cd6525ad656901b663f4d7bc0990db4c8c8ec commit a24cd6525ad656901b663f4d7bc0990db4c8c8ec Author: Kitware Robot AuthorDate: Sun Jul 3 00:01:02 2016 -0400 Commit: Kitware Robot CommitDate: Sun Jul 3 00:01:02 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2ff8100..6de0a7a 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 6) -set(CMake_VERSION_PATCH 20160702) +set(CMake_VERSION_PATCH 20160703) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jul 4 00:01:05 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 4 Jul 2016 00:01:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.0-rc4-302-g7523267 Message-ID: <20160704040105.33FD3F3AD5@public.kitware.com> 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, master has been updated via 7523267ca0e1a6c45f3b7eed332bca6e35f32752 (commit) from a24cd6525ad656901b663f4d7bc0990db4c8c8ec (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7523267ca0e1a6c45f3b7eed332bca6e35f32752 commit 7523267ca0e1a6c45f3b7eed332bca6e35f32752 Author: Kitware Robot AuthorDate: Mon Jul 4 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Mon Jul 4 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6de0a7a..a9501fa 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 6) -set(CMake_VERSION_PATCH 20160703) +set(CMake_VERSION_PATCH 20160704) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jul 5 00:01:05 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 5 Jul 2016 00:01:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.0-rc4-303-gb9eb340 Message-ID: <20160705040105.DA71DF3A8D@public.kitware.com> 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, master has been updated via b9eb3408b4bb750b2cc3f80803a5806d6ee46f13 (commit) from 7523267ca0e1a6c45f3b7eed332bca6e35f32752 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9eb3408b4bb750b2cc3f80803a5806d6ee46f13 commit b9eb3408b4bb750b2cc3f80803a5806d6ee46f13 Author: Kitware Robot AuthorDate: Tue Jul 5 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Tue Jul 5 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a9501fa..26e8219 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 6) -set(CMake_VERSION_PATCH 20160704) +set(CMake_VERSION_PATCH 20160705) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jul 5 11:15:50 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Jul 2016 11:15:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-658-g53c8b78 Message-ID: <20160705151550.A259CF37F3@public.kitware.com> 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 53c8b78e1687596fe5f871e4262a9382904ca4cc (commit) via 8849bbfe1de702e4c8cf8163bce37fe3a560f808 (commit) from b47b0a9c02550b01322fd7c2563e4e5b39f1e300 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53c8b78e1687596fe5f871e4262a9382904ca4cc commit 53c8b78e1687596fe5f871e4262a9382904ca4cc Merge: b47b0a9 8849bbf Author: Brad King AuthorDate: Tue Jul 5 11:15:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Jul 5 11:15:49 2016 -0400 Merge topic 'app-framework-bundle-extension' into next 8849bbfe Revert topic 'app-framework-bundle-extension' diff --cc Source/cmGeneratorTarget.cxx index 793ad2e,9a025d9..c9cbd00 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@@ -3021,15 -3008,9 +3011,9 @@@ void cmGeneratorTarget::GetFullNameInte std::string fw_prefix; if (this->IsFrameworkOnApple()) { fw_prefix = this->GetOutputName(config, false); - fw_prefix += "."; - const char* ext = this->GetProperty("BUNDLE_EXTENSION"); - if (!ext) { - ext = "framework"; - } - fw_prefix += ext; - fw_prefix += "/"; + fw_prefix += ".framework/"; targetPrefix = fw_prefix.c_str(); - targetSuffix = 0; + targetSuffix = CM_NULLPTR; } if (this->IsCFBundleOnApple()) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8849bbfe1de702e4c8cf8163bce37fe3a560f808 commit 8849bbfe1de702e4c8cf8163bce37fe3a560f808 Author: Brad King AuthorDate: Tue Jul 5 11:14:29 2016 -0400 Commit: Brad King CommitDate: Tue Jul 5 11:14:39 2016 -0400 Revert topic 'app-framework-bundle-extension' It will be revised and restored with tests. diff --git a/Help/prop_tgt/BUNDLE_EXTENSION.rst b/Help/prop_tgt/BUNDLE_EXTENSION.rst index 6b3d580..ea265b3 100644 --- a/Help/prop_tgt/BUNDLE_EXTENSION.rst +++ b/Help/prop_tgt/BUNDLE_EXTENSION.rst @@ -1,8 +1,7 @@ BUNDLE_EXTENSION ---------------- -The file extension used to name a :prop_tgt:`BUNDLE`, a :prop_tgt:`FRAMEWORK`, -or a :prop_tgt:`MACOSX_BUNDLE` target on the OS X and iOS. +The file extension used to name a :prop_tgt:`BUNDLE` target on the OS X and iOS. -The default value is ``bundle``, ``framework``, or ``app`` for the respective -target types. +The default value is ``bundle`` - you can also use ``plugin`` or whatever +file extension is required by the host app for your bundle. diff --git a/Help/release/dev/app-framework-bundle-extension.rst b/Help/release/dev/app-framework-bundle-extension.rst deleted file mode 100644 index 01855a2..0000000 --- a/Help/release/dev/app-framework-bundle-extension.rst +++ /dev/null @@ -1,5 +0,0 @@ -app-framework-bundle-extension ------------------------------- - -* On Apple platforms the :prop_tgt:`BUNDLE_EXTENSION` now also applies to - Frameworks and App Bundles. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index eec3422..9a025d9 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1346,12 +1346,7 @@ std::string cmGeneratorTarget::GetAppBundleDirectory(const std::string& config, bool contentOnly) const { std::string fpath = this->GetFullName(config, false); - fpath += "."; - const char* ext = this->GetProperty("BUNDLE_EXTENSION"); - if (!ext) { - ext = "app"; - } - fpath += ext; + fpath += ".app"; if (!this->Makefile->PlatformIsAppleIos()) { fpath += "/Contents"; if (!contentOnly) { @@ -1396,12 +1391,7 @@ std::string cmGeneratorTarget::GetFrameworkDirectory(const std::string& config, { std::string fpath; fpath += this->GetOutputName(config, false); - fpath += "."; - const char* ext = this->GetProperty("BUNDLE_EXTENSION"); - if (!ext) { - ext = "framework"; - } - fpath += ext; + fpath += ".framework"; if (!rootDir && !this->Makefile->PlatformIsAppleIos()) { fpath += "/Versions/"; fpath += this->GetFrameworkVersion(); @@ -3018,13 +3008,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config, std::string fw_prefix; if (this->IsFrameworkOnApple()) { fw_prefix = this->GetOutputName(config, false); - fw_prefix += "."; - const char* ext = this->GetProperty("BUNDLE_EXTENSION"); - if (!ext) { - ext = "framework"; - } - fw_prefix += ext; - fw_prefix += "/"; + fw_prefix += ".framework/"; targetPrefix = fw_prefix.c_str(); targetSuffix = 0; } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 91a90b2..e82cb16 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1843,11 +1843,6 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, std::string fw_version = gtgt->GetFrameworkVersion(); buildSettings->AddAttribute("FRAMEWORK_VERSION", this->CreateString(fw_version)); - const char* ext = gtgt->GetProperty("BUNDLE_EXTENSION"); - if (ext) { - buildSettings->AddAttribute("WRAPPER_EXTENSION", - this->CreateString(ext)); - } std::string plist = this->ComputeInfoPListLocation(gtgt); // Xcode will create the final version of Info.plist at build time, @@ -1882,11 +1877,6 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Handle bundles and normal executables separately. if (gtgt->GetPropertyAsBool("MACOSX_BUNDLE")) { - const char* ext = gtgt->GetProperty("BUNDLE_EXTENSION"); - if (ext) { - buildSettings->AddAttribute("WRAPPER_EXTENSION", - this->CreateString(ext)); - } std::string plist = this->ComputeInfoPListLocation(gtgt); // Xcode will create the final version of Info.plist at build time, // so let it replace the executable name. This avoids creating diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index b1733ce..d56bb05 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -142,22 +142,13 @@ void cmInstallTargetGenerator::GenerateScriptForConfig( if (this->Target->IsAppBundleOnApple()) { cmMakefile const* mf = this->Target->Target->GetMakefile(); - // Get App Bundle Extension - const char* ext = this->Target->GetProperty("BUNDLE_EXTENSION"); - if (!ext) { - ext = "app"; - } - // Install the whole app bundle directory. type = cmInstallType_DIRECTORY; literal_args += " USE_SOURCE_PERMISSIONS"; - from1 += "."; - from1 += ext; + from1 += ".app"; // Tweaks apply to the binary inside the bundle. - to1 += "."; - to1 += ext; - to1 += "/"; + to1 += ".app/"; if (!mf->PlatformIsAppleIos()) { to1 += "Contents/MacOS/"; } ----------------------------------------------------------------------- Summary of changes: Help/prop_tgt/BUNDLE_EXTENSION.rst | 7 +++---- .../release/dev/app-framework-bundle-extension.rst | 5 ----- Source/cmGeneratorTarget.cxx | 22 +++----------------- Source/cmGlobalXCodeGenerator.cxx | 10 --------- Source/cmInstallTargetGenerator.cxx | 13 ++---------- 5 files changed, 8 insertions(+), 49 deletions(-) delete mode 100644 Help/release/dev/app-framework-bundle-extension.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Jul 5 11:18:32 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Jul 2016 11:18:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-662-ge78a4f0 Message-ID: <20160705151832.106D4F387A@public.kitware.com> 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 e78a4f017e1414e2b5083e8ee972fcc05278c287 (commit) via 9f24ff5406f8644bc5245df26d0c26adcad3e091 (commit) via ff33e839df4fc09d9066538bb326a6c4f54a928a (commit) via c998e16c851fe0134903227d615caf16488150c0 (commit) from 53c8b78e1687596fe5f871e4262a9382904ca4cc (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e78a4f017e1414e2b5083e8ee972fcc05278c287 commit e78a4f017e1414e2b5083e8ee972fcc05278c287 Merge: 53c8b78 9f24ff5 Author: Brad King AuthorDate: Tue Jul 5 11:18:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Jul 5 11:18:31 2016 -0400 Merge topic 'reorganize-cmCTest' into next 9f24ff54 Revert "cmCTest: Improve doxygen for Part and Model enums" ff33e839 Revert "doxygen: Teach doc_makeall.sh how to skip cleaning of intermediate files" c998e16c Revert "doxygen: Introduce \cm_manual alias to reference manual from within doxygen" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f24ff5406f8644bc5245df26d0c26adcad3e091 commit 9f24ff5406f8644bc5245df26d0c26adcad3e091 Author: Brad King AuthorDate: Tue Jul 5 11:18:09 2016 -0400 Commit: Brad King CommitDate: Tue Jul 5 11:18:09 2016 -0400 Revert "cmCTest: Improve doxygen for Part and Model enums" This reverts commit 2aa8e005a3f6e2fa357f5d11549a609213f738e5. diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 669401c..b6657c9 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -66,48 +66,7 @@ class cmCTest friend class cmCTestMultiProcessHandler; public: - /** - * \enum Part - * Enumerate parts of the testing and submission process. - * - * For more details, - * see \cm_manual{manual/ctest.1.html#dashboard-client-steps, - * dashboard client steps}. - * - * \sa PartInfo - * - * \var Part PartStart - * See \cm_manual{manual/ctest.1.html#ctest-start-step, start step}. - * - * \var Part PartUpdate - * The \cm_manual{manual/ctest.1.html#ctest-update-step, update step} - * is handled by cmCTestUpdateHandler. - * - * \var Part PartConfigure - * The \cm_manual{manual/ctest.1.html#ctest-configure-step, configure step} - * is handled by cmCTestConfigureHandler. - * - * \var Part PartBuild - * The \cm_manual{manual/ctest.1.html#ctest-build-step, build step} - * is handled by cmCTestBuildHandler. - * - * \var Part PartTest - * The \cm_manual{manual/ctest.1.html#ctest-test-step, test step} - * is handled by cmCTestTestHandler. - * - * \var Part PartCoverage - * The \cm_manual{manual/ctest.1.html#ctest-coverage-step, coverage step} - * is handled by cmCTestCoverageHandler. - * - * \var Part PartMemCheck - * The \cm_manual{manual/ctest.1.html#ctest-memcheck-step, memcheck step} - * is handled by cmCTestMemCheckHandler. - * - * \var Part PartSubmit - * The \cm_manual{manual/ctest.1.html#ctest-submit-step, submit step} - * is handled by cmCTestSubmitHandler. - * - */ + /** Enumerate parts of the testing and submission process. */ enum Part { PartStart, @@ -364,10 +323,6 @@ public: */ std::string GetShortPathToFile(const char* fname); - /** - * Enumerate all \cm_manual{manual/ctest.1.html#dashboard-client-modes, - * dashboard client modes}. - */ enum { EXPERIMENTAL, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff33e839df4fc09d9066538bb326a6c4f54a928a commit ff33e839df4fc09d9066538bb326a6c4f54a928a Author: Brad King AuthorDate: Tue Jul 5 11:18:03 2016 -0400 Commit: Brad King CommitDate: Tue Jul 5 11:18:03 2016 -0400 Revert "doxygen: Teach doc_makeall.sh how to skip cleaning of intermediate files" This reverts commit f4613f70efb1762d6ce69ba3066186a1cd3e53a3. diff --git a/Utilities/Doxygen/doc_makeall.sh.in b/Utilities/Doxygen/doc_makeall.sh.in index 4ed1852..fceafdd 100755 --- a/Utilities/Doxygen/doc_makeall.sh.in +++ b/Utilities/Doxygen/doc_makeall.sh.in @@ -20,15 +20,7 @@ export GNUPLOT_PROG="@GNUPLOT@" # gnuplot (data plotting program) export HHC_PROG="@HTML_HELP_COMPILER@" # HTML Help Compiler export MV_PROG="@MV@" # mv (Unix-like 'move/rename files') export PERL_PROG="@PERL@" # Perl - -# Skip cleaning steps. This will allow faster regeneration when locally -# developing the documentation. -if [[ "$1" == "--skip-clean" ]]; then - echo "Invoked with '--skip-clean'" - export RM_PROG="NOTFOUND" -else - export RM_PROG="@RM@" # rm (Unix-like 'remove files') -fi +export RM_PROG="@RM@" # rm (Unix-like 'remove files') export TAR_PROG="@TAR@" # tar (Unix-like 'archiver') export WGET_PROG="@WGET@" # wget (remote file retrieval) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c998e16c851fe0134903227d615caf16488150c0 commit c998e16c851fe0134903227d615caf16488150c0 Author: Brad King AuthorDate: Tue Jul 5 11:17:58 2016 -0400 Commit: Brad King CommitDate: Tue Jul 5 11:17:58 2016 -0400 Revert "doxygen: Introduce \cm_manual alias to reference manual from within doxygen" This reverts commit 4572d36b1eb9527a7a23e7d777b1b7a5227bc960. diff --git a/Utilities/Doxygen/doxyfile.in b/Utilities/Doxygen/doxyfile.in index c143ab2..2c131f5 100644 --- a/Utilities/Doxygen/doxyfile.in +++ b/Utilities/Doxygen/doxyfile.in @@ -35,9 +35,6 @@ GRAPHICAL_HIERARCHY = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES -ALIASES += cm_manual{1}="https://cmake.org/cmake/help/v at CMake_VERSION_MAJOR@. at CMake_VERSION_MINOR@/\1" -ALIASES += cm_manual{2}="\2" - ALLEXTERNALS = NO IMAGE_PATH = "@CMake_BINARY_DIR@/Utilities/Doxygen/contrib" ----------------------------------------------------------------------- Summary of changes: Source/cmCTest.h | 47 +---------------------------------- Utilities/Doxygen/doc_makeall.sh.in | 10 +------- Utilities/Doxygen/doxyfile.in | 3 --- 3 files changed, 2 insertions(+), 58 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jul 5 11:19:18 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 5 Jul 2016 11:19:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-671-g98fe585 Message-ID: <20160705151918.D3CF3F388F@public.kitware.com> 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 98fe585982b088dd3b8dfdb158b0fa7a4c2187ef (commit) via 61fcd08a495a154e95add1a5e9d3ccc13dfb2486 (commit) via 7c67d4011e56fad3cf775818110fbd8d5d4be766 (commit) via 0076fb100b90f16163cccd06e89565b5c45316c1 (commit) via 30c5f94c5bbf1a5cd07858a9c037442f41b65d73 (commit) via 7c87ab755c96ad3f3fc6288d23c02cd0f4898785 (commit) via 6d8b9aa65ab06300a50f6c23897b9e37cadccc47 (commit) via 280d0a6947aee7d73404a3d5d0a795d490a781db (commit) via 898cb987b4a2ed027f7ec9308a128cab97feabf9 (commit) from e78a4f017e1414e2b5083e8ee972fcc05278c287 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98fe585982b088dd3b8dfdb158b0fa7a4c2187ef commit 98fe585982b088dd3b8dfdb158b0fa7a4c2187ef Merge: e78a4f0 61fcd08 Author: Brad King AuthorDate: Tue Jul 5 11:19:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Jul 5 11:19:17 2016 -0400 Merge topic 'reorganize-cmCTest' into next 61fcd08a Help: Fix documentation of ctest --build-and-test 7c67d401 Help: Consistently use quotes and fix punctuation in ctest(1) manual 0076fb10 cmCTest: Update doxygen to be consistent 30c5f94c cmCTest: Rename "ProcessTests()" to "ProcessSteps()" and improve doxygen 7c87ab75 cmCTest: Facilitate code reading adding consistent comments in Run() 6d8b9aa6 cmCTest: Improve readability adding "HandleTest(Action|Model)Argument()" 280d0a69 cmCTest: Improve readability adding "RunCMakeAndTest()" and "ExecuteTests()" 898cb987 cmCTest: Fix typo https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61fcd08a495a154e95add1a5e9d3ccc13dfb2486 commit 61fcd08a495a154e95add1a5e9d3ccc13dfb2486 Author: Jean-Christophe Fillion-Robin AuthorDate: Thu May 5 10:21:52 2016 -0400 Commit: Brad King CommitDate: Tue Jul 5 11:19:01 2016 -0400 Help: Fix documentation of ctest --build-and-test Since commit v3.0.0-rc1~260^2~14 (ctest: Make the --build-makeprogram optional for --build-and-test, 2013-11-14), binary dictionary is also required to run CTest given the option `--build-nocmake`. diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 04b1d01..ce81578 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -233,14 +233,13 @@ Options label associated with the tests run. If there are no labels on the tests, nothing extra is printed. -``--build-and-test`` +``--build-and-test `` Configure, build and run a test. This option tells ctest to configure (i.e. run cmake on), build, and or execute a test. The configure and test steps are optional. The arguments to this command line are the source and binary - directories. By default this will run CMake on the Source/Bin - directories specified unless ``--build-nocmake`` is specified. + directories. The ``--build-generator`` option *must* be provided to use ``--build-and-test``. If ``--test-command`` is specified then that will be run after the build is complete. Other options that affect this https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c67d4011e56fad3cf775818110fbd8d5d4be766 commit 7c67d4011e56fad3cf775818110fbd8d5d4be766 Author: Jean-Christophe Fillion-Robin AuthorDate: Wed May 4 22:32:45 2016 -0400 Commit: Brad King CommitDate: Tue Jul 5 11:19:01 2016 -0400 Help: Consistently use quotes and fix punctuation in ctest(1) manual diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index e797333..04b1d01 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -56,7 +56,7 @@ Options Enable failover. This option allows ctest to resume a test set execution that was - previously interrupted. If no interruption occurred, the -F option + previously interrupted. If no interruption occurred, the ``-F`` option will have no effect. ``-j , --parallel `` @@ -77,12 +77,12 @@ Options Make ctest quiet. This option will suppress all the output. The output log file will - still be generated if the --output-log is specified. Options such - as --verbose, --extra-verbose, and --debug are ignored if --quiet is - specified. + still be generated if the ``--output-log`` is specified. Options such + as ``--verbose``, ``--extra-verbose``, and ``--debug`` are ignored + if ``--quiet`` is specified. ``-O , --output-log `` - Output to log file + Output to log file. This option tells ctest to write all its output to a log file. @@ -90,7 +90,7 @@ Options Disable actual execution of tests. This option tells ctest to list the tests that would be run but not - actually run them. Useful in conjunction with the -R and -E + actually run them. Useful in conjunction with the ``-R`` and ``-E`` options. ``-L , --label-regex `` @@ -118,7 +118,7 @@ Options given regular expression. ``-D , --dashboard `` - Execute dashboard test + Execute dashboard test. This option tells ctest to act as a CDash client and perform a dashboard test. All tests are , where Mode can be @@ -126,26 +126,27 @@ Options Update, Configure, Build, Test, Coverage, and Submit. ``-D :=`` - Define a variable for script mode + Define a variable for script mode. Pass in variable values on the command line. Use in conjunction - with -S to pass variable values to a dashboard script. Parsing -D + with ``-S`` to pass variable values to a dashboard script. Parsing ``-D`` arguments as variable values is only attempted if the value - following -D does not match any of the known dashboard types. + following ``-D`` does not match any of the known dashboard types. ``-M , --test-model `` - Sets the model for a dashboard + Sets the model for a dashboard. - This option tells ctest to act as a CDash client where the TestModel - can be Experimental, Nightly, and Continuous. Combining -M and -T - is similar to -D + This option tells ctest to act as a CDash client where the ```` + can be ``Experimental``, ``Nightly``, and ``Continuous``. + Combining ``-M`` and ``-T`` is similar to ``-D``. ``-T , --test-action `` - Sets the dashboard action to perform + Sets the dashboard action to perform. This option tells ctest to act as a CDash client and perform some - action such as start, build, test etc. Combining -M and -T is - similar to -D + action such as ``start``, ``build``, ``test`` etc. See + `Dashboard Client Steps`_ for the full list of actions. + Combining ``-M`` and ``-T`` is similar to ``-D``. ``--track `` Specify the track to submit dashboard to @@ -156,24 +157,24 @@ Options arbitrary. ``-S