[Cmake-commits] CMake branch, master, updated. v3.15.4-1313-g3da9733

2019-10-04 Thread Kitware Robot via Cmake-commits
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  3da9733142f15d86e798320226d84ccb71a337f9 (commit)
  from  395e5f77fcd900b4a7a48eaa2da2e3554b694cf1 (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=3da9733142f15d86e798320226d84ccb71a337f9
commit 3da9733142f15d86e798320226d84ccb71a337f9
Author: Kitware Robot 
AuthorDate: Sat Oct 5 00:01:05 2019 -0400
Commit: Kitware Robot 
CommitDate: Sat Oct 5 00:01:05 2019 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 0515f6c..68e58bf 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 15)
-set(CMake_VERSION_PATCH 20191004)
+set(CMake_VERSION_PATCH 20191005)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 

---

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
https://cmake.org/mailman/listinfo/cmake-commits


Re: [CMake] Use interface libraries for providing compile options and definitions

2019-10-04 Thread Dustyn Blasig
Thanks for the input. I will try to upload an example soon and upload an
issue.

In the meantime, I think I'll go the route of providing a library of helper
functions like `add_my_flag_target_definitions(other_library PRIVATE)` that
any targets can call. It ends up being about the same amount of CMake code
and doesn't run into the installation issues. If a client wants to bundle
more of them together, they can simply create their own
`add_my_superset_of_target_definitions(my_lib PRIVATE)` or something
similar that calls all the other functions as needed.

On Thu, Oct 3, 2019 at 5:30 PM Craig Scott  wrote:

>
>
> On Fri, Oct 4, 2019 at 2:27 AM Dustyn Blasig  wrote:
>
>> Hi All,
>>
>> I have been cleaning up our legacy CMake to use newer features (available
>> in 3.12+) including trying to use target_...() functions nearly
>> exclusively. As part of this, I was toying with cleaning up our use cases
>> for adding compiler flags and similar definitions using real targets and
>> target_link_libraries.
>>
>> For instance, as a simple example, let's say I wanted to add/provide a
>> definition MY_FLAG, I could do something like...
>>
>> ```
>> add_library(my_flag INTERFACE)
>> target_compile_definitions(my_flag INTERFACE MY_FLAG=1)
>>
>> add_library(other_library SHARED ...)
>> target_link_libraries(other_library ... *PRIVATE *my_flag)
>>
>> export/install rules
>> ```
>>
>> I want this library to be private to my component, and it's only used
>> under the PRIVATE banner. However, the issue I'm running into is with the
>> install/export rules. I get an error similar to ...
>>
>> ```
>> CMake Error: install(EXPORT "MY_PROJECT" ...) includes target
>> "other_library" which requires target "my_flag" that is not in the export
>> set.
>> ```
>>
>> If my_flag is defined in my component, I can add it to the export set
>> perhaps to workaround the issue, but in many cases, it would be coming from
>> a helper script in another sub-project I'm fetching using FetchContent and
>> don't want to expose the functionality via my export scripts.
>>
>> (1) Is it recommended to use interface libraries to clean up compile
>> defintions, etc.
>>
>
> Personally, I don't typically use interface libraries to do this, I prefer
> to list the requirements directly on the targets that they apply to. Some
> people/projects may choose to collect a commonly used set of requirements
> into an interface library, but one drawback with that is it creates the
> temptation to lump a bunch of things together in that interface library
> "for convenience", but end up with some targets having requirements applied
> to them that aren't actually requirements for those targets at all. Used
> appropriately, the technique can be helpful, but don't over-use it. ;)
>
>
>
>> (2) Should it be possible to link privately such libraries and not have
>> the export functionality complain?
>>
>
> From a usage requirement point of view, the interface library shouldn't
> need to be exported/installed because it is private. However, from a
> linking point of view, a shared library still needs all other libraries it
> links against for the linker to succeed at link time. Interface libraries
> don't appear on the linker command line, so they shouldn't need to be
> installed for linking to succeed, but I'm wondering if CMake's internal
> logic isn't properly handling this. Can you open an issue in CMake's
> gitlab  and attach a
> complete, minimal example which reproduces the error (seems you're almost
> there with the extracted commands above)?
>
> --
> Craig Scott
> Melbourne, Australia
> https://crascit.com
>
> Get the hand-book for every CMake user: Professional CMake: A Practical
> Guide 
> Consulting services (CMake, C++, build/release processes):
> https://crascit.com/services
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] HOWTO declare component inter-dependencies in multi-component packages

2019-10-04 Thread stefan


On 2019-10-03 5:24 p.m., Kyle Edwards wrote:

On Thu, 2019-10-03 at 17:08 -0400, stefan wrote:

Yes, that is exactly what I'm trying to do, but it doesn't seem to
have any effect. That is, `dpkg --info ...` doesn't list the
additional dependency, and correspondingly, running `apt-get install
...` on the component package file will install the package without
first installing the prerequisite component.
Consider this declaration:
   set(CPACK_COMPONENTS_ALL runtime development mstool)
If I now write
   set(CPACK_COMPONENT_DEVELOPMENT_DEPENDS runtime)
I will see no effect. That is, the "development" package still does
not depend on the "runtime" package.
So I try this:
   set(CPACK_COMPONENT_DEVELOPMENT_DEPENDS RUNTIME)
in case capitalization is required. Now the "runtime" component seems
to get packaged twice (as per the cmake logs), but still no correct
dependencies.
Is it time for a bug report ?

Please send us a minimal CMakeLists.txt that reproduces the issue.


Sure. Here it is. The relevant line part is line 5. Please let me know 
what I'm doing wrong.


Thanks,

Stefan

--

  ...ich hab' noch einen Koffer in Berlin...


project(demo)
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "joe random")
set(CPACK_COMPONENTS_ALL runtime dev)
set(CPACK_COMPONENT_DEV_DEPENDS runtime) # <- this line doesn't seem to have 
any effect
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
include(CPack)

file(WRITE a "runtime")
file(WRITE b "dev")

install(FILES a DESTINATION share COMPONENT runtime)
install(FILES b DESTINATION share COMPONENT dev)
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-04 Thread Alexander
Dear Cristian,

It would better for me not modifying CMakeFiles.txt, because as I wrote it
is 3rd party stuff (we just download it and build, but some different way).
My concern is why the command line option -DCMAKE_SHARED_LINKER_FLAGS
deliberately ignores /DEF: option. It this behavior expected? What is the
logic behind this behavior? Why not simply allow /DEF in
CMAKE_SHARED_LINKER_FLAGS and not cut it?

--
Best Regards,
Alexander

On Fri, 4 Oct 2019 at 16:54, Cristian Adam  wrote:

> Hi,
>
> You should simply add the my_defs.def file as a source files to
> add_library/add_executable.
> CMake will automagically pass /DEF: to the linker with my_defs.def
>
> Cheers,
> Cristian.
>
> On Fri, Oct 4, 2019 at 4:45 PM Alexander 
> wrote:
>
>> Hello,
>>
>> I would like to add an extra .defs file for linking of a DLL on Windows.
>> I want to use the CMake command line option
>> -DCMAKE_SHARED_LINKER_FLAGS="/DEF:my_defs.defs". I expect that besides the
>> automatically generated
>> /bin/.dir/Release/exports.def i see additionally
>> /DEF:my_defs.defs in the resulting linking command, but it does not happen.
>>
>> What is especially irritating that CMake deliberately removes namely
>> /DEF: from CMAKE_SHARED_LINKER_FLAGS. Any other word combinations (if I
>> write  /DEF111:my_defs.def for example) are accepted and I see them the
>> linking command.
>>
>> I tried to reach the same goal using a CMakeLists.txt like this:
>>
>> set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEF:my_defs.def")
>>
>> but it did not help - the same way CMake removes my /DEF: option.
>>
>> Could you please open a ticket to fix this behavior to not cut /DEF:
>> option from CMAKE_***_LINKER_FLAGS?
>>
>> On my opinion CMake should not interpret or modify the content of
>> CMAKE_SHARED_LINKER_FLAGS value, but should put it entirely as the user
>> specified it. If you have another opinion, please provide any other
>> possibility to pass an arbitrary arguments to the linking command "as is"
>> so that they are not modified.
>>
>> Any workaround is highly appreciated (better command-line, because we
>> build 3rd party software and it would not really fine to change
>> CMakeLists.txt)
>>
>> --
>> Best Regards,
>> Alexander Samoilov
>> Build & Integration Engineer
>> Compart AG, 71034 Böblingen Germany
>> --
>>
>> 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:
>> https://cmake.org/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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-04 Thread Cristian Adam
Hi,

You should simply add the my_defs.def file as a source files to
add_library/add_executable.
CMake will automagically pass /DEF: to the linker with my_defs.def

Cheers,
Cristian.

On Fri, Oct 4, 2019 at 4:45 PM Alexander 
wrote:

> Hello,
>
> I would like to add an extra .defs file for linking of a DLL on Windows. I
> want to use the CMake command line option
> -DCMAKE_SHARED_LINKER_FLAGS="/DEF:my_defs.defs". I expect that besides the
> automatically generated
> /bin/.dir/Release/exports.def i see additionally
> /DEF:my_defs.defs in the resulting linking command, but it does not happen.
>
> What is especially irritating that CMake deliberately removes namely /DEF:
> from CMAKE_SHARED_LINKER_FLAGS. Any other word combinations (if I write
> /DEF111:my_defs.def for example) are accepted and I see them the linking
> command.
>
> I tried to reach the same goal using a CMakeLists.txt like this:
>
> set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEF:my_defs.def")
>
> but it did not help - the same way CMake removes my /DEF: option.
>
> Could you please open a ticket to fix this behavior to not cut /DEF:
> option from CMAKE_***_LINKER_FLAGS?
>
> On my opinion CMake should not interpret or modify the content of
> CMAKE_SHARED_LINKER_FLAGS value, but should put it entirely as the user
> specified it. If you have another opinion, please provide any other
> possibility to pass an arbitrary arguments to the linking command "as is"
> so that they are not modified.
>
> Any workaround is highly appreciated (better command-line, because we
> build 3rd party software and it would not really fine to change
> CMakeLists.txt)
>
> --
> Best Regards,
> Alexander Samoilov
> Build & Integration Engineer
> Compart AG, 71034 Böblingen Germany
> --
>
> 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:
> https://cmake.org/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:
https://cmake.org/mailman/listinfo/cmake


[CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-04 Thread Alexander
Hello,

I would like to add an extra .defs file for linking of a DLL on Windows. I
want to use the CMake command line option
-DCMAKE_SHARED_LINKER_FLAGS="/DEF:my_defs.defs". I expect that besides the
automatically generated
/bin/.dir/Release/exports.def i see additionally
/DEF:my_defs.defs in the resulting linking command, but it does not happen.

What is especially irritating that CMake deliberately removes namely /DEF:
from CMAKE_SHARED_LINKER_FLAGS. Any other word combinations (if I write
/DEF111:my_defs.def for example) are accepted and I see them the linking
command.

I tried to reach the same goal using a CMakeLists.txt like this:

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEF:my_defs.def")

but it did not help - the same way CMake removes my /DEF: option.

Could you please open a ticket to fix this behavior to not cut /DEF: option
from CMAKE_***_LINKER_FLAGS?

On my opinion CMake should not interpret or modify the content of
CMAKE_SHARED_LINKER_FLAGS value, but should put it entirely as the user
specified it. If you have another opinion, please provide any other
possibility to pass an arbitrary arguments to the linking command "as is"
so that they are not modified.

Any workaround is highly appreciated (better command-line, because we build
3rd party software and it would not really fine to change CMakeLists.txt)

--
Best Regards,
Alexander Samoilov
Build & Integration Engineer
Compart AG, 71034 Böblingen Germany
-- 

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:
https://cmake.org/mailman/listinfo/cmake


[Cmake-commits] CMake branch, master, updated. v3.15.4-1312-g395e5f7

2019-10-04 Thread Kitware Robot via Cmake-commits
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  395e5f77fcd900b4a7a48eaa2da2e3554b694cf1 (commit)
   via  a988cc8789bf00dd8783192f95e02ccbfea78302 (commit)
   via  f9e2c17458d5d9998b8b87a953b50a4837fe80e9 (commit)
   via  38c1f2ab222d4174137722a890c2a730d9083e2f (commit)
   via  1144a4fa47d467ac3bd2f70ed2dffd04734d53a7 (commit)
   via  83c1657ff7fda3dc86b49bc9039f59449f2d8ae4 (commit)
   via  bc4f8f4472ae94b7053ee373a7406774900f350c (commit)
  from  65020633e62eaf0d86f85bcf1240caacd2095de9 (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=395e5f77fcd900b4a7a48eaa2da2e3554b694cf1
commit 395e5f77fcd900b4a7a48eaa2da2e3554b694cf1
Merge: a988cc8 83c1657
Author: Brad King 
AuthorDate: Fri Oct 4 14:13:13 2019 +
Commit: Kitware Robot 
CommitDate: Fri Oct 4 10:15:08 2019 -0400

Merge topic 'unity-step'

83c1657ff7 Unity build: Generate sources during Compute step

Acked-by: Kitware Robot 
Merge-request: !3884


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a988cc8789bf00dd8783192f95e02ccbfea78302
commit a988cc8789bf00dd8783192f95e02ccbfea78302
Merge: f9e2c17 38c1f2a
Author: Brad King 
AuthorDate: Fri Oct 4 14:13:00 2019 +
Commit: Kitware Robot 
CommitDate: Fri Oct 4 10:14:20 2019 -0400

Merge topic 'pch-multi-language'

38c1f2ab22 PCH: Fix CMake test files indentation
1144a4fa47 PCH: Add multi-language PCH generation support

Acked-by: Kitware Robot 
Merge-request: !3885


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9e2c17458d5d9998b8b87a953b50a4837fe80e9
commit f9e2c17458d5d9998b8b87a953b50a4837fe80e9
Merge: 6502063 bc4f8f4
Author: Brad King 
AuthorDate: Fri Oct 4 14:12:51 2019 +
Commit: Kitware Robot 
CommitDate: Fri Oct 4 10:13:00 2019 -0400

Merge topic 'pch-clang-pch-regen'

bc4f8f4472 PCH: Use clang's own pch functionality instead of the GCC 
emulation

Acked-by: Kitware Robot 
Merge-request: !3881


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38c1f2ab222d4174137722a890c2a730d9083e2f
commit 38c1f2ab222d4174137722a890c2a730d9083e2f
Author: Cristian Adam 
AuthorDate: Thu Oct 3 23:11:02 2019 +0200
Commit: Cristian Adam 
CommitDate: Thu Oct 3 23:24:21 2019 +0200

PCH: Fix CMake test files indentation

diff --git a/Tests/RunCMake/PrecompileHeaders/DisabledPch-check.cmake 
b/Tests/RunCMake/PrecompileHeaders/DisabledPch-check.cmake
index fa37c2c..8cf0fc9 100644
--- a/Tests/RunCMake/PrecompileHeaders/DisabledPch-check.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/DisabledPch-check.cmake
@@ -1,17 +1,17 @@
 if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
-set(foo_pch_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/CMakeFiles/foo.dir/cmake_pch.h")
-set(foobar_pch_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/CMakeFiles/foobar.dir/cmake_pch.h")
+  set(foo_pch_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/CMakeFiles/foo.dir/cmake_pch.h")
+  set(foobar_pch_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/CMakeFiles/foobar.dir/cmake_pch.h")
 else()
-set(foo_pch_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/cmake_pch.h")
-set(foobar_pch_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/cmake_pch.h")
+  set(foo_pch_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/cmake_pch.h")
+  set(foobar_pch_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/cmake_pch.h")
 endif()
 
 if (NOT EXISTS ${foo_pch_header})
-   set(RunCMake_TEST_FAILED "Generated foo pch header ${foo_pch_header} does 
not exist")
-   return()
+  set(RunCMake_TEST_FAILED "Generated foo pch header ${foo_pch_header} does 
not exist")
+  return()
 endif()
 
 if (EXISTS ${foobar_pch_header})
-   set(RunCMake_TEST_FAILED "Generated foobar pch header ${foobar_pch_header} 
should not exist")
-   return()
+  set(RunCMake_TEST_FAILED "Generated foobar pch header ${foobar_pch_header} 
should not exist")
+  return()
 endif()
diff --git a/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake 
b/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
index 5a304f5..44fe2da 100644
--- a/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
@@ -1,17 +1,17 @@
 if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
-set(foobar_pch_h_header 
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/CMakeFiles/foobar.dir/cmake_pch.h")
-set(foobar_pch_hxx_header