Re: [CMake] Disabling INSTALL target for subdirectory

2017-02-16 Thread Milan Ziegler
Hi Florent,



thank you so much. EXCLUDE_FROM_ALL does indeed have the effect of
ignoring any install() invocations from within the subdirectory. I
remember stumbling across this option, but from the docs I didn't get
the impression that this would affect the installation as well.


Maybe the documentation needs a few more words here.



> 

> Also, 3rdparty libraries should be tagged like that anyway to be built
> only when they are used by the main targets.
Yes, this is a good idea.





Thanks again,

Milan





--

  Milan Ziegler

  mi...@fastmail.com







On Thu, Feb 16, 2017, at 13:33, Florent Castelli wrote:

> Use add_subdirectory(...  EXCLUDE_FROM_ALL) to prevent anything in
> there to be installed by default.
> I had the issue in one project and it did fix it for us. 

> 

> Also, 3rdparty libraries should be tagged like that anyway to be built
> only when they are used by the main targets.
> 

> /Florent 

> 

> On Feb 16, 2017 07:59, "Milan Ziegler"  wrote:

>> Hi,

>> 

>>  we are using the CMake install mechanism "install(...)" to copy all
>>  relevant files and target binaries of the product into the CMake
>>  install
>>  prefix folder, for further packaging. So far so good.

>> 

>>  We are also using several thirdparty libraries, hosting them
>>  inside our
>>  own repository and building them along with our own code,
>>  usually using
>>  add_subdirectory utilizing their native CMake buildsystem.

>> 

>>  Turns out, other developers also like the CMake install mechanism.

>> 

>>  So now the INSTALL target of our whole project also installs
>>  thirdparty
>>  components, which we do not want to deliver with our own product
>>  (think
>>  static libraries, which are already linked into our executable).

>> 

>>  After a lot of googling, here's my question: Is there a clean way to
>>  disable the install target for a subdirectory _without_ also
>>  disabling
>>  it completely for the remaining project?

>> 

>>  What we already tried:

>>  * Setting CMAKE_INSTALL_PREFIX to a temporary directory for the

>>  subdirectory (doesn't work)

>>  * "function(install) endfunction()" to disable the install
>>function for
>>  the subdirectory (breaks CMake in hilarious ways)

>> 

>>  What we now do:

>>  Using a custom target, we patch the cmake_install.cmake files in the
>>  build directories before installing (works, but it's an
>>  abomination of
>>  a hack)

>> 

>>  Any help? I think it's a valid usecase for CMake but there
>>  doesn't seem
>>  to be an easy way to do it.

>> 

>>  We are using CMake 3.5.

>> 

>> 

>>  Thank you :)

>> 

>>  --

>>Milan

>>mi...@fastmail.com

>>  --

>> 

>>  Powered by www.kitware.com

>> 

>>  Please keep messages on-topic and check the CMake FAQ at:
>>  http://www.cmake.org/Wiki/CMake_FAQ
>> 

>>  Kitware offers various services to support the CMake community. For
>>  more information on each offering, please visit:
>> 

>>  CMake Support: http://cmake.org/cmake/help/support.html

>>  CMake Consulting: http://cmake.org/cmake/help/consulting.html

>>  CMake Training Courses: http://cmake.org/cmake/help/training.html

>> 

>>  Visit other Kitware open-source projects at
>>  http://www.kitware.com/opensource/opensource.html
>> 

>>  Follow this link to subscribe/unsubscribe:

>> http://public.kitware.com/mailman/listinfo/cmake


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-128-gb6c9a85

2017-02-16 Thread Kitware Robot
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  b6c9a851cba4f28bf0614b145803dc46096b6cde (commit)
  from  c508fd8481d87aef7843942ba186d3dea4246c7f (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=b6c9a851cba4f28bf0614b145803dc46096b6cde
commit b6c9a851cba4f28bf0614b145803dc46096b6cde
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Fri Feb 17 00:01:02 2017 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Fri Feb 17 00:01:02 2017 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index a92cb20..24d45c5 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 8)
-set(CMake_VERSION_PATCH 20170216)
+set(CMake_VERSION_PATCH 20170217)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-127-gc508fd8

2017-02-16 Thread Brad King
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  c508fd8481d87aef7843942ba186d3dea4246c7f (commit)
   via  1f9c879759a92a4bdbb264aafacac05d2da89132 (commit)
   via  2c354f4ee44e9690ca6ed6c7266283bda1070ca4 (commit)
   via  93737d8012d262711bee9b3fbf2b4927e4a0255a (commit)
   via  efac65d67b32c407044db6536da4f43ed9546be7 (commit)
   via  ac7489e03c02d4e485804197ae8a0a771da6e55e (commit)
  from  bb4730dc5add8c5ac54b41efa5375189636429f3 (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 -
---

Summary of changes:


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, release, updated. v3.8.0-rc1-25-g2c354f4

2017-02-16 Thread Brad King
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, release has been updated
   via  2c354f4ee44e9690ca6ed6c7266283bda1070ca4 (commit)
   via  28ee3784055ab6b21563d56024b1324c16949cbc (commit)
   via  93737d8012d262711bee9b3fbf2b4927e4a0255a (commit)
   via  51849bbab8b1b6b8299dc08e98ca1524cc1e168a (commit)
   via  ac7489e03c02d4e485804197ae8a0a771da6e55e (commit)
   via  55fb46d273e8ab51d5df366286052c71b9008437 (commit)
   via  d7c80f60362cbc40216fab67318d94988030315c (commit)
  from  272c348d5a1c3f713586e05e0d73fd18441f7bb2 (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 -
---

Summary of changes:
 Modules/Compiler/NVIDIA-CUDA.cmake|   11 +--
 Modules/Platform/Windows-NVIDIA-CUDA.cmake|   12 +++-
 Source/CTest/cmCTestSVN.cxx   |5 -
 Source/cmQtAutoGenerators.cxx |4 ++--
 Tests/Cuda/Complex/CMakeLists.txt |2 +-
 Tests/Cuda/ProperLinkFlags/CMakeLists.txt |2 +-
 Tests/Cuda/WithC/CMakeLists.txt   |2 +-
 Tests/CudaOnly/SeparateCompilation/CMakeLists.txt |2 +-
 Tests/CudaOnly/WithDefs/CMakeLists.txt|2 +-
 9 files changed, 23 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-218-g638f376

2017-02-16 Thread Brad King
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  638f37623af0431c640d6020a3253dbb4d5c4841 (commit)
   via  c508fd8481d87aef7843942ba186d3dea4246c7f (commit)
   via  1f9c879759a92a4bdbb264aafacac05d2da89132 (commit)
   via  2c354f4ee44e9690ca6ed6c7266283bda1070ca4 (commit)
   via  93737d8012d262711bee9b3fbf2b4927e4a0255a (commit)
   via  efac65d67b32c407044db6536da4f43ed9546be7 (commit)
   via  ac7489e03c02d4e485804197ae8a0a771da6e55e (commit)
  from  0823533dd339ef714c0d0efbc8321bafec48c501 (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=638f37623af0431c640d6020a3253dbb4d5c4841
commit 638f37623af0431c640d6020a3253dbb4d5c4841
Merge: 0823533 c508fd8
Author: Brad King 
AuthorDate: Thu Feb 16 13:35:57 2017 -0500
Commit: Brad King 
CommitDate: Thu Feb 16 13:35:57 2017 -0500

Merge branch 'master' into next


---

Summary of changes:


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-211-g0823533

2017-02-16 Thread Brad King
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  0823533dd339ef714c0d0efbc8321bafec48c501 (commit)
   via  9b78dca3a909ce3161d235718f935bf2fb9b7f64 (commit)
  from  ed67fe7451a5ebdf179bbfc5c2517f0e19e651d6 (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=0823533dd339ef714c0d0efbc8321bafec48c501
commit 0823533dd339ef714c0d0efbc8321bafec48c501
Merge: ed67fe7 9b78dca
Author: Brad King 
AuthorDate: Thu Feb 16 13:27:11 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:27:11 2017 -0500

Merge topic 'FindOpenSSL-crypto-name' into next

9b78dca3 FindOpenSSL: Add another name for libcrypto with MSVC


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b78dca3a909ce3161d235718f935bf2fb9b7f64
commit 9b78dca3a909ce3161d235718f935bf2fb9b7f64
Author: Kevin Whitaker 
AuthorDate: Thu Feb 16 09:38:30 2017 -0500
Commit: Brad King 
CommitDate: Thu Feb 16 13:26:42 2017 -0500

FindOpenSSL: Add another name for libcrypto with MSVC

Add the `crypto` name without any prefix or suffix as a fallback, just
as we already have for `ssl`.

diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 6259ce1..117811c 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -160,6 +160,7 @@ if(WIN32 AND NOT CYGWIN)
 libcrypto
 libeay32${_OPENSSL_MSVC_RT_MODE}
 libeay32
+crypto
   NAMES_PER_DIR
   ${_OPENSSL_ROOT_HINTS_AND_PATHS}
   PATH_SUFFIXES

---

Summary of changes:
 Modules/FindOpenSSL.cmake |1 +
 1 file changed, 1 insertion(+)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-209-ged67fe7

2017-02-16 Thread Brad King
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  ed67fe7451a5ebdf179bbfc5c2517f0e19e651d6 (commit)
   via  1ba91291e3237e5535a46c6ff1bce6a33d298a76 (commit)
   via  f7b9bf41c5386dfc38b7a722f75b0e23a02d542b (commit)
   via  4bff2d14fd3010ba4aa1bfc3eda2fb2cdcc5da0f (commit)
   via  624fb9d7175ee011f8a86c8d7614be4806a53184 (commit)
  from  5dc1ca679d48a4ef7ef0cd5c987e077bb75915c2 (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=ed67fe7451a5ebdf179bbfc5c2517f0e19e651d6
commit ed67fe7451a5ebdf179bbfc5c2517f0e19e651d6
Merge: 5dc1ca6 1ba9129
Author: Brad King 
AuthorDate: Thu Feb 16 13:21:49 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:21:49 2017 -0500

Merge topic 'install_name_policy' into next

1ba91291 Add policy CMP0068 separate install_name and RPATH settings on 
macOS
f7b9bf41 Apple: Add BUILD_WITH_INSTALL_NAME_DIR target property
4bff2d14 Apple: Refactor support for using INSTALL_NAME_DIR.
624fb9d7 Help: Format BUILD_WITH_INSTALL_RPATH documentation


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ba91291e3237e5535a46c6ff1bce6a33d298a76
commit 1ba91291e3237e5535a46c6ff1bce6a33d298a76
Author: Clinton Stimpson 
AuthorDate: Thu Feb 9 08:12:10 2017 -0700
Commit: Clinton Stimpson 
CommitDate: Tue Feb 14 14:28:07 2017 -0700

Add policy CMP0068 separate install_name and RPATH settings on macOS

BUILD_WITH_INSTALL_RPATH, SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH and
CMAKE_SKIP_INSTALL_RPATH no longer any effect on the install name
of a target on macOS.

Fixes: #16589

diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 3266958..0c9ee2d 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may 
also be used
 to determine whether to report an error on use of deprecated macros or
 functions.
 
+Policies Introduced by CMake 3.9
+
+
+.. toctree::
+   :maxdepth: 1
+
+   CMP0068: RPATH settings on macOS do not affect install_name. 

+
 Policies Introduced by CMake 3.8
 
 
diff --git a/Help/policy/CMP0068.rst b/Help/policy/CMP0068.rst
new file mode 100644
index 000..978a6e3
--- /dev/null
+++ b/Help/policy/CMP0068.rst
@@ -0,0 +1,35 @@
+CMP0068
+---
+
+``RPATH`` settings on macOS do not affect ``install_name``.
+
+CMake 3.9 and newer remove any effect the following settings may have on the
+``install_name`` of a target on macOS:
+
+* :prop_tgt:`BUILD_WITH_INSTALL_RPATH` target property
+* :prop_tgt:`SKIP_BUILD_RPATH` target property
+* :variable:`CMAKE_SKIP_RPATH` variable
+* :variable:`CMAKE_SKIP_INSTALL_RPATH` variable
+
+Previously, setting :prop_tgt:`BUILD_WITH_INSTALL_RPATH` had the effect of
+setting both the ``install_name`` of a target to :prop_tgt:`INSTALL_NAME_DIR`
+and the ``RPATH`` to :prop_tgt:`INSTALL_RPATH`.  In CMake 3.9, it only affects
+setting of ``RPATH``.  However, if one wants :prop_tgt:`INSTALL_NAME_DIR` to
+apply to the target in the build tree, one may set
+:prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR`.
+
+If :prop_tgt:`SKIP_BUILD_RPATH`, :variable:`CMAKE_SKIP_RPATH` or
+:variable:`CMAKE_SKIP_INSTALL_RPATH` were used to strip the directory portion
+of the ``install_name`` of a target, one may set ``INSTALL_NAME_DIR=""``
+instead.
+
+The ``OLD`` behavior of this policy is to use the ``RPATH`` settings for
+``install_name`` on macOS.  The ``NEW`` behavior of this policy is to ignore
+the ``RPATH`` settings for ``install_name`` on macOS.
+
+This policy was introduced in CMake version 3.9.  CMake version
+|release| warns when the policy is not set and uses ``OLD`` behavior.
+Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
+explicitly.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/prop_tgt/BUILD_WITH_INSTALL_NAME_DIR.rst 
b/Help/prop_tgt/BUILD_WITH_INSTALL_NAME_DIR.rst
index 7e02518..bbb9a24 100644
--- a/Help/prop_tgt/BUILD_WITH_INSTALL_NAME_DIR.rst
+++ b/Help/prop_tgt/BUILD_WITH_INSTALL_NAME_DIR.rst
@@ -9,5 +9,5 @@ This property is initialized by the value of the variable
 :variable:`CMAKE_BUILD_WITH_INSTALL_NAME_DIR` if it is set when a target is
 created.
 
-If this property is not set, the value of :prop_tgt:`BUILD_WITH_INSTALL_RPATH`
-is used in its place.
+If this property is not set and policy :policy:`CMP0068` is not ``NEW``, the
+value of :prop_tgt:`BUILD_WITH_INSTALL_RPATH` 

[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-204-g5dc1ca6

2017-02-16 Thread Brad King
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  5dc1ca679d48a4ef7ef0cd5c987e077bb75915c2 (commit)
   via  f10b2f72f6979ccb16410d97bac98c440eb7f992 (commit)
   via  ef399f9bc6b8e2ff917a5f2809346fb81fd954ae (commit)
  from  0239a87173935c2d10e518c5070e4d90c9b6c79a (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=5dc1ca679d48a4ef7ef0cd5c987e077bb75915c2
commit 5dc1ca679d48a4ef7ef0cd5c987e077bb75915c2
Merge: 0239a87 f10b2f7
Author: Brad King 
AuthorDate: Thu Feb 16 13:20:27 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:20:27 2017 -0500

Merge topic 'capture-ctest_update-svn-failures' into next

f10b2f72 ctest_update: Capture failure of svn to load revisions and local 
mods
ef399f9b ctest_update: Refactor internal APIs to support more failure cases


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f10b2f72f6979ccb16410d97bac98c440eb7f992
commit f10b2f72f6979ccb16410d97bac98c440eb7f992
Author: Brad King 
AuthorDate: Wed Feb 15 14:12:03 2017 -0500
Commit: Brad King 
CommitDate: Thu Feb 16 13:19:26 2017 -0500

ctest_update: Capture failure of svn to load revisions and local mods

Issue: #16646

diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index e85d01c..ce395cd 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -99,7 +99,9 @@ std::string cmCTestSVN::LoadInfo(SVNInfo& svninfo)
 
 bool cmCTestSVN::NoteOldRevision()
 {
-  this->LoadRepositories();
+  if (!this->LoadRepositories()) {
+return false;
+  }
 
   std::list::iterator itbeg = this->Repositories.begin();
   std::list::iterator itend = this->Repositories.end();
@@ -121,7 +123,9 @@ bool cmCTestSVN::NoteOldRevision()
 
 bool cmCTestSVN::NoteNewRevision()
 {
-  this->LoadRepositories();
+  if (!this->LoadRepositories()) {
+return false;
+  }
 
   std::list::iterator itbeg = this->Repositories.begin();
   std::list::iterator itend = this->Repositories.end();
@@ -374,17 +378,18 @@ private:
 
 bool cmCTestSVN::LoadRevisions()
 {
+  bool result = true;
   // Get revisions for all the external repositories
   std::list::iterator itbeg = this->Repositories.begin();
   std::list::iterator itend = this->Repositories.end();
   for (; itbeg != itend; itbeg++) {
 SVNInfo& svninfo = *itbeg;
-LoadRevisions(svninfo);
+result = this->LoadRevisions(svninfo) && result;
   }
-  return true;
+  return result;
 }
 
-void cmCTestSVN::LoadRevisions(SVNInfo& svninfo)
+bool cmCTestSVN::LoadRevisions(SVNInfo& svninfo)
 {
   // We are interested in every revision included in the update.
   std::string revs;
@@ -403,7 +408,7 @@ void cmCTestSVN::LoadRevisions(SVNInfo& svninfo)
   svn_log.push_back(svninfo.LocalPath.c_str());
   LogParser out(this, "log-out> ", svninfo);
   OutputLogger err(this->Log, "log-err> ");
-  this->RunSVNCommand(svn_log, , );
+  return this->RunSVNCommand(svn_log, , );
 }
 
 void cmCTestSVN::DoRevisionSVN(Revision const& revision,
@@ -525,10 +530,10 @@ private:
   }
 };
 
-void cmCTestSVN::LoadRepositories()
+bool cmCTestSVN::LoadRepositories()
 {
   if (!this->Repositories.empty()) {
-return;
+return true;
   }
 
   // Info for root repository
@@ -540,7 +545,7 @@ void cmCTestSVN::LoadRepositories()
   svn_status.push_back("status");
   ExternalParser out(this, "external-out> ");
   OutputLogger err(this->Log, "external-err> ");
-  this->RunSVNCommand(svn_status, , );
+  return this->RunSVNCommand(svn_status, , );
 }
 
 std::string cmCTestSVN::SVNInfo::BuildLocalPath(std::string const& path) const
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index 1832fd9..e5fe5b7 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -77,10 +77,10 @@ private:
   SVNInfo* RootInfo;
 
   std::string LoadInfo(SVNInfo& svninfo);
-  void LoadRepositories();
+  bool LoadRepositories();
   bool LoadModifications() CM_OVERRIDE;
   bool LoadRevisions() CM_OVERRIDE;
-  void LoadRevisions(SVNInfo& svninfo);
+  bool LoadRevisions(SVNInfo& svninfo);
 
   void GuessBase(SVNInfo& svninfo, std::vector const& changes);
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef399f9bc6b8e2ff917a5f2809346fb81fd954ae
commit ef399f9bc6b8e2ff917a5f2809346fb81fd954ae
Author: Brad King 
AuthorDate: Wed Feb 15 13:58:40 2017 -0500
Commit: Brad King 
CommitDate: Thu Feb 16 13:19:26 2017 -0500

ctest_update: Refactor internal APIs to support more failure cases


[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-121-gbb4730d

2017-02-16 Thread Brad King
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  bb4730dc5add8c5ac54b41efa5375189636429f3 (commit)
   via  109b8a6fd32be9886de71f98170e0c512ac9883f (commit)
   via  bd5ea6993c8376cd3612100019e15ee256a758d8 (commit)
   via  3936a2886efc1fd46560352f3a48d6a656f95367 (commit)
  from  160083b04ddde9904e90cbf8146193e28eb58124 (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=bb4730dc5add8c5ac54b41efa5375189636429f3
commit bb4730dc5add8c5ac54b41efa5375189636429f3
Merge: 160083b 109b8a6
Author: Brad King 
AuthorDate: Thu Feb 16 13:15:52 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:15:52 2017 -0500

Merge topic 'vs-refactor-unknown-flags'

109b8a6f VS: Refactor AdditionalOptions generation
bd5ea699 cmVisualStudioGeneratorOptions: Add PrependInerhitedString method
3936a288 cmIDEOptions: Add SpaceAppendable flag table type


---

Summary of changes:
 Source/cmIDEFlagTable.h|3 +++
 Source/cmIDEOptions.cxx|8 ++
 Source/cmIDEOptions.h  |   14 +++---
 Source/cmLocalVisualStudio7Generator.cxx   |4 ---
 Source/cmVisualStudio10TargetGenerator.cxx |   14 +-
 Source/cmVisualStudioGeneratorOptions.cxx  |   38 ++--
 Source/cmVisualStudioGeneratorOptions.h|4 +--
 7 files changed, 44 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-110-gaa18d5b

2017-02-16 Thread Brad King
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  aa18d5befec57e69628106cc5d95829a687bfd5c (commit)
   via  51849bbab8b1b6b8299dc08e98ca1524cc1e168a (commit)
  from  5d5be3bd96f4521b38774855fb70e4238e346db2 (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=aa18d5befec57e69628106cc5d95829a687bfd5c
commit aa18d5befec57e69628106cc5d95829a687bfd5c
Merge: 5d5be3b 51849bb
Author: Brad King 
AuthorDate: Thu Feb 16 13:15:42 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:15:42 2017 -0500

Merge topic 'fix-ctest_update-svn'

51849bba ctest_update: Fix svn log and external loading


---

Summary of changes:
 Source/CTest/cmCTestSVN.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-106-gd1530cc

2017-02-16 Thread Brad King
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  d1530cc9a5bf16c83d7ad9246d6a7e35a0235b3e (commit)
   via  55fb46d273e8ab51d5df366286052c71b9008437 (commit)
   via  d7c80f60362cbc40216fab67318d94988030315c (commit)
  from  b9229944cf1b9f27e1fc97921e736ca17fc4eb0c (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=d1530cc9a5bf16c83d7ad9246d6a7e35a0235b3e
commit d1530cc9a5bf16c83d7ad9246d6a7e35a0235b3e
Merge: b922994 55fb46d
Author: Brad King 
AuthorDate: Thu Feb 16 13:15:35 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:15:35 2017 -0500

Merge topic 'cuda-msvc-flags'

55fb46d2 CUDA: Fix default compiler flags on Windows
d7c80f60 CUDA: Fix test cases to not override CUDA flags


---

Summary of changes:
 Modules/Compiler/NVIDIA-CUDA.cmake|   11 +--
 Modules/Platform/Windows-NVIDIA-CUDA.cmake|   12 +++-
 Tests/Cuda/Complex/CMakeLists.txt |2 +-
 Tests/Cuda/ProperLinkFlags/CMakeLists.txt |2 +-
 Tests/Cuda/WithC/CMakeLists.txt   |2 +-
 Tests/CudaOnly/SeparateCompilation/CMakeLists.txt |2 +-
 Tests/CudaOnly/WithDefs/CMakeLists.txt|2 +-
 7 files changed, 17 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-112-g60b5616

2017-02-16 Thread Brad King
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  60b5616af7966076ffce43610559d8a0bf7a9550 (commit)
   via  20ae76b1da82d87792fb54335dbf95e871261f52 (commit)
  from  aa18d5befec57e69628106cc5d95829a687bfd5c (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=60b5616af7966076ffce43610559d8a0bf7a9550
commit 60b5616af7966076ffce43610559d8a0bf7a9550
Merge: aa18d5b 20ae76b
Author: Brad King 
AuthorDate: Thu Feb 16 13:15:44 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:15:44 2017 -0500

Merge topic 'command-cleanup-fix'

20ae76b1 cmDisallowedCommand: Forward final pass too


---

Summary of changes:
 Source/cmDisallowedCommand.h |7 +++
 1 file changed, 7 insertions(+)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-114-gfb3fd78

2017-02-16 Thread Brad King
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  fb3fd78d580d0ad0aa138fd8edd7f81f44a3f275 (commit)
   via  ac0962cead1db76b44cbb9d9a413956ca31a7982 (commit)
  from  60b5616af7966076ffce43610559d8a0bf7a9550 (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=fb3fd78d580d0ad0aa138fd8edd7f81f44a3f275
commit fb3fd78d580d0ad0aa138fd8edd7f81f44a3f275
Merge: 60b5616 ac0962c
Author: Brad King 
AuthorDate: Thu Feb 16 13:15:47 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:15:47 2017 -0500

Merge topic 'TestBigEndian-cxx-only'

ac0962ce TestBigEndian: Fix to work with CXX without C


---

Summary of changes:
 Modules/TestBigEndian.cmake |   26 +++---
 1 file changed, 19 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-117-g160083b

2017-02-16 Thread Brad King
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  160083b04ddde9904e90cbf8146193e28eb58124 (commit)
   via  f773933f2630a17ce6b3b2aa6f8d7d8b65eb336c (commit)
   via  d9e2b9a909b5f5b51ef3a106ed1d60a8d4cb795a (commit)
  from  fb3fd78d580d0ad0aa138fd8edd7f81f44a3f275 (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=160083b04ddde9904e90cbf8146193e28eb58124
commit 160083b04ddde9904e90cbf8146193e28eb58124
Merge: fb3fd78 f773933
Author: Brad King 
AuthorDate: Thu Feb 16 13:15:49 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:15:49 2017 -0500

Merge topic 'vs-refactor-toolset-parsing'

f773933f VS: Refactor generator toolset parsing
d9e2b9a9 Tests: Split out RunCMake.GeneratorToolset Xcode checks


---

Summary of changes:
 Source/cmGlobalVisualStudio10Generator.cxx |   82 
 Source/cmGlobalVisualStudio10Generator.h   |6 +-
 Source/cmGlobalVisualStudio12Generator.cxx |   16 ++--
 Source/cmGlobalVisualStudio12Generator.h   |4 +-
 .../BadToolsetFormat-result.txt}   |0
 .../GeneratorToolset/BadToolsetFormat-stderr.txt   |   10 +++
 .../BadToolsetFormat.cmake}|0
 .../GeneratorToolset/BadToolsetHostArch-stderr.txt |4 +-
 .../BadToolsetHostArchTwice-result.txt}|0
 .../BadToolsetHostArchTwice-stderr.txt |   10 +++
 .../BadToolsetHostArchTwice.cmake} |0
 .../BadToolsetHostArchXcode-result.txt}|0
 ...derr.txt => BadToolsetHostArchXcode-stderr.txt} |0
 .../BadToolsetHostArchXcode.cmake} |0
 Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake |   11 ++-
 15 files changed, 114 insertions(+), 29 deletions(-)
 copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => 
GeneratorToolset/BadToolsetFormat-result.txt} (100%)
 create mode 100644 Tests/RunCMake/GeneratorToolset/BadToolsetFormat-stderr.txt
 copy Tests/RunCMake/{GeneratorPlatform/BadPlatform.cmake => 
GeneratorToolset/BadToolsetFormat.cmake} (100%)
 copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => 
GeneratorToolset/BadToolsetHostArchTwice-result.txt} (100%)
 create mode 100644 
Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt
 copy Tests/RunCMake/{GeneratorPlatform/BadPlatform.cmake => 
GeneratorToolset/BadToolsetHostArchTwice.cmake} (100%)
 copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => 
GeneratorToolset/BadToolsetHostArchXcode-result.txt} (100%)
 copy Tests/RunCMake/GeneratorToolset/{BadToolsetHostArch-stderr.txt => 
BadToolsetHostArchXcode-stderr.txt} (100%)
 copy Tests/RunCMake/{GeneratorPlatform/BadPlatform.cmake => 
GeneratorToolset/BadToolsetHostArchXcode.cmake} (100%)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-108-g5d5be3b

2017-02-16 Thread Brad King
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  5d5be3bd96f4521b38774855fb70e4238e346db2 (commit)
   via  28ee3784055ab6b21563d56024b1324c16949cbc (commit)
  from  d1530cc9a5bf16c83d7ad9246d6a7e35a0235b3e (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=5d5be3bd96f4521b38774855fb70e4238e346db2
commit 5d5be3bd96f4521b38774855fb70e4238e346db2
Merge: d1530cc 28ee378
Author: Brad King 
AuthorDate: Thu Feb 16 13:15:38 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 16 13:15:38 2017 -0500

Merge topic 'autogen_fix_3.8'

28ee3784 Autogen: Fix headers not skipped


---

Summary of changes:
 Source/cmQtAutoGenerators.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Zan Lynx
On 02/16/2017 08:07 AM, Chuck Atkins wrote:
> That being said, I do think we should revisit the use of O3 by default
> given the safety issues surounding it.

The following is just my opinion:

In my experience if O3 fails it is a bug in the compiler, which should
be fixed and somebody has to find them first. Or a bug in the code being
built with O3, usually something subtle with undefined behavior.

Code bugs that happen to work sort-of correctly under O2 but not O3
aren't really safe. Future compiler versions often include changes that
break the code anyway.

I build a couple of production release C++ projects under several
versions of GCC (Linux releases since 2010). I use O3 and profiling
feedback, which, yes, does reveal some bugs, even up to segfaulting the
compiler, so I have special checks in the Makefile for a few of those
versions.

The thing that makes this safe to do is testing. If the code isn't
working correctly because of O3 I know it because it fails to pass its
tests.

I haven't looked but I would hope CMake has tests that are run against
the optimized code...
-- 
Knowledge is Power -- Power Corrupts
Study Hard -- Be Evil
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Alan W. Irwin

On 2017-02-16 10:07-0500 Chuck Atkins wrote:


Hi YC,



cmake version on fedora 25: 3.6.2



Fedora is specifically patching CMake in the RPM spec file to reduce the
gcc flag from O3 to O2 so it's the distributuion's packaging making that
change, not CMake itself.  If you download and build the source from
cmake.org then you'll get O3 as default for gcc release builds.

That being said, I do think we should revisit the use of O3 by default
given the safety issues surounding it.


I agree with RedHat developers that O3 by default (especially if you
only use it for releases in a largely untested way) is likely a bad
idea. But developers of other distros obviously disagree with RedHat. 
Of course, this also means that the decision CMake developers

make about this doesn't affect that many users because distros are
likely going to override whatever decision CMake developers make in
this regard.  And some CMake users like me who build our own CMake version
also ignore all default optimization choices set by CMake developers.

For example, in my case I want to test that PLplot reduces externally
visible library symbols to a minimum, and I want to look for
uninitialized variable possibilities so I typically use

export CFLAGS='-O3 -fvisibility=hidden -Wuninitialized'
export CXXFLAGS='-O3 -fvisibility=hidden -Wuninitialized'

for testing throughout our release cycles and not just at the end of
release cycles in the last-minute rush before release.

But before getting to why I do that, I want to review why some
developers (like me) feel that in certain circumstances -O3 can be
dangerous.

There is an interesting discussion of O3 safety at
.
Issues discussed that seem to weigh against using O3 for any default
choice were the following:

1. O3 can expose incorrect code assumptions.

2. O3 adds additional optimizations to O2 and is less thoroughly
tested by users so there is more chance of gcc
compiler suite bugs for O3.  (Although nobody was aware at the time of that
discussion of any O3-specific bug in the gcc compiler suite).

3. O3 can sometimes give you slower code due to cache considerations.

My own personal experience is that several years ago I started testing
with -O3 late in a release cycle for a particular PLplot release, and
it started segfaulting like crazy while it was perfectly fine with
-O2.  We finally narrowed the problem to a small recursive routine
that we had implemented, and the only solution to avoid the -O3 issue
was to rewrite that routine in a non-recursive way even though none of
our developers could see anything wrong with the recursive version.

We never did figure out whether we were encountering issue 1 or issue
2, but the story does illustrate the problems you can encounter if you
debug and do the bulk of the testing of your code at low optimization
levels, and then introduce a high optimization level late in a release
cycle.  So now I always test consistently with -O3 throughout the
release cycle (and have never again encountered an issue with that
optimization level, natch).  Also, we don't make binary releases of
PLplot ourselves so essentially we leave it to Linux, Mac, and Windows
distributors of binary versions of PLplot to decide what optimization
level they are going to use for all the binary software projects they
distribute.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] [cmake-developers] how to use cmake3.7 for building fast code infedora 24

2017-02-16 Thread Chuck Atkins
Hi Soumaia,
Please keep conversations on the mailing list so others can benefit from it
as well.  Also, I've moved this over to the CMake Users list at
cmake@cmake.org as it's a more appropriate place for this than that
developers list.


can you help me please how can i do this setup ?
>

All you should need to do is source the setup script as I described here:

source /opt/intel/bin/compilervars.sh intel64
>

That should place the compilers in the search path for your current shell.

--
Chuck Atkins
Staff R Engineer, Scientific Computing
Kitware, Inc.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread ycollette . nospam
Thanks a lot for all these informations.
I wrote a macro to be sure to replace all the -O3 flags ...

# replace_ccxx_flag: replace compilation flags from the compiler command line
# flag_orig: the flag to be replace
# flag_dest: the new flag value
macro(replace_ccxx_flag flag_orig flag_dest) 
  string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_C_FLAGS  
"${CMAKE_C_FLAGS}")
  string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS}")
  string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_C_FLAGS_RELEASE  
"${CMAKE_C_FLAGS_RELEASE}")
  string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE}")
  string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_FLAGS_DEBUG}")
  string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_CXX_FLAGS_DEBUG  
"${CMAKE_CXX_FLAGS_DEBUG}")
  string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_C_FLAGS_RELWITHDEBINFO   
"${CMAKE_C_FLAGS_RELWITHDEBINFO}")
  string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_CXX_FLAGS_RELWITHDEBINFO 
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endmacro()

Best regards,

YC

- Mail original -
De: "Chuck Atkins" 
À: "ycollette nospam" 
Cc: "Dan Liew" , "cmake" 
Envoyé: Jeudi 16 Février 2017 16:07:21
Objet: Re: [CMake] Default CMAKE_C_FLAGS value by OS





Hi YC, 



cmake version on fedora 25: 3.6.2 



Fedora is specifically patching CMake in the RPM spec file to reduce the gcc 
flag from O3 to O2 so it's the distributuion's packaging making that change, 
not CMake itself. If you download and build the source from cmake.org then 
you'll get O3 as default for gcc release builds. 


That being said, I do think we should revisit the use of O3 by default given 
the safety issues surounding it. 


- Chuck 


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [cmake-developers] how to use cmake3.7 for building fast code in fedora 24

2017-02-16 Thread Chuck Atkins
Hi Soumaia,
The compilers are not yet in your search path so CMake can't find them.
You need to setup the intel compiler's environment first with: source
/opt/intel/bin/compilervars.sh intel64 , then CMake should be able to find
your compiler.



--
Chuck Atkins
Staff R Engineer, Scientific Computing
Kitware, Inc.


On Thu, Feb 16, 2017 at 5:42 AM, Soumaia Djaadi via cmake-developers <
cmake-developers@cmake.org> wrote:

> I want to install FAST (Fast Absorption Simulation by TDDFT) code but I
> faced some problems. I use for this  Cmake 3.7 and siesta-4.0, and the
> Intel 17.X compilers, my system is linux fedora 24. FAST code is freely
> available at https://gforge.inria.fr/frs/?group_id=1179
> This is the problem:
> [ilaf@localhost Desktop]tar xzf FAST−1−1.tar.gz
> [ilaf@localhostDesktop] cd FAST-1-1/
> [ilaf@localhost FAST-1-1]mkdir build
> [ilaf@localhostFAST−1−1]cd build/
> [ilaf@localhost build]$ CC=icc FC=ifort CXX=icpc cmake -
> DSIESTA_XC_DIR=/home/ilaf/Desktop/siesta-4.0/Obj/SiestaXC ../ CMake Error
> at /usr/local/share/cmake- 3.7/Modules/CMakeDetermineCCompiler.cmake:48
> (message): Could not find compiler set in environment variable CC:
> icc. Call Stack (most recent call first): CMakeLists.txt:47 (PROJECT)
> CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error:
> CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete,
> errors occurred! See also "/home/ilaf/Desktop/FAST-1-1/
> build/CMakeFiles/CMakeOutput.log". [ilaf@localhost build]$
> Can any one help me ?
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Chuck Atkins
Hi YC,


> cmake version on fedora 25: 3.6.2
>

Fedora is specifically patching CMake in the RPM spec file to reduce the
gcc flag from O3 to O2 so it's the distributuion's packaging making that
change, not CMake itself.  If you download and build the source from
cmake.org then you'll get O3 as default for gcc release builds.

That being said, I do think we should revisit the use of O3 by default
given the safety issues surounding it.

- Chuck
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] cmake 3.7.2 centos 7 :: kwsys.testSystemTools (Failed)

2017-02-16 Thread Chuck Atkins
Hi Adrian,

I'd suggest taking the issue up with the package maintainer.  The upstream
source for CMake 3.7.2 configures, builds, and passes all tests on EL7 so
the problem seems to lie in how the RPM SPEC file is driving the build.

--
Chuck Atkins
Staff R Engineer, Scientific Computing
Kitware, Inc.

On Thu, Feb 16, 2017 at 3:32 AM, Adrian Sevcenco 
wrote:

> On 02/15/2017 09:04 PM, Chuck Atkins wrote:
>
>> Hi Adrian,
>>
> Hi! and thank you for looking into this problem!
>
>
> So, would this imply that cmake is not supported on EL7 because gcc
>> does not support cxx11 ?
>>
>>
>> That's not really what's happening.  CMake is testing the C compiler to
>> determine whether or not it supports C11 features and the C++ compiler
>> to see if it supports C++11.  The error messages are expected in many of
>> the test cases.  Here it's jsut checking to see if what it knows about
>> the features supported by the specific version of GCC line up correctly
>> with reality.  i.e. CMake thinks that gcc 4.8.2 supports certain
>> features so it tests them to make sure.  So it's not saying that CMake
>> isn't supported, just that the 1 specific test failed for some reason.
>>
>
>
>>
>>
>> So, does anyone have any idea what is the latest 3.x version that
>> can be built on centos 7?
>>
>>
>> All that being said, I wasn't able to reproduce the error with the
>> current 3.7.2 release:
>>
>> [chuck.atkins@deepthought v3.7.2]$ lsb_release -d
>> Description:CentOS Linux release 7.3.1611 (Core)
>> [chuck.atkins@deepthought v3.7.2]$ gcc --version
>> gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
>> ...
>> [chuck.atkins@deepthought v3.7.2]$ ../../source/v3.7.2/bootstrap
>> --parallel=28
>> ...
>> CMake has bootstrapped.  Now run gmake.
>> [chuck.atkins@deepthought v3.7.2]$ make -j28
>> ...
>> 100%] Built target ctest
>> [chuck.atkins@deepthought v3.7.2]$ ./bin/ctest -j 28
>> ...
>> 100% tests passed, 0 tests failed out of 431
>>
>> Label Time Summary:
>> Label1=   0.51 sec (1 test)
>> Label2=   0.51 sec (1 test)
>>
>> Total Test time (real) = 247.03 sec
>> [chuck.atkins@deepthought v3.7.2]$
>>
>> What specific versionof EL7 are you running and which version of GCC?
>>
> the standard ones :
> lsb_release -d
> Description:CentOS Linux release 7.3.1611 (Core)
>
> gcc --version
> gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
>
> i try to create cmake rpm based on the spec of
> cmake-3.6.2-6.fc25.src.rpm
> from which i removed most of the patches (i just want an rpm for centos 7)
> and used source of 3.7.2
>
> Thank you!!
> Adrian
>
>
>
>
>
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Disabling INSTALL target for subdirectory

2017-02-16 Thread Florent Castelli
Use add_subdirectory(...  EXCLUDE_FROM_ALL) to prevent anything in there to
be installed by default.
I had the issue in one project and it did fix it for us.

Also, 3rdparty libraries should be tagged like that anyway to be built only
when they are used by the main targets.

/Florent

On Feb 16, 2017 07:59, "Milan Ziegler"  wrote:

> Hi,
>
> we are using the CMake install mechanism "install(...)" to copy all
> relevant files and target binaries of the product into the CMake install
> prefix folder, for further packaging. So far so good.
>
> We are also using several thirdparty libraries, hosting them inside our
> own repository and building them along with our own code, usually using
> add_subdirectory utilizing their native CMake buildsystem.
>
> Turns out, other developers also like the CMake install mechanism.
>
> So now the INSTALL target of our whole project also installs thirdparty
> components, which we do not want to deliver with our own product (think
> static libraries, which are already linked into our executable).
>
> After a lot of googling, here's my question: Is there a clean way to
> disable the install target for a subdirectory _without_ also disabling
> it completely for the remaining project?
>
> What we already tried:
> * Setting CMAKE_INSTALL_PREFIX to a temporary directory for the
> subdirectory (doesn't work)
> * "function(install) endfunction()" to disable the install function for
> the subdirectory (breaks CMake in hilarious ways)
>
> What we now do:
> Using a custom target, we patch the cmake_install.cmake files in the
> build directories before installing (works, but it's an  abomination of
> a hack)
>
> Any help? I think it's a valid usecase for CMake but there doesn't seem
> to be an easy way to do it.
>
> We are using CMake 3.5.
>
>
> Thank you :)
>
> --
>   Milan
>   mi...@fastmail.com
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] cpack logging question

2017-02-16 Thread Gerard Bahi
Hi,
I am using the cpack variable CPACK_INSTALL_COMMANDS to run an extra
command. (First time I do this)

I have noticed that whenever the script command fails I get a log with the
output in (InstallOtput.log)

However when it runs correctly I have no log at all. I have tried to
redirect the output in the command (e.g.: "echo hi > aFile) but that does
not work either.

Is there any way to actually get the log on success? I don't mind if it is
on standard out or in a file.

Thanks!
Gerard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[cmake-developers] how to use cmake3.7 for building fast code in fedora 24

2017-02-16 Thread Soumaia Djaadi via cmake-developers
I want to install FAST (Fast Absorption Simulation by TDDFT) code but I faced 
some problems. I use for this  Cmake 3.7 and siesta-4.0, and the Intel 17.X 
compilers, my system is linux fedora 24. FAST code is freely available at 
https://gforge.inria.fr/frs/?group_id=1179This is the problem:[ilaf@localhost 
Desktop]tar xzf FAST−1−1.tar.gz[ilaf@localhostDesktop]cd FAST-1-1/ 
[ilaf@localhost FAST-1-1]mkdir build[ilaf@localhostFAST−1−1]cd build/ 
[ilaf@localhost build]$ CC=icc FC=ifort CXX=icpc cmake - 
DSIESTA_XC_DIR=/home/ilaf/Desktop/siesta-4.0/Obj/SiestaXC ../ CMake Error at 
/usr/local/share/cmake- 3.7/Modules/CMakeDetermineCCompiler.cmake:48 (message): 
Could not find compiler set in environment variable CC:icc. Call Stack (most 
recent call first): CMakeLists.txt:47 (PROJECT)CMake Error: CMAKE_C_COMPILER 
not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after 
EnableLanguage -- Configuring incomplete, errors occurred! See also 
"/home/ilaf/Desktop/FAST-1-1/build/CMakeFiles/CMakeOutput.log". [ilaf@localhost 
build]$Can any one help me ?-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread ycollette . nospam
cmake version on fedora 25: 3.6.2

And the corresponding lines in GNU.cmake (there are some differences):

  # 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 "-O2 -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 ")

So, as you can see, on  Fedora 25, there are no -O3 flags by default.

YC

- Mail original -
De: "Dan Liew" 
À: "ycollette nospam" 
Cc: "cmake" 
Envoyé: Jeudi 16 Février 2017 10:26:01
Objet: Re: [CMake] Default CMAKE_C_FLAGS value by OS

Hi,

On 16 February 2017 at 09:06,   wrote:
> Hello,
>
> My question is related to CMAKE_*_FLAGS.
> I've got a project under linux fedora 24 and, in release mode, this project 
> compiles with the -O2 flag.
> But when I switched to other platform (ubuntu, fedora 16 - I now this one is 
> quite old but I need to compile on this platform), this default optimization 
> flag changes. On some platform, it's -O3.
> And because with -O3 flag some "risky" optimizations are enabled, my project 
> hangs ...

You can find CMake's defaults for gcc/clang in

/usr/share/cmake-/Modules/Compiler/GNU.cmake

where  is your CMake version.

E.g.

https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU.cmake

You'll see lines like

```
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")
```

It's possible that the defaults changed at some point but I would be
really surprised by this. Are you sure you weren't doing a
RELWITHDEBINFO build on one system and a RELEASE build on the other?

It is possible to override these defaults by writing an overrides file
(example [1]) and then using those overrides before the `project()`
declaration in your root `CMakeLists.txt` file.
Here's an example [2].

So if you need fine grained control over the optimization level used
for different build types then I suggest you use overrides.


[1] 
https://github.com/delcypher/fp-bench/blob/ebc8f939500b6ec28e6530f65273df8bfb122970/cmake/c_flags_override.cmake
[2] 
https://github.com/delcypher/fp-bench/blob/ebc8f939500b6ec28e6530f65273df8bfb122970/CMakeLists.txt#L5

HTH,
Dan.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Dan Liew
Hi,

On 16 February 2017 at 09:06,   wrote:
> Hello,
>
> My question is related to CMAKE_*_FLAGS.
> I've got a project under linux fedora 24 and, in release mode, this project 
> compiles with the -O2 flag.
> But when I switched to other platform (ubuntu, fedora 16 - I now this one is 
> quite old but I need to compile on this platform), this default optimization 
> flag changes. On some platform, it's -O3.
> And because with -O3 flag some "risky" optimizations are enabled, my project 
> hangs ...

You can find CMake's defaults for gcc/clang in

/usr/share/cmake-/Modules/Compiler/GNU.cmake

where  is your CMake version.

E.g.

https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU.cmake

You'll see lines like

```
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")
```

It's possible that the defaults changed at some point but I would be
really surprised by this. Are you sure you weren't doing a
RELWITHDEBINFO build on one system and a RELEASE build on the other?

It is possible to override these defaults by writing an overrides file
(example [1]) and then using those overrides before the `project()`
declaration in your root `CMakeLists.txt` file.
Here's an example [2].

So if you need fine grained control over the optimization level used
for different build types then I suggest you use overrides.


[1] 
https://github.com/delcypher/fp-bench/blob/ebc8f939500b6ec28e6530f65273df8bfb122970/cmake/c_flags_override.cmake
[2] 
https://github.com/delcypher/fp-bench/blob/ebc8f939500b6ec28e6530f65273df8bfb122970/CMakeLists.txt#L5

HTH,
Dan.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread ycollette . nospam
Hello,

My question is related to CMAKE_*_FLAGS.
I've got a project under linux fedora 24 and, in release mode, this project 
compiles with the -O2 flag.
But when I switched to other platform (ubuntu, fedora 16 - I now this one is 
quite old but I need to compile on this platform), this default optimization 
flag changes. On some platform, it's -O3.
And because with -O3 flag some "risky" optimizations are enabled, my project 
hangs ...

Is it normal to have such a variations in default optimization flags in release 
mode ?

Best regards,

YC
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] cmake 3.7.2 centos 7 :: kwsys.testSystemTools (Failed)

2017-02-16 Thread Adrian Sevcenco

On 02/15/2017 09:04 PM, Chuck Atkins wrote:

Hi Adrian,

Hi! and thank you for looking into this problem!


So, would this imply that cmake is not supported on EL7 because gcc
does not support cxx11 ?


That's not really what's happening.  CMake is testing the C compiler to
determine whether or not it supports C11 features and the C++ compiler
to see if it supports C++11.  The error messages are expected in many of
the test cases.  Here it's jsut checking to see if what it knows about
the features supported by the specific version of GCC line up correctly
with reality.  i.e. CMake thinks that gcc 4.8.2 supports certain
features so it tests them to make sure.  So it's not saying that CMake
isn't supported, just that the 1 specific test failed for some reason.






So, does anyone have any idea what is the latest 3.x version that
can be built on centos 7?


All that being said, I wasn't able to reproduce the error with the
current 3.7.2 release:

[chuck.atkins@deepthought v3.7.2]$ lsb_release -d
Description:CentOS Linux release 7.3.1611 (Core)
[chuck.atkins@deepthought v3.7.2]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
...
[chuck.atkins@deepthought v3.7.2]$ ../../source/v3.7.2/bootstrap
--parallel=28
...
CMake has bootstrapped.  Now run gmake.
[chuck.atkins@deepthought v3.7.2]$ make -j28
...
100%] Built target ctest
[chuck.atkins@deepthought v3.7.2]$ ./bin/ctest -j 28
...
100% tests passed, 0 tests failed out of 431

Label Time Summary:
Label1=   0.51 sec (1 test)
Label2=   0.51 sec (1 test)

Total Test time (real) = 247.03 sec
[chuck.atkins@deepthought v3.7.2]$

What specific versionof EL7 are you running and which version of GCC?

the standard ones :
lsb_release -d
Description:CentOS Linux release 7.3.1611 (Core)

gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)

i try to create cmake rpm based on the spec of
cmake-3.6.2-6.fc25.src.rpm
from which i removed most of the patches (i just want an rpm for centos 
7) and used source of 3.7.2


Thank you!!
Adrian








smime.p7s
Description: S/MIME Cryptographic Signature
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Disabling INSTALL target for subdirectory

2017-02-16 Thread Domen Vrankar
2017-02-16 7:59 GMT+01:00 Milan Ziegler :

> Hi,
>
> we are using the CMake install mechanism "install(...)" to copy all
> relevant files and target binaries of the product into the CMake install
> prefix folder, for further packaging. So far so good.
>
> We are also using several thirdparty libraries, hosting them inside our
> own repository and building them along with our own code, usually using
> add_subdirectory utilizing their native CMake buildsystem.
>
> Turns out, other developers also like the CMake install mechanism.
>
> So now the INSTALL target of our whole project also installs thirdparty
> components, which we do not want to deliver with our own product (think
> static libraries, which are already linked into our executable).
>
> After a lot of googling, here's my question: Is there a clean way to
> disable the install target for a subdirectory _without_ also disabling
> it completely for the remaining project?
>

I would never add third party libraries to my own project in such a way
mainly because:
- either my project or external project may change a variable (cache it)
and give me a head ache figuring out where the interaction went wrong (and
having to be so intimate with their build scripts is usually poor use of
time) and
- I would rarely/somewhat independently be changing their code.

I would either build external libraries (of course along with the relevant
headers) and install them somewhere on the system (treating them as a
separate project development wise) and then write find scripts for my
project to be used with "find_package()" command
or in case I'll be making some sort of an uberbuild or changing the
external code a bit more regularly (at which point I'd start to question
the design and maturity of the external dependency...) I'd go with
ExternalProject_Add() command and then install the dependencies that I'd
still like to see in my project by calling combination of
"ExternalProject_Get_Property(... binary_dir)" and "install()" commands -
external projects won't rebuild automatically if you change the code but
you can always go into the relevant subdirectory and rebuild it there (I've
found no problems doing that as usually I won't go changing multiple
external dependencies at the same time - doing that would usually indicate
poor design or invalid use of the external dependencies or my code).

Regards,
Domen
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake