[Cmake-commits] CMake branch, master, updated. v3.5.2-798-gadc7fcd

2016-05-31 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  adc7fcd0138cd95fb857db31f14620526aa085e4 (commit)
  from  ebcc13e1b3f4c21349ab50446f932a4c1ee03e51 (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=adc7fcd0138cd95fb857db31f14620526aa085e4
commit adc7fcd0138cd95fb857db31f14620526aa085e4
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Wed Jun 1 00:01:07 2016 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Jun 1 00:01:07 2016 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 08bf597..6c81449 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 5)
-set(CMake_VERSION_PATCH 20160531)
+set(CMake_VERSION_PATCH 20160601)
 #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


Re: [CMake] How to hundle gcc link options(like whole-archive, --allow-multiple-definition) in CMake?

2016-05-31 Thread Chaos Zhang
Thanks for your generous Mr. Atkins, what you answer me worked well and
solved my question. I would keep 'always use target names in a
CMakeLists.txt instead of the actual output file' in my mind. :-)

Chao

Chuck Atkins wrote
> Hi Chao,
> 
> You want to let CMake to as much of the work for you as possible.  You're
> still trying to explicitly pass the path to the library file to
> target_link_libraries.  If you look at the line:
> 
> target_link_library(exe1 "-Wl, --whole-archive ../sub_dir1/liblib1.a
> --no-whole-archive")
> 
> there's no CMake target name so CMake can't know about the dependency.
> However, if you use the target name instead:
> 
> top_dir/CMakeLists.txt:
> cmake_minimum_required(VERSION 3.0)
> project(foo)
> add_subdirectory(sub_dir2)
> add_subdirectory(sub_dir1)
> 
> top_dir/sub_dir1/CMakeLists.txt
> add_library(L1 1.c)
> 
> top_dit/sub_dir2/CMakeLists.txt
> add_executable(exe1 main.c)
> target_link_libraries(exe1 "-Wl,--whole-archive" *L1*
> "-Wl,--no-whole-archive")
> 
> Notice how in the target_link_libraries line for exe1, the link options
> are
> separate instead of 1 big string combining them all and the actual CMake
> target name, L1, is used instead of the output file libL1.a.  You can see
> the resulting output is what you want:
> 
> $ make VERBOSE=1
> ...
> [100%] Linking C executable exe1
> ...
> /usr/bin/cc CMakeFiles/exe1.dir/main.c.o  -o exe1 -rdynamic
> *-Wl,--whole-archive
> ../sub_dir1/libL1.a -Wl,--no-whole-archive*
> 
> Generally speaking, always use target names in a CMakeLists.txt instead of
> the actual output file.  There are a few situations where you may need the
> actual file name but they are uncommon and even then you would do it
> through target properties and generator expressions rather than hard code
> the library file name.
> 
> - Chuck
> 
> On Mon, May 30, 2016 at 8:35 AM, Chaos Zhang 

> zcsd2012@

>  wrote:
> 
>> Hi, all,
>>
>> Thanks for taking your time to review my email. I have a demo project and
>> it's structure like as below:
>>
>> top_dir
>> CMakeLists.txt
>> sub_dir1
>> CMakeLists.txt
>> sub_dir2
>> CMakeLists.txt
>>
>> top_dir/sub_dir1/CMakeLists.txt used to build `lib1` by using
>> `add_library(lib1 ...)`,
>> top_dir/sub_dir2/CMakeLists.txt used to build `exe1` with linking lib1 by
>> `target_link_library(exe1 lib1)`.
>> And the content of top_dir/CMakeLists.txt is as below:
>>
>> add_subdirectory(sub_dir2)
>> add_subdirectory(sub_dir1)
>>
>> Normally, when build target exe1, cmake will check dependency so `lib1`
>> will
>> be built before building exe1. The problem is I am transfering an existed
>> makefile project into CMake, and there are many gcc link options, like
>> "whole-archive ... no-whole-archive, allow-mutiple-definition", if use
>> like
>> `target_link_library(exe1 "-Wl, --whole-archive ../sub_dir1/liblib1.a
>> --no-whole-archive")`(The form like this, and this may not work, it just
>> a
>> e.g.), cmake seem don't built `lib1` any more. Is there any way i can use
>> target_link_library like `target_link_library(exe1 "-Wl, --whole-archive
>> ../sub_dir1/liblib1.a")` and cmake link dependency checking still work,
>> or
>> other way i can transfer these gcc link options into cmake?
>>
>> Thanks a lot,
>> Chao
>>
>>
>>
>> --
>> View this message in context:
>> http://cmake.3232098.n2.nabble.com/How-to-hundle-gcc-link-options-like-whole-archive-allow-multiple-definition-in-CMake-tp7593563.html
>> Sent from the CMake mailing list archive at Nabble.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





--
View this message in context: 

[cmake-developers] [CMake 0016133]: NO_DEFAULT_PATH is taken as a path when specified after the PATHS option.

2016-05-31 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=16133 
== 
Reported By:Alexis Wilke
Assigned To:
== 
Project:CMake
Issue ID:   16133
Category:   CMake
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2016-05-31 20:27 EDT
Last Modified:  2016-05-31 20:27 EDT
== 
Summary:NO_DEFAULT_PATH is taken as a path when specified
after the PATHS option.
Description: 
I wanted to make sure that I could get a header from my environment (i.e. source
tree) first, then from the system if no specific version in the environment was
defined there. For this purpose, I used the NO_DEFAULT_PATH option as defined in
the documentation:

https://cmake.org/cmake/help/v3.5/command/find_path.html

However, the code would always return path "/usr/include" when I expect (in my
specific case) to see path "...path-to-source.../contrib/catch"

I found that by putting the NO_DEFAULT_PATH before the PATHS option, it worked
as I first expected. It seems to me, though, that it is not correct. There
should be a check and if a path defined after the PATHS option looks like a
flag, it should be taken as such and see it as the end of the list of PATHS or
HINTS.

Steps to Reproduce: 
The failing search looks like this:

FIND_PATH(CATCH_INCLUDE_DIR
catch.hpp
PATHS
${CMAKE_SOURCE_DIR}/contrib/catch 
${CMAKE_SOURCE_DIR}/contrib
NO_DEFAULT_PATH
)

IF(NOT CATCH_INCLUDE_DIR)
# Try again with default paths as per cmake
FIND_PATH(CATCH_INCLUDE_DIR
catch.hpp
)
ENDIF()


My Ubuntu installation includes a catch.hpp under /usr/include. This is because
I have the catch package already installed:

apt-get install catch

My source directory includes a contrib/catch/catch.hpp file.

Adding a MESSAGE("Found Path? ")(${CATCH_INCLUDE_DIR}) before the IF() shows us
that the CATCH_INCLUDE_DIR is already set and it is "/usr/include" instead of
the expected "${CMAKE_SOURCE_DIR}/contrib/catch".



Additional Information: 
There is a work around, which makes me think that the problem is that PATHS (and
probably HINTS) does not properly recognize NO_DEFAULT_PATH as a flag and no see
it as a path...

All I have to do is to put the NO_DEFAULT_PATH ahead of the PATHS specification.

FIND_PATH(CATCH_INCLUDE_DIR
catch.hpp
NO_DEFAULT_PATH
PATHS
${CMAKE_SOURCE_DIR}/contrib/catch 
${CMAKE_SOURCE_DIR}/contrib
)

See also my Stackoverflow.com entry here:

http://stackoverflow.com/questions/37534142/how-do-i-get-cmake-to-choose-the-header-found-in-my-contrib-directory/37534160#37534160
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-05-31 20:27 Alexis Wilke   New Issue
==

-- 

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


[Cmake-commits] CMake branch, next, updated. v3.5.2-1627-g2fdaa20

2016-05-31 Thread Domen Vrankar
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  2fdaa209e13e01fff7186d55c1f11901262534b4 (commit)
   via  285d4d0a88b83e8ea46d315ed6d60c954e26e661 (commit)
  from  e4bfebdd3f8433b47c265020ab042ebe639765fd (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=2fdaa209e13e01fff7186d55c1f11901262534b4
commit 2fdaa209e13e01fff7186d55c1f11901262534b4
Merge: e4bfebd 285d4d0
Author: Domen Vrankar 
AuthorDate: Tue May 31 17:26:23 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue May 31 17:26:23 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

285d4d0a fixup! CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=285d4d0a88b83e8ea46d315ed6d60c954e26e661
commit 285d4d0a88b83e8ea46d315ed6d60c954e26e661
Author: Domen Vrankar 
AuthorDate: Tue May 31 23:25:59 2016 +0200
Commit: Domen Vrankar 
CommitDate: Tue May 31 23:25:59 2016 +0200

fixup! CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 300d710..c9678d6 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -31,6 +31,16 @@
 #
 # List of CPackRPM specific variables:
 #
+# .. variable:: CPACK_DEB_PACKAGE_COMPONENT
+#
+#  Enable component packaging for CPackRPM
+#
+#  * Mandatory : NO
+#  * Default   : OFF
+#
+#  If enabled (ON) multiple packages are generated. By default a single package
+#  containing files of all components is generated.
+#
 # .. variable:: CPACK_DEBIAN_PACKAGE_NAME
 #   CPACK_DEBIAN__PACKAGE_NAME
 #
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 8c51b45..d231ff0 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -42,6 +42,16 @@
 #
 # List of CPackRPM specific variables:
 #
+# .. variable:: CPACK_RPM_PACKAGE_COMPONENT
+#
+#  Enable component packaging for CPackRPM
+#
+#  * Mandatory : NO
+#  * Default   : OFF
+#
+#  If enabled (ON) multiple packages are generated. By default a single package
+#  containing files of all components is generated.
+#
 # .. variable:: CPACK_RPM_PACKAGE_SUMMARY
 #   CPACK_RPM__PACKAGE_SUMMARY
 #
@@ -410,6 +420,7 @@
 #   cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
 #
 # .. variable:: CPACK_RPM_USER_BINARY_SPECFILE
+#   CPACK_RPM__USER_BINARY_SPECFILE
 #
 #  A user provided spec file.
 #
@@ -419,8 +430,6 @@
 #  May be set by the user in order to specify a USER binary spec file
 #  to be used by CPackRPM instead of generating the file.
 #  The specified file will be processed by configure_file( @ONLY).
-#  One can provide a component specific file by setting
-#  :variable:`CPACK_RPM__USER_BINARY_SPECFILE`.
 #
 # .. variable:: CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
 #
@@ -449,7 +458,7 @@
 #  May be used to embed a pre (un)installation script in the spec file.
 #  The referred script file (or both) will be read and directly
 #  put after the ``%pre`` or ``%preun`` section
-#  If :variable:`CPACK_RPM_COMPONENT_INSTALL` is set to ON the (un)install
+#  If :variable:`CPACK_RPM_PACKAGE_COMPONENT` is set to ON the (un)install
 #  script for each component can be overridden with
 #  ``CPACK_RPM__PRE_INSTALL_SCRIPT_FILE`` and
 #  ``CPACK_RPM__PRE_UNINSTALL_SCRIPT_FILE``.
@@ -468,7 +477,7 @@
 #  May be used to embed a post (un)installation script in the spec file.
 #  The referred script file (or both) will be read and directly
 #  put after the ``%post`` or ``%postun`` section.
-#  If :variable:`CPACK_RPM_COMPONENT_INSTALL` is set to ON the (un)install
+#  If :variable:`CPACK_RPM_PACKAGE_COMPONENT` is set to ON the (un)install
 #  script for each component can be overridden with
 #  ``CPACK_RPM__POST_INSTALL_SCRIPT_FILE`` and
 #  ``CPACK_RPM__POST_UNINSTALL_SCRIPT_FILE``.

---

Summary of changes:
 Modules/CPackDeb.cmake |   10 ++
 Modules/CPackRPM.cmake |   17 +
 2 files changed, 23 insertions(+), 4 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.5.2-1625-ge4bfebd

2016-05-31 Thread Domen Vrankar
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  e4bfebdd3f8433b47c265020ab042ebe639765fd (commit)
   via  7f7326ebd77d9471d0f4c496f7214c118bc8260d (commit)
  from  d85aa5879305fb82da613028dbda41ac66f08c93 (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=e4bfebdd3f8433b47c265020ab042ebe639765fd
commit e4bfebdd3f8433b47c265020ab042ebe639765fd
Merge: d85aa58 7f7326e
Author: Domen Vrankar 
AuthorDate: Tue May 31 17:08:01 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue May 31 17:08:01 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

7f7326eb CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f7326ebd77d9471d0f4c496f7214c118bc8260d
commit 7f7326ebd77d9471d0f4c496f7214c118bc8260d
Author: Domen Vrankar 
AuthorDate: Tue May 31 22:06:39 2016 +0200
Commit: Domen Vrankar 
CommitDate: Tue May 31 23:06:38 2016 +0200

CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index ebeb387..300d710 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -2,29 +2,34 @@
 # CPackDeb
 # 
 #
-# The builtin (binary) CPack Deb generator (Unix only)
+# The built in (binary) CPack Deb generator (Unix only)
 #
 # Variables specific to CPack Debian (DEB) generator
 # ^^
 #
-# CPackDeb may be used to create Deb package using CPack.
-# CPackDeb is a CPack generator thus it uses the ``CPACK_XXX`` variables
-# used by CPack : https://cmake.org/Wiki/CMake:CPackConfiguration.
-# CPackDeb generator should work on any linux host but it will produce
-# better deb package when Debian specific tools 'dpkg-xxx' are usable on
+# CPackDeb may be used to create Deb package using :module:`CPack`.
+# CPackDeb is a :module:`CPack` generator thus it uses the ``CPACK_XXX``
+# variables used by :module:`CPack`.
+#
+# CPackDeb generator should work on any Linux host but it will produce
+# better deb package when Debian specific tools ``dpkg-xxx`` are usable on
 # the build system.
 #
 # CPackDeb has specific features which are controlled by the specifics
 # :code:`CPACK_DEBIAN_XXX` variables.
 #
 # :code:`CPACK_DEBIAN__` variables may be used in order to have
-# **component** specific values.  Note however that  refers to 
the
-# **grouping name** written in upper case. It may be either a component name or
-# a component GROUP name.
+# **component** specific values.  Note however that  refers to
+# the **grouping name** written in upper case. It may be either a component 
name
+# or a component GROUP name.
+#
+# Here are some CPackDeb wiki resources that are here for historic reasons and
+# are no longer maintained but may still prove useful:
+#
+#  - https://cmake.org/Wiki/CMake:CPackConfiguration
+#  - https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
 #
-# You'll find a detailed usage on the wiki:
-# https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29 .
-# However as a handy reminder here comes the list of specific variables:
+# List of CPackRPM specific variables:
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_NAME
 #   CPACK_DEBIAN__PACKAGE_NAME
@@ -55,7 +60,7 @@
 #
 #
_-_.deb
 #
-#  Alternatively provided package file name must end with ".deb" suffix.
+#  Alternatively provided package file name must end with ``.deb`` suffix.
 #
 #  .. note::
 #
@@ -98,7 +103,6 @@
 #  * Default   : Output of :code:`dpkg --print-architecture` (or :code:`i386`
 #if :code:`dpkg` is not found)
 #
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_DEPENDS
 #   CPACK_DEBIAN__PACKAGE_DEPENDS
 #
@@ -141,7 +145,6 @@
 #  * Mandatory : YES
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
 #   CPACK_COMPONENT__DESCRIPTION
 #
@@ -160,19 +163,23 @@
 #  Set Section control field e.g. admin, devel, doc, ...
 #
 #  * Mandatory : YES
-#  * Default   : 'devel'
+#  * Default   : "devel"
 #
 #  See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
 #
-#
 # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
 #
 #  The compression used for creating the Debian package.
-#  Possible values are: lzma, xz, bzip2 and gzip.
 #
 #  * Mandatory : YES
-#  * Default   : 'gzip'
+#  * Default   : "gzip"
+#
+#  Possible values are:
 #
+#  - lzma
+#  - xz
+#  - bzip2
+#  - gzip
 #
 # .. variable:: 

[Cmake-commits] CMake branch, next, updated. v3.5.2-1623-gd85aa58

2016-05-31 Thread Domen Vrankar
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  d85aa5879305fb82da613028dbda41ac66f08c93 (commit)
   via  6d7243240c0a1ad807207c6bfd3d6392a658f7ef (commit)
  from  d975bf0ecbf8e10f745585f82397f07aa161fdf9 (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=d85aa5879305fb82da613028dbda41ac66f08c93
commit d85aa5879305fb82da613028dbda41ac66f08c93
Merge: d975bf0 6d72432
Author: Domen Vrankar 
AuthorDate: Tue May 31 17:06:17 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue May 31 17:06:17 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

6d724324 fixup! CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d7243240c0a1ad807207c6bfd3d6392a658f7ef
commit 6d7243240c0a1ad807207c6bfd3d6392a658f7ef
Author: Domen Vrankar 
AuthorDate: Tue May 31 23:05:50 2016 +0200
Commit: Domen Vrankar 
CommitDate: Tue May 31 23:05:50 2016 +0200

fixup! CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 30b65c2..300d710 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -170,6 +170,10 @@
 # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
 #
 #  The compression used for creating the Debian package.
+#
+#  * Mandatory : YES
+#  * Default   : "gzip"
+#
 #  Possible values are:
 #
 #  - lzma
@@ -177,9 +181,6 @@
 #  - bzip2
 #  - gzip
 #
-#  * Mandatory : YES
-#  * Default   : "gzip"
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY
 #   CPACK_DEBIAN__PACKAGE_PRIORITY
 #

---

Summary of changes:
 Modules/CPackDeb.cmake |7 ---
 1 file changed, 4 insertions(+), 3 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.5.2-1621-gd975bf0

2016-05-31 Thread Domen Vrankar
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  d975bf0ecbf8e10f745585f82397f07aa161fdf9 (commit)
   via  e9985b3c34609f1385123768f9bb44ce314d51b8 (commit)
  from  b13304569f05d26976ab92a973e000a3eda1a3f5 (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=d975bf0ecbf8e10f745585f82397f07aa161fdf9
commit d975bf0ecbf8e10f745585f82397f07aa161fdf9
Merge: b133045 e9985b3
Author: Domen Vrankar 
AuthorDate: Tue May 31 16:30:32 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue May 31 16:30:32 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

e9985b3c fixup! CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9985b3c34609f1385123768f9bb44ce314d51b8
commit e9985b3c34609f1385123768f9bb44ce314d51b8
Author: Domen Vrankar 
AuthorDate: Tue May 31 22:30:16 2016 +0200
Commit: Domen Vrankar 
CommitDate: Tue May 31 22:30:16 2016 +0200

fixup! CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 866e275..30b65c2 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -25,8 +25,9 @@
 #
 # Here are some CPackDeb wiki resources that are here for historic reasons and
 # are no longer maintained but may still prove useful:
-# https://cmake.org/Wiki/CMake:CPackConfiguration
-# https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
+#
+#  - https://cmake.org/Wiki/CMake:CPackConfiguration
+#  - https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
 #
 # List of CPackRPM specific variables:
 #
@@ -380,7 +381,7 @@
 #  * Default   : OFF
 #
 #  Allows to generate shlibs control file automatically. Compatibility is 
defined by
-#  CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY variable value.
+#  :variable:`CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY` variable value.
 #
 #  .. note::
 #
@@ -390,6 +391,8 @@
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY
 #
+#  Compatibility policy for auto-generated shlibs control file.
+#
 #  * Mandatory : NO
 #  * Default   : "="
 #
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 4e68555..8c51b45 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -36,8 +36,9 @@
 #
 # Here are some CPackRPM wiki resources that are here for historic reasons and
 # are no longer maintained but may still prove useful:
-# https://cmake.org/Wiki/CMake:CPackConfiguration
-# https://cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
+#
+#  - https://cmake.org/Wiki/CMake:CPackConfiguration
+#  - https://cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
 #
 # List of CPackRPM specific variables:
 #
@@ -375,6 +376,8 @@
 #
 # .. variable:: CPACK_RPM_SPEC_INSTALL_POST
 #
+#  Deprecated - use :variable:`CPACK_RPM_POST_INSTALL_SCRIPT_FILE` instead.
+#
 #  * Mandatory : NO
 #  * Default   : -
 #  * Deprecated: YES
@@ -438,6 +441,8 @@
 # .. variable:: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
 #   CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
 #
+#  Path to file containing pre (un)install script.
+#
 #  * Mandatory : NO
 #  * Default   : -
 #
@@ -455,6 +460,8 @@
 # .. variable:: CPACK_RPM_POST_INSTALL_SCRIPT_FILE
 #   CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
 #
+#  Path to file containing post (un)install script.
+#
 #  * Mandatory : NO
 #  * Default   : -
 #
@@ -520,6 +527,8 @@
 #
 # .. variable:: CPACK_RPM_RELOCATION_PATHS
 #
+#  Packages relocation paths list.
+#
 #  * Mandatory : NO
 #  * Default   : -
 #
@@ -541,15 +550,19 @@
 #
 # .. variable:: CPACK_RPM__PACKAGE_PREFIX
 #
+#  Per component relocation path install prefix.
+#
 #  * Mandatory : NO
 #  * Default   : CPACK_PACKAGING_INSTALL_PREFIX
 #
-#  May be used to set per component CPACK_PACKAGING_INSTALL_PREFIX for
-#  relocatable RPM packages.
+#  May be used to set per component :variable:`CPACK_PACKAGING_INSTALL_PREFIX`
+#  for relocatable RPM packages.
 #
 # .. variable:: CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION
 #   CPACK_RPM_NO__INSTALL_PREFIX_RELOCATION
 #
+#  Removal of default install prefix from relocation paths list.
+#
 #  * Mandatory : NO
 #  * Default   : CPACK_PACKAGING_INSTALL_PREFIX or 
CPACK_RPM__PACKAGE_PREFIX
 #are treated as one of relocation paths

---

Summary of changes:
 Modules/CPackDeb.cmake |9 ++---
 Modules/CPackRPM.cmake |   21 +
 2 files 

[Cmake-commits] CMake branch, next, updated. v3.5.2-1619-gb133045

2016-05-31 Thread Domen Vrankar
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  b13304569f05d26976ab92a973e000a3eda1a3f5 (commit)
   via  35998cba3771984b9923cb20a71a1abc1928bbcf (commit)
  from  db87c9ddc46e8da39e282d5f1670584368aafb7e (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=b13304569f05d26976ab92a973e000a3eda1a3f5
commit b13304569f05d26976ab92a973e000a3eda1a3f5
Merge: db87c9d 35998cb
Author: Domen Vrankar 
AuthorDate: Tue May 31 16:07:23 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue May 31 16:07:23 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

35998cba CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35998cba3771984b9923cb20a71a1abc1928bbcf
commit 35998cba3771984b9923cb20a71a1abc1928bbcf
Author: Domen Vrankar 
AuthorDate: Tue May 31 22:06:39 2016 +0200
Commit: Domen Vrankar 
CommitDate: Tue May 31 22:06:39 2016 +0200

CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index ebeb387..866e275 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -2,29 +2,33 @@
 # CPackDeb
 # 
 #
-# The builtin (binary) CPack Deb generator (Unix only)
+# The built in (binary) CPack Deb generator (Unix only)
 #
 # Variables specific to CPack Debian (DEB) generator
 # ^^
 #
-# CPackDeb may be used to create Deb package using CPack.
-# CPackDeb is a CPack generator thus it uses the ``CPACK_XXX`` variables
-# used by CPack : https://cmake.org/Wiki/CMake:CPackConfiguration.
-# CPackDeb generator should work on any linux host but it will produce
-# better deb package when Debian specific tools 'dpkg-xxx' are usable on
+# CPackDeb may be used to create Deb package using :module:`CPack`.
+# CPackDeb is a :module:`CPack` generator thus it uses the ``CPACK_XXX``
+# variables used by :module:`CPack`.
+#
+# CPackDeb generator should work on any Linux host but it will produce
+# better deb package when Debian specific tools ``dpkg-xxx`` are usable on
 # the build system.
 #
 # CPackDeb has specific features which are controlled by the specifics
 # :code:`CPACK_DEBIAN_XXX` variables.
 #
 # :code:`CPACK_DEBIAN__` variables may be used in order to have
-# **component** specific values.  Note however that  refers to 
the
-# **grouping name** written in upper case. It may be either a component name or
-# a component GROUP name.
+# **component** specific values.  Note however that  refers to
+# the **grouping name** written in upper case. It may be either a component 
name
+# or a component GROUP name.
+#
+# Here are some CPackDeb wiki resources that are here for historic reasons and
+# are no longer maintained but may still prove useful:
+# https://cmake.org/Wiki/CMake:CPackConfiguration
+# https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
 #
-# You'll find a detailed usage on the wiki:
-# https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29 .
-# However as a handy reminder here comes the list of specific variables:
+# List of CPackRPM specific variables:
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_NAME
 #   CPACK_DEBIAN__PACKAGE_NAME
@@ -55,7 +59,7 @@
 #
 #
_-_.deb
 #
-#  Alternatively provided package file name must end with ".deb" suffix.
+#  Alternatively provided package file name must end with ``.deb`` suffix.
 #
 #  .. note::
 #
@@ -98,7 +102,6 @@
 #  * Default   : Output of :code:`dpkg --print-architecture` (or :code:`i386`
 #if :code:`dpkg` is not found)
 #
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_DEPENDS
 #   CPACK_DEBIAN__PACKAGE_DEPENDS
 #
@@ -141,7 +144,6 @@
 #  * Mandatory : YES
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
 #   CPACK_COMPONENT__DESCRIPTION
 #
@@ -160,19 +162,22 @@
 #  Set Section control field e.g. admin, devel, doc, ...
 #
 #  * Mandatory : YES
-#  * Default   : 'devel'
+#  * Default   : "devel"
 #
 #  See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
 #
-#
 # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
 #
 #  The compression used for creating the Debian package.
-#  Possible values are: lzma, xz, bzip2 and gzip.
+#  Possible values are:
 #
-#  * Mandatory : YES
-#  * Default   : 'gzip'
+#  - lzma
+#  - xz
+#  - bzip2
+#  - gzip
 #
+#  * Mandatory : YES
+#  * Default   : "gzip"
 #
 # .. variable:: 

[cmake-developers] Topic "add-opencl-imported-target" good to merge?

2016-05-31 Thread Matthäus G . Chajdas
Hi,

I've just pushed "add-opencl-imported-target" which adds an imported
target to FindOpenCL. The whole change is rather small:

https://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=6c53137a19e482140db3dc97b626af38348f2c71

Good to merge this to next for testing?

Cheers,
  Matthäus
-- 

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-developers] output expressions fails with either a build.ninja error or wrong escaped space

2016-05-31 Thread Brad King
On 05/31/2016 02:28 PM, jerry@web.de wrote:
> thanks for the response. I was eager to solve this. I came up 
> with this solution:
>  
> -I$,\t-I>
>  
> I searched for a solution where i can use it without the quotes
> while the tab (\t) takes care that it is recognized as a generator
> expression. Now my command line looks a little bit odd with all these
> tabs but it works.
> 
> So i simply wonder whether it is possible to add to cmake 
> something like \s for a space.

One can already escape a space with `\ `, but it won't help you.

The only reason your `\t` hack works is because the incomplete
escaping performed by generators for add_custom_{command,target}
without the VERBATIM option does not consider TABs to need quoting.
Without that option, other needed quoting or escaping may not work.

There is no officially supported way to do what you're trying to do.
If you find a hack that happens to work due to implementation details
of the current version of CMake, there is no guarantee they will work
in future versions.  Please see my previous response for a supported
alternative approach.

-Brad

-- 

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-developers] output expressions fails with either a build.ninja error or wrong escaped space

2016-05-31 Thread jerry . c . t
Hi,
 
thanks for the response. I was eager to solve this. I came up 
with this solution:
 
-I$,\t-I>
 
I searched for a solution where i can use it without the quotes
while the tab (\t) takes care that it is recognized as a generator
expression. Now my command line looks a little bit odd with all these
tabs but it works.
 
I choosed the \t because i need spaces between the arguments and 
there is no escape sequence for spaces.
 
So i simply wonder whether it is possible to add to cmake 
something like \s for a space.
 
Jerry
 
On 31.05.2016 16:22, Brad King wrote:
> On 05/28/2016 01:15 PM, jerry@web.de wrote:
>> "-I$, -I>"
>
> This tells CMake to generate a single argument consisting of the
> entire expanded value. We have no syntax to expand lists into
> multiple command line arguments after evaluation of generator
> expressions. Without the quotes the "$<" and ">" parts appear
> in different arguments to add_custom_command and so it is not
> recognized as a generator expression.
>
> It is not currently possible to do what you are trying to do.
> You'll need to use file(GENERATE) to produce a script holding
> the desired command instead. Then launch the script as the
> custom target's command.
>
> -Brad
> 
-- 

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-developers] output expressions fails with either a build.ninja error or wrong escaped space

2016-05-31 Thread jerry . c . t

Hi,

 

thanks for the response. I was eager to solve this. I came up with this solution:

 

-I$,\t-I>

 

I searched for a solution where i can use it without the quotes while the tab (\t) takes care

that it is recognized as a generator _expression_. Now my command line looks a little bit odd

with all this tabs but it works.

 

I choosed the \t because i need spaces between the arguments and there is no escape

sequence for spaces.

 

So i simply wonder whether it is possible to add to cmake something like \s for a space.

 

Jerry

 

On 31.05.2016 16:22, Brad King wrote:
> On 05/28/2016 01:15 PM, jerry@web.de wrote:
>> "-I$, -I>"
>
> This tells CMake to generate a single argument consisting of the
> entire expanded value. We have no syntax to expand lists into
> multiple command line arguments after evaluation of generator
> expressions. Without the quotes the "$<" and ">" parts appear
> in different arguments to add_custom_command and so it is not
> recognized as a generator _expression_.
>
> It is not currently possible to do what you are trying to do.
> You'll need to use file(GENERATE) to produce a script holding
> the desired command instead. Then launch the script as the
> custom target's command.
>
> -Brad
> 
-- 

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-developers] [MODERN] CMake ~3.6 vs Qt 5.6 vs MSVC2015

2016-05-31 Thread Konstantin Podsvirov
Hi all! Modern master updated! :-)

It's time to upgrade: CMake 3.5.20160531 now available!

Previously had problems with that, but now it seems that it works.

Let me remind you of the link.

Windows 32bit:

http://ifw.podsvirov.pro/cmake/cmake-master-win32-online.exe

Windows 64bit:

http://ifw.podsvirov.pro/cmake/cmake-master-win64-online.exe

If you have used it before, you can update via "CMake Maintenance Tool"

I used Windows 7, but it should work for Windows Vista and Windows 8 and 
Windows 10.

I ask those wishing to test the functionality.

And new:

Linux (Debian) amd64:

http://ifw.podsvirov.pro/cmake/cmake-master-amd64-online.run

Please test it :-)

> 01.10.2015, 09:29, Konstantin Podsvirov" :
>>  Hi all! Modern master alive! :-)
>>
>>  It's been almost a month and it's time to upgrade:
>>
>>  3.3.20150901 CMake => CMake 3.3.20151001
>>
>>  Dear friends, I have a question and call for help.
>>
>>  With my assistance the project has an option for component installation 
>> project:
>>
>>  CMake_INSTALL_COMPONENTS
>>
>>  Unfortunately not all files found your component.
>>  The files to be installed without specifying a component fall into 
>> 'Unspecified' component.
>>  Need to parse them out and assign them to the component context.
>>
>>  Now have the components:
>>
>>  - cmake;
>>  - ctest;
>>  - cpack;
>>  - cmake-gui;
>>  - sphinx-man;
>>  - sphinx-html;
>>  - sphinx singlehtml;
>>  - sphinx-qthelp
>>
>>  and General for everything else
>>
>>  Is Unspecified;
>>
>>  A list of unaccounted for 'Unspecified' of files to install on the Window 
>> is attached.
>>
>>  Links to the installers were specified earlier (see below).
>>
>>  On 28.07.2015, 17:49, "Konstantin Podsvirov" :
>>>  Hi dear CMake developers!
>>>
>>>  27.07.2015, 18:52, "Brad King" :
  On 07/24/2015 03:46 AM, Konstantin Podsvirov wrote:
>  To solve the problem you run cmake-gui is now possible with the
>  the following changes:

  Applied as two separate commits with minor tweaks:

  cmake-gui: Install Qt5 Windows platform plugin
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42f0155b

  CMake: Add option CMake_INSTALL_DEPENDENCIES
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=068e7962
>>>
>>>  Code now in 'master' branch.
>>>
>>>  Thanks, Brad!
>>>
>>>  Meet/install/CMake built modern update on MSVC2015 c QtDialog based on Qt 
>>> 5.5 from today :-)
>>>
>>>  Windows 32bit:
>>>
>>>  http://ifw.podsvirov.pro/cmake/cmake-master-win32-online.exe
>>>
>>>  Windows 64bit:
>>>
>>>  http://ifw.podsvirov.pro/cmake/cmake-master-win64-online.exe
>>>
>>>  cmake-gui should work now, but if not, then update your system and install
>>>
>>>  The Visual C++ Redistributable for Visual Studio 2015 from the link below:
>>>
>>>  http://www.microsoft.com/en-us/download/details.aspx?id=48145
>>>
>>>  As always, questions and suggestions are welcome.
>>
>>  --
>>  Regards,
>>  Konstantin Podsvirov
>>  ,--
>>
>>  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
>
> Regards,
> Konstantin Podsvirov
> --
>
> 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

Regards,
Konstantin Podsvirov
-- 

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 

Re: [CMake] CMake+QT always failed for the first build, and succeeded for second build or later.

2016-05-31 Thread irene w
It seems CMakw could not find the generated moc_xxx files.  I modified the
scripts to specify moc_xxx files is generated, but it still has same errors.

ADD_CUSTOM_COMMAND ( OUTPUT ${Qt_tmp}/moc_GMWindow.cpp
 COMMAND ${QT_MOC_CMD} ${GM_DIR}/GMWindow.h -o
${Qt_tmp}/moc_GMWindow.cpp
 DEPENDS ${GM_DIR}/GMWindow.h
   )
ADD_CUSTOM_TARGET(generate_foo DEPENDS ${Qt_tmp}/moc_GMWindow.cpp)
SET_SOURCE_FILES_PROPERTIES(${Qt_tmp}/moc_GMWindow.cpp PROPERTIES GENERATED
1)
SET_PROPERTY(SOURCE ${GM_DIR}/GMWindow.cpp APPEND PROPERTY OBJECT_DEPENDS
${Qt_tmp}/moc_GMWindow.cpp)

.
add_dependencies (GM generate_foo)


Does the Macro  "SET_SOURCE_FILES_PROPERTIES" with "GENERATED" setting work
for this purposes?  Any help would be greatly appreciated !


On Wed, May 25, 2016 at 12:48 PM, irene w  wrote:

> Hi,
>
> I am compiling a simple Qt3 application on Linux using CMake. In my case,
> I need to build moc_xxx files with custom options and output to a specified
> directory, So, I was not using CAMKE_AUTO macros. My cmake scripts create a
> "Qt_tmp" directory and output moc_xxx there.
>
> It looked it always failed to link the moc_xxx files for the first time
> build when there is no "Qt_tmp" directory, and succeeded if I ran build
> again if the "Qt_tmp" directory and moc_xxx files created by the failed
> build were kept without removing.  However, it'll fail if I delete
> the "Qt_tmp" directory.
>
> Even it failed at the first build, the moc_xxx files were
> successfully created in the "Qt_tmp" directory.
>
> Here is my cmake scripts and the errors I got.  Can anyone help me to
> figure out the issues? Any help would be greatly appreciated.  Thanks.
>
> CMakeLists.txt
>
> -
> cmake_minimum_required(VERSION 3.4.1)
> project (GM_Application CXX)
> SET (CMAKE_SYSTEM_NAME Linux)
> SET (CMAKE_CXX_COMPILER ${COMPILER_PATH}${CROSS_COMPILE}g++)
> set (GM_DIR ${CMAKE_CURRENT_SOURCE_DIR})
> set (QT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ThirdParty/Qt/4.8.6)
> LINK_DIRECTORIES (${QT_DIR}/lib)
> INCLUDE_DIRECTORIES ("${QT_DIR}/include"
>  "${GM_DIR}"
> )
> # Compiling QT moc and ui  #
> set (QT_MOC_CMD ${QT_DIR}/bin/moc -I$(QT_DIR)/mkspecs/linux-g++
> -I${QT_DIR}/include -I${QT_DIR}/include/QtGui)
> file (MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Qt_tmp)
> set (Qt_tmp ${CMAKE_CURRENT_SOURCE_DIR}/Qt_tmp)
> add_custom_target (Moc_GMWindows
>COMMAND ${QT_MOC_CMD} ${GM_DIR}/GMWindow.h -o
> ${Qt_tmp}/moc_GMWindow.cpp
>   )
>
> # Compiling application  #
> file (GLOB GM_SOURCES ${GM_DIR}/*.h ${GM_DIR}/*.cpp)
> file (GLOB Moc_SOURCES ${Qt_tmp}/*.h ${Qt_tmp}/*.cpp)
> add_executable (GM ${GM_SOURCES} ${Moc_SOURCES})
> target_include_directories (GM PRIVATE ${Qt_tmp})
> add_dependencies (GM Moc_GMWindows)
> target_link_libraries (GM QtGui)
>
>
> ---
> Errors:
>
> Scanning dependencies of target Moc_GMWindows
> [  0%] Built target Moc_GMWindows
> Scanning dependencies of target GM
> [ 14%] Building CXX object GM/CMakeFiles/GM.dir/GM/GM.cpp.o
> [ 42%] Building CXX object GM/CMakeFiles/GM.dir/GM/GMService.cpp.o
> [ 67%] Building CXX object GM/CMakeFiles/GM.dir/GM/GMWindow.cpp.o
> [ 85%] Building CXX object GM/CMakeFiles/GM.dir/GM/main.cpp.o
> [100%] Linking CXX executable ../bin/GM
> CMakeFiles/GM.dir/GM/GMWindow.cpp.o: In function
> `GM::GMWindow::emitAppendMessage(QStrin
> g)':
> /GM/GMWindow.cpp:217: undefined reference to
> `GM::GMWindow::appendMessage(QString)'
> CMakeFiles/GM.dir/GM/GMWindow.cpp.o:(.rodata._ZTVN2GM8GMWindowE[vtable for
> GM::GMWindow]
> +0x8): undefined reference to `GM::GMWindow::metaObject() const'
> CMakeFiles/GM.dir/GM/GMWindow.cpp.o:(.rodata._ZTVN2GM8GMWindowE[vtable for
> GM::GMWindow]
> +0xc): undefined reference to `GM::GMWindow::qt_metacast(char const*)'
> CMakeFiles/GM.dir/GM/GMWindow.cpp.o:(.rodata._ZTVN2GM8GMWindowE[vtable for
> GM::GMWindow]
> +0x10): undefined reference to
> `GM::GMWindow::qt_metacall(QMetaObject::Call, int, void**)'
> collect2: ld returned 1 exit status
> make[2]: *** [bin/GM] Error 1
> make[1]: *** [GM/CMakeFiles/GM.dir/all] Error 2
> make: *** [all] Error 2
>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_6400203814648417669_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
-- 

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: 

Re: [CMake] C header file cross dependency

2016-05-31 Thread Wagner Martin
Thank you for your answer!

> > How do I resolve something like this? Right now CMake evaluates the
> > compiler includes in the order that subdirectories are added. This
> > gives me an compilation error in uart.c that terminal.h cannot be
> > found.
> 
> This is not a cmake-problem, but seems to be a code-structure-issue.
> 
> I'm guessing here: if terminal needs the uart-code shouldn't it be the
> uart-code filling in a terminal-function. Interface vs. implementation?
> Could you elaborate more on how terminal and uart are linked?

The terminal code implements a "printf()" equivalent function to log debug and 
state information. All input is then directly written to the UART.

The UART driver now wants to use this terminal logging function. It doesn't 
care how printf() works. 

In the end, this is necessary because there is no file system to store the log 
information to. I would like to have this:
uart_write(uart2) -> syslog(prio, errormsg) -> syslog.txt on file system.
But I have:
uart_write(uart2) -> printf(errormsg) -> uart_write(uart1) -> PC with running 
terminal software

> 
> Regarding cmake: I suggest you stop using include_directories() and
> start using target_include_directories() and
> target_compile_definitions() instead of add_definitions().

I will have a look at this.

> 
> Limiting yourself to this way of doing libraries and targets, cmake will
> force you to structure your code in a more standard way - and will
> provide you with clean visibility between different targets.
> 
> Could you provide a working, stripped down example to show the problem
> provided via github (in an example repo).

I will try to do this within a few days...

> 
> More comments below.
> 
> > Some excerpt of my project. I've tried to keep the example as simple
> > as possible.
> >
> > My directory structure looks something like that:
> > /
> > CMakeLists.txt
> > src +
> > +CMakeLists.txt(1)
> > +drivers+
> > |   +uart.c
> > |   +uart.h
> > |   +...
> > |   +CMakeLists.txt(2)
> > +os-+
> > |   +terminal.c
> > |   +terminal.h
> > |   +...
> > |   +CMakeLists.txt(3)
> >
> >
> > (1):
> >
> > SET(drivers "drivers")
> > SET(terminal "terminal")
> >
> > SET(drivers_lib ${drivers})
> > SET(terminal_lib ${terminal})
> >
> > SET(ARCHIVE_INSTALL_DIR lib)
> > SET(INCLUDE_INSTALL_DIR include)
> >
> > SET(headers_private "_headers_private") # internal headers
> > SET(headers_public "_headers_public")   # public headers go into
> > package
> >
> > ADD_SUBDIRECTORY(${drivers})
> > ADD_SUBDIRECTORY(${terminal})
> 
> I think it is common practice now to use lower-case for cmake-commands
> now.

OK.

> 
> > ## drivers
> >
> > ##  Sources
> > ---
> > SET(sources "uart.c"
> > )
> >
> > ##  Header includes
> > ---
> > SET(headers "${CMAKE_CURRENT_SOURCE_DIR}/"
> > )
> > SET(${drivers}${headers_public} ${headers} PARENT_SCOPE)
> >
> > INCLUDE_DIRECTORIES(${headers}
> > ${${terminal}${headers_public}}
> > )
> 
> While the ${${var}${var2}} (seems to) work, it is error-prone, IMHO.
> 
> Standard cmake-commands can work with relative paths and are evaluating
> them correctly taking into account ${CMAKE_CURRENT_SOURCE_DIR} (most of
> the time. So you could use ../uart in terminal/ 

This is what I did to continue working...

> - but it would be better
> if it comes indirectly via target_include_directories() and
> target_link_libraries()

...and this is why I asked the list :-)

> 
> >[..]
> >
> > And finally this creates the package in root directory CMakeLists.txt:
> >
> > SET(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CPackOptions.cmake)
> > # CPackOptions.cmake contains package file name SET(CPACK_GENERATOR
> > "TBZ2") INCLUDE(CPack)
> 
> Due to the circular header-dependency the binaries of terminal and uart
> should have the same mutual dependency. In this case you could build
> them in within one target.

Yes, I could do that. But I wanted to get away from one single, monolithic 
makefile...
This is why I created one CMake file for every functional unit of my source 
code (drivers, RTOS, terminal and so on).

regards,
Martin

-- 

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, next, updated. v3.5.2-1615-g875eb5d

2016-05-31 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  875eb5dddbaf8b18a69dd5edc1f790fec39afee8 (commit)
   via  ebcc13e1b3f4c21349ab50446f932a4c1ee03e51 (commit)
   via  88ede8e5eaee60eee9357dc1d4384ebe74ca35c8 (commit)
   via  8afadaa5b27802e670db27d160eb1966cfdec394 (commit)
   via  e0fbd95f06ca4d1b0274da5b9a1e3c58c4f93ca2 (commit)
   via  797a332a61273e8fd1791e44800850fcbb6cd9aa (commit)
  from  6b5bdb6b271a91ac6de709c683c43ecffdb8925c (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=875eb5dddbaf8b18a69dd5edc1f790fec39afee8
commit 875eb5dddbaf8b18a69dd5edc1f790fec39afee8
Merge: 6b5bdb6 ebcc13e
Author: Brad King 
AuthorDate: Tue May 31 10:27:07 2016 -0400
Commit: Brad King 
CommitDate: Tue May 31 10:27:07 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
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.5.2-1617-gdb87c9d

2016-05-31 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  db87c9ddc46e8da39e282d5f1670584368aafb7e (commit)
   via  bcf396885112670532bcde2f36d29a5a3c9b1815 (commit)
  from  875eb5dddbaf8b18a69dd5edc1f790fec39afee8 (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=db87c9ddc46e8da39e282d5f1670584368aafb7e
commit db87c9ddc46e8da39e282d5f1670584368aafb7e
Merge: 875eb5d bcf3968
Author: Brad King 
AuthorDate: Tue May 31 10:31:54 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue May 31 10:31:54 2016 -0400

Merge topic 'UseJava-fix-typo' into next

bcf39688 UseJava: Fix grammar error in documentation


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bcf396885112670532bcde2f36d29a5a3c9b1815
commit bcf396885112670532bcde2f36d29a5a3c9b1815
Author: Matthew Woehlke 
AuthorDate: Mon May 9 13:53:47 2016 -0400
Commit: Brad King 
CommitDate: Tue May 31 10:30:57 2016 -0400

UseJava: Fix grammar error in documentation

diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index b59fe34..7b3416e 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -169,7 +169,7 @@
 #
 # ::
 #
-#The add_jar() functions sets some target properties. You can get these
+#The add_jar() function sets some target properties. You can get these
 #properties with the
 #   get_property(TARGET  PROPERTY )
 #command.

---

Summary of changes:
 Modules/UseJava.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.5.2-797-gebcc13e

2016-05-31 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  ebcc13e1b3f4c21349ab50446f932a4c1ee03e51 (commit)
   via  d4e58dd979d001c3e28283b184ebe71d9c88bf76 (commit)
   via  154fa2c544e53a77351b33446ce690ef36c646c0 (commit)
   via  e4a361bbbf165c030ab05b7558b7a702b84ef358 (commit)
  from  88ede8e5eaee60eee9357dc1d4384ebe74ca35c8 (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=ebcc13e1b3f4c21349ab50446f932a4c1ee03e51
commit ebcc13e1b3f4c21349ab50446f932a4c1ee03e51
Merge: 88ede8e d4e58dd
Author: Brad King 
AuthorDate: Tue May 31 10:26:51 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue May 31 10:26:51 2016 -0400

Merge topic 'suppress-dashboard-warnings'

d4e58dd9 CTestCustom: Suppress scanbuild warning on unsigned left shift
154fa2c5 CTestCustom: Suppress warnings about rand() on OpenBSD
e4a361bb CTestCustom: Suppress Windows manifest unrecognized element warning


---

Summary of changes:
 CTestCustom.cmake.in |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


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


Re: [cmake-developers] output expressions fails with either a build.ninja error or wrong escaped space

2016-05-31 Thread Brad King
On 05/28/2016 01:15 PM, jerry@web.de wrote:
>   "-I$, -I>"

This tells CMake to generate a single argument consisting of the
entire expanded value.  We have no syntax to expand lists into
multiple command line arguments after evaluation of generator
expressions.  Without the quotes the "$<" and ">" parts appear
in different arguments to add_custom_command and so it is not
recognized as a generator expression.

It is not currently possible to do what you are trying to do.
You'll need to use file(GENERATE) to produce a script holding
the desired command instead.  Then launch the script as the
custom target's command.

-Brad

-- 

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] How to hundle gcc link options(like whole-archive, --allow-multiple-definition) in CMake?

2016-05-31 Thread Chuck Atkins
Hi Chao,

You want to let CMake to as much of the work for you as possible.  You're
still trying to explicitly pass the path to the library file to
target_link_libraries.  If you look at the line:

target_link_library(exe1 "-Wl, --whole-archive ../sub_dir1/liblib1.a
--no-whole-archive")

there's no CMake target name so CMake can't know about the dependency.
However, if you use the target name instead:

top_dir/CMakeLists.txt:
cmake_minimum_required(VERSION 3.0)
project(foo)
add_subdirectory(sub_dir2)
add_subdirectory(sub_dir1)

top_dir/sub_dir1/CMakeLists.txt
add_library(L1 1.c)

top_dit/sub_dir2/CMakeLists.txt
add_executable(exe1 main.c)
target_link_libraries(exe1 "-Wl,--whole-archive" *L1*
"-Wl,--no-whole-archive")

Notice how in the target_link_libraries line for exe1, the link options are
separate instead of 1 big string combining them all and the actual CMake
target name, L1, is used instead of the output file libL1.a.  You can see
the resulting output is what you want:

$ make VERBOSE=1
...
[100%] Linking C executable exe1
...
/usr/bin/cc CMakeFiles/exe1.dir/main.c.o  -o exe1 -rdynamic
*-Wl,--whole-archive
../sub_dir1/libL1.a -Wl,--no-whole-archive*

Generally speaking, always use target names in a CMakeLists.txt instead of
the actual output file.  There are a few situations where you may need the
actual file name but they are uncommon and even then you would do it
through target properties and generator expressions rather than hard code
the library file name.

- Chuck

On Mon, May 30, 2016 at 8:35 AM, Chaos Zhang  wrote:

> Hi, all,
>
> Thanks for taking your time to review my email. I have a demo project and
> it's structure like as below:
>
> top_dir
> CMakeLists.txt
> sub_dir1
> CMakeLists.txt
> sub_dir2
> CMakeLists.txt
>
> top_dir/sub_dir1/CMakeLists.txt used to build `lib1` by using
> `add_library(lib1 ...)`,
> top_dir/sub_dir2/CMakeLists.txt used to build `exe1` with linking lib1 by
> `target_link_library(exe1 lib1)`.
> And the content of top_dir/CMakeLists.txt is as below:
>
> add_subdirectory(sub_dir2)
> add_subdirectory(sub_dir1)
>
> Normally, when build target exe1, cmake will check dependency so `lib1`
> will
> be built before building exe1. The problem is I am transfering an existed
> makefile project into CMake, and there are many gcc link options, like
> "whole-archive ... no-whole-archive, allow-mutiple-definition", if use like
> `target_link_library(exe1 "-Wl, --whole-archive ../sub_dir1/liblib1.a
> --no-whole-archive")`(The form like this, and this may not work, it just a
> e.g.), cmake seem don't built `lib1` any more. Is there any way i can use
> target_link_library like `target_link_library(exe1 "-Wl, --whole-archive
> ../sub_dir1/liblib1.a")` and cmake link dependency checking still work, or
> other way i can transfer these gcc link options into cmake?
>
> Thanks a lot,
> Chao
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/How-to-hundle-gcc-link-options-like-whole-archive-allow-multiple-definition-in-CMake-tp7593563.html
> Sent from the CMake mailing list archive at Nabble.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