[CMake] CMake all_object_files target

2018-07-19 Thread Raphael Grimm

Hi,

I want to create a CMake target to build all object files. To do this, I 
first modified all targets to build an object file lib and link against it:


    add_library(exe_object_files OBJECT ${sources})
    set(ARMARX_EXE_OBJECT_FILES $)
    add_executable(exe $)

Since I have multiple executables, I added a target for all object files 
and added the targets for each executable as dependency:


    add_custom_target(all_exe_object_files)
    add_dependencies(all_exe_object_files exe_object_files)

This adds a all_exe_object_files target I can make, but making the 
target does nothing.

Then I tried adding the object files as sources:

    get_target_property(all_exe_object_files_sources 
all_exe_object_files SOURCES)

    if(NOT all_exe_object_files_sources)
    set(all_exe_object_files_sources)
    endif()
    list(APPEND all_exe_object_files_sources 
$)
    set_target_properties(all_exe_object_files PROPERTIES SOURCES 
"${all_exe_object_files_sources}")


This did not help.

I guess the reason is that add_library(... OBJECT ...) behaves similar 
to add_custom_command and the files are only build if a target uses them 
(and my custom target probably does not count as using the generated files).


What am I doing wrong and how can I create a target to build all object 
files?


Thanks for all hints.
Regards
Raphael




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


[Cmake-commits] CMake branch, master, updated. v3.12.0-270-g56148cb

2018-07-19 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  56148cb98f546a3a38bb6f9b191e753f8c8dd9df (commit)
  from  8dc86970c86ec53513a17f4cdb28f2a0be3ee505 (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=56148cb98f546a3a38bb6f9b191e753f8c8dd9df
commit 56148cb98f546a3a38bb6f9b191e753f8c8dd9df
Author: Kitware Robot 
AuthorDate: Fri Jul 20 00:01:06 2018 -0400
Commit: Kitware Robot 
CommitDate: Fri Jul 20 00:01:06 2018 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index d9f5396..f4e59af 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 12)
-set(CMake_VERSION_PATCH 20180719)
+set(CMake_VERSION_PATCH 20180720)
 #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
https://cmake.org/mailman/listinfo/cmake-commits


Re: [CMake] Packaging dylibs into app bundles

2018-07-19 Thread Michael Jackson
You need to pass in more paths to the “fixup_bundle()” method. Those paths are 
the paths where the libraries are located so CMake has somewhere else to look 
in case the absolute path is not encoded in the dylib itself. I could point you 
to our project but it is pretty scary in there. We use a custom generated CMake 
script that does a bunch of extra stuff that Qt requires (qt.conf) and stuff 
like that. Does work reliably for use once we got it setup.

 

https://github.com/BlueQuartzSoftware/CMP/tree/develop/OSX_Tools

https://github.com/BlueQuartzSoftware/CMP/blob/develop/OSX_Tools/CompleteBundle.cmake.in

https://github.com/BlueQuartzSoftware/CMP/blob/develop/OSX_Tools/MacOSXBundleInfo.plist.in

 

They probably are not an “exemplar” of how to do things as they were created 
when CMake 3.1 was new so there are probably better ways to get the same thing 
done but this works in our environment. I have a whole separate bash script 
that lets us create a signed .dmg file.

 

--

Mike Jackson

 

On 7/19/18, 2:04 PM, "CMake on behalf of Harry Mallon"  wrote:

 

Hi,

 

I have been messing arounds with fixup_bundle (which seems to be the correct 
function). It worked for a small test case, but only if the dylibs required had 
otool ids of their full path. Ours currently have rpath based ones (e.g. 
@rpath/libcrypto.dylib). So I get a lot of:

 

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump:
 '@rpath/ libcrypto.dylib’: No such file or directory  

 

Hmm, seems like the stuff is there somewhere to make this work…

 

Best,

Harry

 

From: Stephen McDowell 
Date: Thursday, 19 July 2018 at 17:35
To: Harry Mallon 
Cc: CMake MailingList 
Subject: Re: [CMake] Packaging dylibs into app bundles

 

Hi Harry, 

 

I don't know how useful this will be, but the Instant Meshes application 
creates an app bundle that has always worked reliably for me. Looking at the 
code, it doesn't appear like there's much custom stuff going on either. It 
starts here

 

https://github.com/wjakob/instant-meshes/blob/011fa44ab72037cbc16535090a63ead41963c1e5/CMakeLists.txt#L151

 

And there's an if APPLE block below that appears to be the core.

 

Hope that is useful :) I've never actually done this for any of my own projects 
though. And I'm pretty sure them setting the underlying GUI library and TBB to 
be static (as opposed to shared) is skirting around the issue that you are 
trying to solve (dylib stuff)...

 

-Stephen

 

On Thu, Jul 19, 2018, 9:03 AM Harry Mallon  wrote:

Hello all,

 

Is there a good tutorial/article on getting CMake to package required dylibs 
and frameworks into an app bundle for you on mac. We have a lot of custom stuff 
to do it and it is fragile and breaks a lot.

 

Thanks,

Harry

Harry Mallon

Senior Software Engineer

T +44 203 7000 989 

60 Poland Street | London | England | W1F 7NT 

Three BillboardsBlade Runner 2049  I, Tonya

 

-- 

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 

-- 

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-developers] Experiments in CMake support for Clang (header & standard) modules

2018-07-19 Thread David Blaikie
(just CC'ing you Richard in case you want to read my ramblings/spot any
inaccuracies, etc)

Excuse the delay - coming back to this a bit now. Though the varying
opinions on what modules will take to integrate with build system still
weighs on me a bit - but I'm trying to find small ways/concrete steps to
make some progress on this rather than being lost in choice/opinion
paralysis.

To that end, Stephen, I've made a fork of your example repository & a very
simple/direct change to use C++ modules as currently implemented in Clang.
Some workarounds are required for a few bugs/incomplete features (oh, one I
didn't comment in source is the use of #include for the standard library -
that'd actually be "import legacy" in the current modules TS2/atom merged
proposal, if I understand correctly - and the way I've implemented it in
the example is as-if the standard library were not modularized (so the
project wraps it in a modularized header itself))

The build.sh script shows the commands required to build it (though I
haven't checked the exact fmodule-file dependencies to check that they're
all necessary, etc) - and with current Clang top-of-tree it does build and
run the example dinnerparty program.

There are a few ideas being tossed aroudn currently for how module
dependency discovery could be done by build systems or exposed by the
compiler itself (GCC has a service protocol it can interact with when it
needs a new compiled module description, which the build system could
implement to fulfill such requests - giving the build system all
information about the inter-module dependencies without a separate ahead of
time scan and while allowing maximal parallelism (compiler could request
all needed modules then wait for them all to be ready - rather than one at
a time, so as not to stall parallelism)).

The syntax is intended to support a build system that would do the scanning
itself, though - requiring limited preprocessing (I think the preprocessing
would need to know where to stop - since it might not be able to preprocess
the whole file without error without importing modules (since those imports
could contain new macro definitions used later in the file)).

If you happen to try experimenting with any ways the commands in the
build.sh file could be run from CMake it a sensible way - even if you
hypothesize what -MM support (or other compiler hooks like the dependency
server I alluded to above, etc) for modules might look like to do so, I'd
love to chat about it/throw ideas around/try mocking up/prototyping the
sort of compiler support (I don't think there's -MM support yet, but I
could see about adding it, for example) that seems like it might be most
useful.

One thing I'm vaguely concerned about is actually the dependency of
building modules within a single library (as in this project/example - at
least the way I've built it for now - I didn't try building it as separate
.so/.a files). At least across-library we can work at the library
granularity and provide on the command line (or via a file as GCC does) the
module files for all the modules from dependent libraries. But I'm not sure
how best to determine the order in which to build files within a library -
that's where the sort of -MM-esque stuff, etc, would be necessary. (though
that sort of stuff would be useful even cross-library to speed up the build
(eg: foo_a.cppm depends on bar_a.cppm but not bar_b.cppm - don't rebuild
foo_a.cppm if bar_b.cppm changes, even though libfoo depends on libbar, etc)

On Tue, May 15, 2018 at 1:34 AM Stephen Kelly  wrote:

> David Blaikie wrote:
>
> >> Nope, scratch that ^ I had thought that was the case, but talking more
> >> with Richard Smith it seems there's an expectation that modules will be
> >> somewhere between header and library granularity (obviously some small
> >> libraries today have one or only a few headers, some (like Qt) have many
> >> - maybe those on the Qt end might have slightly fewer modules than the
> >> have headers - but still several modules to one library most likely, by
> >> the sounds of it)
> >>
> >>
> >> Why? Richard maybe you can answer that? These are the kinds of things I
> >> was trying to get answers to in the previous post to iso sg2 in the
> >> google group. I didn't get an answer as definitive as this, so maybe you
> >> can share the reason behind such a definitive answer?
> >>
> >
> > It's more that the functionality will allow this & just judging by how
> > people do things today (existing header granularity partly motivated by
> > the cost of headers that doesn't apply to modules), how they're likely to
> > do things in the future (I personally would guess people will probably
> try
> > to just port their headers to modules - and a few places where there are
> > circular dependencies in headers or the like they might glob them up into
> > one module).
>
>
> It seems quite common to have one PCH file per shared library (that's what
> Qt does for example). What makes you so sure 

Re: [CMake] CPack multiple packages

2018-07-19 Thread Domen Vrankar
2018-07-19 18:00 GMT+02:00 dbegun via CMake :

> I have a project where a lib and a binary requiring the lib are built in
> separate subdirs of the project root. Each dir contains its own
> CMakeLists.txt with build/install targets, and there is also a top level
> one, which mainly just adds subdirectories etc.
> I want to add .deb package generation with cpack. When I place the
> following in either of the inner CMakeLists, a package containing the
> binary is built.
>
> set(CPACK_BINARY_DEB "ON")
> set(CPACK_GENERATOR "DEB")
> set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
> set(CPACK_PACKAGE_VERSION ${PROJ_VERSION})
> set(CPACK_PACKAGE_CONTACT "Denis Begun dbegun@protonmail.
> com")
> set(CPACK_PACKAGE_DESCRIPTION "proj")
> set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
> include(CPack)
>
> If I place it in both inner lists, nothing changes. If I place it in the
> top level CMakeList.txt, nothing is generated. The problem is that the
> package doesn't contain the library, so the binary can't run after
> installation.
>
> What's the right direction to look in?
>

Have you tried placing the include(CPack) at the bottom of the top level
CMakeLists.txt after the rest of the CMakeLists.txt files have been
included?

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


Re: [cmake-developers] Alternative CMake Syntax

2018-07-19 Thread Taylor Holberton
Brad,

Thanks for your response. I've taken a little bit of time to consider your
thoughts and here is what I think.

Fair warning: Upstream is not outright opposed to a new language but
> it will take a lot to make something like that upstreamable, assuming
> we even find time to consider it in depth.
>

 That's perfectly okay. I'm willing to do the work and I've started a folder
in my repository for compatibility testing. The tests I've written so far
test
the interpreter that I've written to match the expected output you'd get
with
CMake running in script mode. I'm going to be thorough in the compatibility
tests in order to make this process easier.

A major obstacle to replacing the language is separating the code model
> representation from the current language.  Some work has been done to
> factor it out into a representation that can be used by the generators
> that is not tied to the implementation of the current language, but more
> work is needed and the original contributor working on that is no longer
> active.  Search back through the dev list archives for posts by Stephen
> Kelly talking about where his work left off.
>

I'll revisit this when I begin trying to integrate the library I've written
with
the main CMake project. Hopefully I can pick up where he left off!
Currently,
it's pretty trivial to add new functions using C++ code. I'm hoping as long
as
it stays that way, it should be pretty easy to use generator specific
functions.

If a new input language were to be introduced it should fix some of the
> fundamental problems with the current approach.  These include:
>
> * Each directory and its included files must be processed serially
>   due to the imperative language with side-effects.  This means we
>   can never make the implementation parallel.
>
> * The imperative form of the language also means that IDEs cannot
>   easily edit the build specification through GUI actions.  If at
>   least things like a list of sources were doable in a declarative
>   way that could help.
>

I agree that the affects of massive amounts of included code can be
quite noticeable but I think there's other ways to fix this than to make
the language declarative.

When thinking about alternative approaches before I've considered
> the idea of having most of the build spec be declarative/functional
> (no side effects) and then having an imperative part that computes
> parameters to evaluate conditions and expressions within the main
> spec.  The main spec could then be updated by IDEs in a structured
> way, evaluated in parallel, etc. while the imperative part could
> handle system introspection, configure-time file generation, etc.
>

Having a purely functional syntax would certainly be much easier to
execute in parallel, but I think that change would be too drastic to be
a net benefit. I wanted to make the syntax easier for system introspection
as well, since that's where it is most complicated.

The changes I have in mind are more for existing CMake code,
such as whether "()" really need to come after an "endif" keyword.
I'm going to make a more thorough survey of the CMake code and
draw examples when I write the new specification. The end goal is
to make very readable and easily maintainable CMake code, while
staying focused as a build system generating language.

The library could have facilities to make it easier for graphical front
ends to work with. For though, though, my main focus is improving
the syntax.


On Thu, Jul 5, 2018 at 8:07 AM Brad King  wrote:

> On 07/04/2018 01:08 PM, Taylor Holberton wrote:
> > I've been thinking about designing a new syntax for CMake
>
> Fair warning: Upstream is not outright opposed to a new language but
> it will take a lot to make something like that upstreamable, assuming
> we even find time to consider it in depth.
>
> > that better expresses some of the functionality that I've seen in
> > modern CMake code. I've started a CMake parsing library and plan
> > on using it to design the new syntax while maintaining support for
> > the traditional syntax as well.
>
> A major obstacle to replacing the language is separating the code model
> representation from the current language.  Some work has been done to
> factor it out into a representation that can be used by the generators
> that is not tied to the implementation of the current language, but more
> work is needed and the original contributor working on that is no longer
> active.  Search back through the dev list archives for posts by Stephen
> Kelly talking about where his work left off.
>
> If a new input language were to be introduced it should fix some of the
> fundamental problems with the current approach.  These include:
>
> * Each directory and its included files must be processed serially
>   due to the imperative language with side-effects.  This means we
>   can never make the implementation parallel.
>
> * The imperative form of the language also means that IDEs cannot
>   easily edit the build 

Re: [cmake-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Robert Dailey
On Thu, Jul 19, 2018 at 1:17 PM, Robert Dailey  wrote:
> On Thu, Jul 19, 2018 at 1:13 PM, Robert Dailey  
> wrote:
>> On Thu, Jul 19, 2018 at 1:07 PM, Brad King  wrote:
>>> On 07/19/2018 11:58 AM, Robert Dailey wrote:
 I can't remember where I heard about these CMake variables, but in one
 of my toolchain files I do this:

 set( CMAKE_C_COMPILER_ARG1 -m32 )
 set( CMAKE_CXX_COMPILER_ARG1 -m32 )
>>>
>>> They are not documented because they are internal implementation
>>> details.  Projects should not be setting them.
>>
>> I think this was recommended to me because `-m32` had to be the first
>> argument to clang. I'll try to dig up the conversation, I forgot who
>> recommended it and why.
>
> Found it:
> https://cmake.org/pipermail/cmake/2013-March/054161.html
>
> Looks like something Bill Hoffman suggested years ago. I still don't
> remember why I started using it, it was definitely to work around some
> sort of issue. What is the proper, public API solution that gives
> identical functionality? Should I be using `CMAKE_C_COMPILER` instead,
> and appending to it as a string from my toolchain file?
>
> Thanks in advance.

Looking at the docs a bit closer, it seems like this is the better solution:

set( CMAKE_C_FLAGS_INIT -m32 )
set( CMAKE_CXX_FLAGS_INIT -m32 )

Not sure if you'd agree, but at least I can verify it is working.
-- 

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-developers


Re: [cmake-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Robert Dailey
On Thu, Jul 19, 2018 at 1:13 PM, Robert Dailey  wrote:
> On Thu, Jul 19, 2018 at 1:07 PM, Brad King  wrote:
>> On 07/19/2018 11:58 AM, Robert Dailey wrote:
>>> I can't remember where I heard about these CMake variables, but in one
>>> of my toolchain files I do this:
>>>
>>> set( CMAKE_C_COMPILER_ARG1 -m32 )
>>> set( CMAKE_CXX_COMPILER_ARG1 -m32 )
>>
>> They are not documented because they are internal implementation
>> details.  Projects should not be setting them.
>
> I think this was recommended to me because `-m32` had to be the first
> argument to clang. I'll try to dig up the conversation, I forgot who
> recommended it and why.

Found it:
https://cmake.org/pipermail/cmake/2013-March/054161.html

Looks like something Bill Hoffman suggested years ago. I still don't
remember why I started using it, it was definitely to work around some
sort of issue. What is the proper, public API solution that gives
identical functionality? Should I be using `CMAKE_C_COMPILER` instead,
and appending to it as a string from my toolchain file?

Thanks in advance.
-- 

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-developers


Re: [cmake-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Robert Dailey
On Thu, Jul 19, 2018 at 1:07 PM, Brad King  wrote:
> On 07/19/2018 11:58 AM, Robert Dailey wrote:
>> I can't remember where I heard about these CMake variables, but in one
>> of my toolchain files I do this:
>>
>> set( CMAKE_C_COMPILER_ARG1 -m32 )
>> set( CMAKE_CXX_COMPILER_ARG1 -m32 )
>
> They are not documented because they are internal implementation
> details.  Projects should not be setting them.

I think this was recommended to me because `-m32` had to be the first
argument to clang. I'll try to dig up the conversation, I forgot who
recommended it and why.
-- 

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-developers


Re: [cmake-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Brad King
On 07/19/2018 11:58 AM, Robert Dailey wrote:
> I can't remember where I heard about these CMake variables, but in one
> of my toolchain files I do this:
> 
> set( CMAKE_C_COMPILER_ARG1 -m32 )
> set( CMAKE_CXX_COMPILER_ARG1 -m32 )

They are not documented because they are internal implementation
details.  Projects should not be setting them.

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


Re: [CMake] Packaging dylibs into app bundles

2018-07-19 Thread Harry Mallon
Hi,

I have been messing arounds with fixup_bundle (which seems to be the correct 
function). It worked for a small test case, but only if the dylibs required had 
otool ids of their full path. Ours currently have rpath based ones (e.g. 
@rpath/libcrypto.dylib). So I get a lot of:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump:
 '@rpath/ libcrypto.dylib’: No such file or directory

Hmm, seems like the stuff is there somewhere to make this work…

Best,
Harry

From: Stephen McDowell 
Date: Thursday, 19 July 2018 at 17:35
To: Harry Mallon 
Cc: CMake MailingList 
Subject: Re: [CMake] Packaging dylibs into app bundles

Hi Harry,

I don't know how useful this will be, but the Instant Meshes application 
creates an app bundle that has always worked reliably for me. Looking at the 
code, it doesn't appear like there's much custom stuff going on either. It 
starts here

https://github.com/wjakob/instant-meshes/blob/011fa44ab72037cbc16535090a63ead41963c1e5/CMakeLists.txt#L151

And there's an if APPLE block below that appears to be the core.

Hope that is useful :) I've never actually done this for any of my own projects 
though. And I'm pretty sure them setting the underlying GUI library and TBB to 
be static (as opposed to shared) is skirting around the issue that you are 
trying to solve (dylib stuff)...

-Stephen

On Thu, Jul 19, 2018, 9:03 AM Harry Mallon  wrote:
Hello all,

Is there a good tutorial/article on getting CMake to package required dylibs 
and frameworks into an app bundle for you on mac. We have a lot of custom stuff 
to do it and it is fragile and breaks a lot.

Thanks,
Harry

Harry Mallon

Senior Software Engineer

[Image removed by sender.]

T +44 203 7000 989

60 Poland Street | London | England | W1F 7NT
[Image removed by sender.]

Three Billboards

Blade Runner 2049

 I, Tonya


--

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] Packaging dylibs into app bundles

2018-07-19 Thread Stephen McDowell
Hi Harry,

I don't know how useful this will be, but the Instant Meshes application
creates an app bundle that has always worked reliably for me. Looking at
the code, it doesn't appear like there's much custom stuff going on either.
It starts here

https://github.com/wjakob/instant-meshes/blob/011fa44ab72037cbc16535090a63ead41963c1e5/CMakeLists.txt#L151

And there's an if APPLE block below that appears to be the core.

Hope that is useful :) I've never actually done this for any of my own
projects though. And I'm pretty sure them setting the underlying GUI
library and TBB to be static (as opposed to shared) is skirting around the
issue that you are trying to solve (dylib stuff)...

-Stephen

On Thu, Jul 19, 2018, 9:03 AM Harry Mallon 
wrote:

> Hello all,
>
>
>
> Is there a good tutorial/article on getting CMake to package required
> dylibs and frameworks into an app bundle for you on mac. We have a lot of
> custom stuff to do it and it is fragile and breaks a lot.
>
>
>
> Thanks,
>
> Harry
>
> Harry Mallon
>
> Senior Software Engineer
>
> 
>
> T +44 203 7000 989 
>
> 60 Poland Street | London | England | W1F 7NT
> Three Billboards Blade Runner 2049  I, Tonya
>
> --
>
> 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] Fortran and cmake_depends

2018-07-19 Thread Joshua Buckner
The command
/usr/bin/cmake -E cmake_depends "Unix Makefiles”
is taking 15 to 20 minutes to complete when I organize my Fortran 90 source 
files into subdirectories under a root directory with a single CMakeLists.txt 
file.

When the same F90 files are copied into a single directory on the same file 
system, cmake_depends takes no more than 30 seconds.

There are about 900,000 lines of F90 code organized into 700 files in 50 
subdirectories.

Is there a way to use “Unix Makefiles”, preserve the subdirectory structure and 
speed up cmake_depends?

-- 

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] CPack multiple packages

2018-07-19 Thread dbegun via CMake
I have a project where a lib and a binary requiring the lib are built in 
separate subdirs of the project root. Each dir contains its own CMakeLists.txt 
with build/install targets, and there is also a top level one, which mainly 
just adds subdirectories etc.
I want to add .deb package generation with cpack. When I place the following in 
either of the inner CMakeLists, a package containing the binary is built.

set(CPACK_BINARY_DEB "ON")
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
set(CPACK_PACKAGE_VERSION ${PROJ_VERSION})
set(CPACK_PACKAGE_CONTACT "Denis Begun 
[dbegun@protonmail.](mailto:dbe...@allmonitoring.ru)com")
set(CPACK_PACKAGE_DESCRIPTION "proj")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
include(CPack)

If I place it in both inner lists, nothing changes. If I place it in the top 
level CMakeList.txt, nothing is generated. The problem is that the package 
doesn't contain the library, so the binary can't run after installation.

What's the right direction to look in?

Sent with [ProtonMail](https://protonmail.com) Secure Email.-- 

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] Packaging dylibs into app bundles

2018-07-19 Thread Harry Mallon
Hello all,

Is there a good tutorial/article on getting CMake to package required dylibs 
and frameworks into an app bundle for you on mac. We have a lot of custom stuff 
to do it and it is fragile and breaks a lot.

Thanks,
Harry

Harry Mallon

Senior Software Engineer

[http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]

T +44 203 7000 989

60 Poland Street | London | England | W1F 7NT

[http://codex.online/?action=asset=6F42BDF2-3C6D-4054-A5D2-277E0E535942]
Three BillboardsBlade Runner 2049I, Tonya


-- 

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-developers] CMAKE_C_COMPILER_ARG# not documented?

2018-07-19 Thread Robert Dailey
I can't remember where I heard about these CMake variables, but in one
of my toolchain files I do this:

set( CMAKE_C_COMPILER_ARG1 -m32 )
set( CMAKE_CXX_COMPILER_ARG1 -m32 )

On the [cmake variables][1] page, these are not documented. I expected
an entry somewhere like `CMAKE__COMPILER_ARG<#>` but there isn't
one. Are these documented? If so, where? If not, I'll create an issue
on the gitlab project page to make sure that gets done at some point.
I would offer to do it but I'm not too sure what the variables do
myself, nor am I sure what the upper limit for ARG is.

[1]: https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html
-- 

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-developers


[CMake] Parallel builds and auto generated header files

2018-07-19 Thread Robert Dailey
I have a Version.hpp file that I have a custom command tied to which
basically runs CMake in script mode to perform configure_file() on it
during build time. The reason it does this is because it builds
Version.hpp using dynamic information, such as defining a macro with
the current SHA1 being built, etc.

I notice in parallel builds, this header file gets built too late,
because of parallel builds. What if a file includes the header and its
translation unit is built before Version.hpp is generated by the
custom command? Would it be better/simpler to do configure_file() at
configuration time instead of at build time as a custom command?
Here's the logic (some variables are defined elsewhere, but should
give you the gist):


set( generated_source_dir ${CMAKE_CURRENT_BINARY_DIR}/Source )
set( version_file_in  ${CMAKE_CURRENT_SOURCE_DIR}/Version.cpp.in )
set( version_file_out ${generated_source_dir}/Main/Version.cpp )

add_custom_command(
OUTPUT ${version_file_out}
COMMAND ${CMAKE_COMMAND}
-D IN_FILE=${version_file_in}
-D OUT_FILE=${version_file_out}
-D GIT_EXECUTABLE=${GIT_EXECUTABLE}
-D BUILD_VERSION=${ZIOSK_BUILD_VERSION}
-P ${CMAKE_CURRENT_SOURCE_DIR}/build_version_header.cmake
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)

source_group( Generated FILES ${version_file_out} )
list( APPEND source_files ${version_file_out} )
-- 

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 3.12 rc2 to rc3 Regression

2018-07-19 Thread Robert Maynard
The original author of the feature is looking at how to solve this
problem. The author has a post on the developer boards on some of the
changes needed to get everything to work:
https://cmake.org/pipermail/cmake-developers/2018-July/030760.html
On Thu, Jul 19, 2018 at 8:04 AM Michael Jackson
 wrote:
>
> Thank you for the links.
>
>
>
> After reading through all the various discussions is there a time line of 
> when the feature will be added back to CMake? Is it a matter of having 
> somebody to work the problem? Is the problem solvable?
>
> --
>
> Michael Jackson | Owner, President
>
>   BlueQuartz Software
>
> [e] mike.jack...@bluequartz.net
>
> [w] www.bluequartz.net
>
>
>
> From: Craig Scott 
> Date: Wednesday, July 18, 2018 at 9:40 AM
> To: Michael Jackson 
> Cc: CMake 
> Subject: Re: [CMake] CMake 3.12 rc2 to rc3 Regression
>
>
>
>
>
>
>
> On Wed, Jul 18, 2018 at 11:04 PM, Michael Jackson 
>  wrote:
>
> Searching the mailing list archives for the RC3 announcement I scrolled to 
> the bottom and found:
>
> Brad King (2):
>   Revert "target_link_libraries: Allow use with targets in other
> directories"
>   CMake 3.12.0-rc3
>
> Just curious what caused the issue to revert the change?
>
>
>
>
>
> The original problem report was on the dev mailing list:
>
>
>
> https://cmake.org/pipermail/cmake-developers/2018-June/030740.html
>
>
>
>
>
> The longer history of how the feature evolved and was then reverted can be 
> found here:
>
>
>
> https://gitlab.kitware.com/cmake/cmake/issues/17943
>
>
>
>
>
> --
>
> Craig Scott
>
> Melbourne, Australia
>
> https://crascit.com
>
>
>
> New book released: Professional CMake: A Practical Guide
>
> --
>
> 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 3.12 rc2 to rc3 Regression

2018-07-19 Thread Michael Jackson
Thank you for the links. 

 

After reading through all the various discussions is there a time line of when 
the feature will be added back to CMake? Is it a matter of having somebody to 
work the problem? Is the problem solvable?

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.net

 

From: Craig Scott 
Date: Wednesday, July 18, 2018 at 9:40 AM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] CMake 3.12 rc2 to rc3 Regression

 

 

 

On Wed, Jul 18, 2018 at 11:04 PM, Michael Jackson  
wrote:

Searching the mailing list archives for the RC3 announcement I scrolled to the 
bottom and found:

Brad King (2):
  Revert "target_link_libraries: Allow use with targets in other
directories"
  CMake 3.12.0-rc3

Just curious what caused the issue to revert the change?

 

 

The original problem report was on the dev mailing list:

 

https://cmake.org/pipermail/cmake-developers/2018-June/030740.html

 

 

The longer history of how the feature evolved and was then reverted can be 
found here:

 

https://gitlab.kitware.com/cmake/cmake/issues/17943

 

 

-- 

Craig Scott

Melbourne, Australia

https://crascit.com

 

New book released: Professional CMake: A Practical Guide

-- 

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.12.0-269-g8dc8697

2018-07-19 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  8dc86970c86ec53513a17f4cdb28f2a0be3ee505 (commit)
   via  16879c3960affb2fffc649003096f9c91f8396ca (commit)
   via  af041b71f7106d4bf46d820d51a51e2490661cb6 (commit)
   via  018c373f35501196af8d27bdcd23488ccf8feb9d (commit)
   via  a35eafdb22a16255a73a8a5770dbab3b55d50d0e (commit)
   via  8cefa2cba414de0af8fb4ba28c9781dcdad1fc7e (commit)
   via  bec3be11b9a5764e156deaf15c3f8cc1a2121da8 (commit)
   via  22fbf39d9ba968a4827cb1580dbbe11e4a8a0619 (commit)
   via  4436be337d6a1c54df4318a037a4f2ccf2e54f9b (commit)
   via  59af434946950ca7206551ab8c9867af6de9e1db (commit)
   via  ed289e05772529051361fc2ee1cbe6e47c68f2f7 (commit)
   via  c3ea50ede143d6a29f5d92745cd3a1964581a652 (commit)
  from  cadec7db374a5dd32dd851a6085ec66fa9daa6a1 (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=8dc86970c86ec53513a17f4cdb28f2a0be3ee505
commit 8dc86970c86ec53513a17f4cdb28f2a0be3ee505
Merge: 16879c3 22fbf39
Author: Brad King 
AuthorDate: Thu Jul 19 11:10:55 2018 +
Commit: Kitware Robot 
CommitDate: Thu Jul 19 07:11:02 2018 -0400

Merge topic 'cpack_archive_typo'

22fbf39d9b CPack: Fix log typos (spaces in the wrong places)

Acked-by: Kitware Robot 
Merge-request: !


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16879c3960affb2fffc649003096f9c91f8396ca
commit 16879c3960affb2fffc649003096f9c91f8396ca
Merge: af041b7 8cefa2c
Author: Brad King 
AuthorDate: Thu Jul 19 07:09:47 2018 -0400
Commit: Brad King 
CommitDate: Thu Jul 19 07:09:47 2018 -0400

Merge branch 'release-3.12'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af041b71f7106d4bf46d820d51a51e2490661cb6
commit af041b71f7106d4bf46d820d51a51e2490661cb6
Merge: 018c373 bec3be1
Author: Brad King 
AuthorDate: Thu Jul 19 11:08:53 2018 +
Commit: Kitware Robot 
CommitDate: Thu Jul 19 07:09:03 2018 -0400

Merge topic 'tcl-8.7'

bec3be11b9 FindTCL: Add support for version 8.7

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=018c373f35501196af8d27bdcd23488ccf8feb9d
commit 018c373f35501196af8d27bdcd23488ccf8feb9d
Merge: a35eafd ed289e0
Author: Brad King 
AuthorDate: Thu Jul 19 11:08:19 2018 +
Commit: Kitware Robot 
CommitDate: Thu Jul 19 07:08:31 2018 -0400

Merge topic 'UseSWIG-csharp-conditional'

ed289e0577 UseSWIG: Use CSharp language only if it is enabled

Acked-by: Kitware Robot 
Acked-by: Ram-Z 
Acked-by: Marc Chevrier 
Merge-request: !2219


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a35eafdb22a16255a73a8a5770dbab3b55d50d0e
commit a35eafdb22a16255a73a8a5770dbab3b55d50d0e
Merge: cadec7d c3ea50e
Author: Brad King 
AuthorDate: Thu Jul 19 11:07:22 2018 +
Commit: Kitware Robot 
CommitDate: Thu Jul 19 07:07:53 2018 -0400

Merge topic 'csharp-compiler-loaded'

c3ea50ede1 CSharp: Set CMAKE_CSharp_COMPILER_LOADED variable when language 
is enabled

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22fbf39d9ba968a4827cb1580dbbe11e4a8a0619
commit 22fbf39d9ba968a4827cb1580dbbe11e4a8a0619
Author: Sylvain Joubert 
AuthorDate: Wed Jul 18 17:15:52 2018 +0200
Commit: Sylvain Joubert 
CommitDate: Wed Jul 18 17:15:52 2018 +0200

CPack: Fix log typos (spaces in the wrong places)

diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx 
b/Source/CPack/cmCPackArchiveGenerator.cxx
index b734bb4..593b4bf 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -106,15 +106,15 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
   gf.Open((filename).c_str(), false, true);   \
   if (!GenerateHeader()) { \
 cmCPackLogger(cmCPackLog::LOG_ERROR,  \
-  "Problem to generate Header for archive < " \
+  "Problem to generate Header for archive <"  \
 << (filename) << ">." << std::endl);  \
 return 0; \
   }   \
   cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat);\
   if (!(archive)) {   \
 cmCPackLogger(cmCPackLog::LOG_ERROR, 

[Cmake-commits] CMake branch, release, updated. v3.12.0-6-g8cefa2c

2018-07-19 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, release has been updated
   via  8cefa2cba414de0af8fb4ba28c9781dcdad1fc7e (commit)
   via  bec3be11b9a5764e156deaf15c3f8cc1a2121da8 (commit)
   via  4436be337d6a1c54df4318a037a4f2ccf2e54f9b (commit)
   via  59af434946950ca7206551ab8c9867af6de9e1db (commit)
   via  ed289e05772529051361fc2ee1cbe6e47c68f2f7 (commit)
   via  c3ea50ede143d6a29f5d92745cd3a1964581a652 (commit)
  from  f84c15ef2fa30dd074fcccafccec6b9b69266619 (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/CMakeCSharpCompiler.cmake.in | 1 +
 Modules/FindTCL.cmake| 6 ++
 Modules/FindTclStub.cmake| 2 ++
 Modules/FindTclsh.cmake  | 1 +
 Modules/UseSWIG.cmake| 2 +-
 5 files changed, 11 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits


Re: [cmake-developers] ctest - how to reset default regex error list

2018-07-19 Thread Brad King
On 07/18/2018 03:26 PM, Michal Wozniak wrote:
> Is there a way to have a completely new error regex list?  

No, due to the appending logic you found.  Some new option would need
to be added to fully replace the list.

If you use CTEST_USE_LAUNCHERS the default list is much reduced.

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


Re: [cmake-developers] CMake 3.12: transitive OBJECT library failing

2018-07-19 Thread Deniz Bahadir

Am 19.07.2018 um 06:34 schrieb Levi Morrison:

I have an issue in CMake 3.12 with using transitive OBJECT
libraries.The basic skeleton is:

cmake_minimum_required(VERSION 3.12)
project(objectlib LANGUAGES CXX)

add_library(box OBJECT box.cc box.hh)
add_library(make_box OBJECT make_box.cc make_box.hh)
target_link_libraries(make_box PUBLIC box)

add_executable(main main.cc)
target_link_libraries(main PUBLIC make_box)

Note that `main` depends on `make_box`, not `box`, which should be
transitive (correct?). The full files can be seen in this gist:
https://gist.github.com/morrisonlevi/b1508531b1464921664ca06c0fd889bb

The issue is that when building`main` it does not include `box.o` in
the link line.

Given how new this feature is, I'm not sure if it's an issue with my
expectations or with CMake.


It is an issue with your expectations.

Object files are non-transitive only the usage-requirements of an OBJECT 
library are transitive.


The command `target_link_libraries(make_box PUBLIC box)` behaves for the 
usage-requirements of `box` as written (and expected by you) but for the 
object files it behaves as if you had written 
`target_link_libraries(make_box PRIVATE box)`.



The issue happens in debug builds and goes
away in release mode, presumably because the compiler inlines it.



Your guess is probably correct.


HTH,
Deniz

PS: There is already a feature-request to lift this restriction. 
(https://gitlab.kitware.com/cmake/cmake/issues/18090) If you want this 
restriction lifted you should probably participate in the discussion and 
mention possible use-cases.

--

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-developers


[CMake] problem in finding netcdf library with cmake

2018-07-19 Thread Ufuk Turuncoglu

Hi,

First of all, i am new to cmake and i would like to use it in my current 
project. So, i need to use netcdf library in my project and i am using 
VTK's FindNetCDF.cmake for it. The content of my CMakeLists.txt file as 
follows,


cmake_minimum_required (VERSION 2.6)

# The project name
project (REGESM)

# The version number
set (REGESM_VERSION_MAJOR 2)
set (REGESM_VERSION_MINOR 0)

# Add bld/ directory to cmake module path
set(REGESM_CMAKE_DIR "${REGESM_SOURCE_DIR}/bld")
set(CMAKE_MODULE_PATH ${REGESM_CMAKE_DIR} ${CMAKE_MODULE_PATH})

# Use VTK's NetCDF interface
find_package (NetCDF COMPONENTS F90)
include_directories(${NETCDF_F90_INCLUDE_DIRS})

but when i run the cmake command, i am getting following error,

-- Failed to find NetCDF interface for F90
-- Could NOT find NetCDF (missing: NETCDF_LIBRARIES NETCDF_INCLUDE_DIRS 
NETCDF_HAS_INTERFACES)
CMake Error: The following variables are used in this project, but they 
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the 
CMake files:

NETCDF_F90_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /RS/users/turuncu/DEV/RegESM2
   used as include directory in directory /RS/users/turuncu/DEV/RegESM2

in my case the netcdf library is installed and i could use it externally 
without any problem. i don't think but to be sure, is it necessary to 
install netcdf with special options to use it under cmake. i also define 
a set of environment variables but it could not help.


NETCDF_LIBRARY=/RS/progs/netcdf/4.4.0/intel/2017u5/lib
NETCDF_HOME=/RS/progs/netcdf/4.4.0/intel/2017u5
NETCDF_ROOT=/RS/progs/netcdf/4.4.0/intel/2017u5
NETCDF_INCLUDE_DIR=/RS/progs/netcdf/4.4.0/intel/2017u5/include
NETCDF4_ROOT=/RS/progs/netcdf/4.4.0/intel/2017u5
NETCDF=/RS/progs/netcdf/4.4.0/intel/2017u5

So, any suggestion will help to me at this point.

Best Regards,

--ufuk

--

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