Re: [cmake-developers] CPackRPM not dealing correctly with symlinks

2016-03-31 Thread Domen Vrankar
> I just tried, it seems to do the trick. An example source setup that was 
> breaking the RPM building before, is now functioning seemingly correctly. The 
> produced RPM gets the symlink, pointing at the location outside of the 
> package.
>
> I would actually prefer if the code printed a warning in this case. 
> (Requesting a relocatable package, yet pointing at a fixed location outside 
> of the package.) As in our case it was definitely a mistake to include soft 
> links like this in our build. But if that's hard to add to the code, then so 
> be it.

I've added warning message to the patch.

Patch is now on next branch:
https://cmake.org/gitweb?p=cmake.git;a=commit;h=5e5d0ab

Thanks,
Domen


  https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=oa-2115-v2-b;
target="_blank">https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange-v1.png;
/>
Virus-free. https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=oa-2115-v2-b;
target="_blank" style="color: #4453ea;">www.avast.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-developers


[cmake-developers] [CMake 0016043]: Support natvis source file type in the MSVC Project Generator

2016-03-31 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=16043 
== 
Reported By:Zachary Turner
Assigned To:
== 
Project:CMake
Issue ID:   16043
Category:   CMake
Reproducibility:N/A
Severity:   feature
Priority:   normal
Status: new
== 
Date Submitted: 2016-03-31 15:12 EDT
Last Modified:  2016-03-31 15:12 EDT
== 
Summary:Support natvis source file type in the MSVC Project
Generator
Description: 
Starting with Visual Studio 14 2015, vcxproj files can contain references to
natvis files which enable custom debug visualizers for project specific types.

You specify these in the vcxproj file by including them in a  tag. 
Currently the MSVC project generator has no support for these.  Through some
hackery, it is still possible to get these files to appear in the vcxproj file
with a  tag, and testing shows that it will work as long as the file has a
.natvis extension, but a) this is undocumented / unsupported reliance on an
implementation detail, b) it doesn't work if your file does not have a .natvis
extension, and c) there could be some issues with doing this which we are
unaware of.

It would be nice if you could write some CMake code like this:

`set_source_files_properties(foo.natvis LANGUAGE natvis)`

and this would cause the vcxproj generator to use a  tag instead of a
 or  tag, and this seems to fit well within CMake's language /
generation model anyway.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-03-31 15:12 Zachary Turner 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


Re: [cmake-developers] Making shared xcscheme files for Xcode from Cmake

2016-03-31 Thread Gregor Jasny via cmake-developers
Hello,

On 31/03/16 16:30, Harry Mallon wrote:
> This became an annoyance in our Cmake build system so here is a barebones 
> xcscheme creator.
> https://github.com/hm1992/CMake/commit/5345881861a4b510d3a3283825584ec90f8d2061
> 
> Current situation:
> * It seems to work for the executable targets we use in the office.
> * It only supports command line args and whether to run as root or not (but 
> this was all we needed for now).
> 
> If you have any use for it, feel free to use it. If it could be useful as a 
> basis for a more integrated module then that would also be fine.

Thank you for working on this. Schema creation is a longstanding user
request? Could you modify your generator so that one can combine
multiple targets to into one schema? Or will that require knowledge of
the target UUID from the xcodeproj file?

Some time ago I looked into adding a schema generator purely implemented
as a CMake module but came to the conclusion that it is not a viable
approach without CMake modifications. Especially the unstable UUIDs
across project re-generation gave me some headaches. So I decided that a
schema generator would best fit best within the Xcode generator.

Now there's the first task defining requirements and creating an useful
and extensible CMake language API for schema generation.

Thanks,
Gregor
-- 

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] CMake API for warnings

2016-03-31 Thread Ruslan Baratov via cmake-developers

On 31-Mar-16 20:37, Brad King wrote:

On 03/29/2016 11:24 AM, Ruslan Baratov wrote:

OTOH many such switches are
so specific that they should not be abstracted and can instead be
added to COMPILE_OPTIONS with a $ genex guard.

What about generating nothing for such cases?

Yes, that makes sense.  I was just discussing alternatives.  Simon's
post contains an example of a granular flag that makes sense to try
to abstract.


I think these warning properties should perhaps be done as usage
requirements with propagation through INTERFACE_* properties.  I'd
need to see some example use cases spelled out though.

But not if target is installed. It will be quite inconvenient if 3rd
party package add some flags to local targets. Is it possible to support
it from the box?

Yes, let's skip propagation until a valid use case is raised in the
future, if any.  Likely the directory properties can be used to specify
project-wide warning configurations without propagating across targets.


Great.


What about this:

  compile_warnings # modify directory properties
  target_compile_warnings # modify target properties
  sources_compile_warnings # modify source properties

Let's start by getting the directory/target/source properties worked
out.  First we need to figure out how to make the properties work with
language-specific warning flags and such.  We can add command porcelain
for them later.


Same API for all:

 *_compile_warnings( DISABLE 
ENABLE  TREAT_AS_ERROR ) # may be plus 'APPEND'
for extending instead of overwriting (?)

Somehow this needs to be encoded in a COMPILE_WARNINGS property or
group of properties.  They should support generator expressions for
per-configuration warnings.


What about 3 properties containing list of 's (groups 
unexpanded):


* COMPILE_WARNINGS_DISABLE # e.g. "shift-sign-overflow;unused"
* COMPILE_WARNINGS_ENABLE # e.g. "ALL"
* COMPILE_WARNINGS_TREAT_AS_ERROR # e.g. group + specific: "inline;undef"

I don't know how it will happen in CMake's internals but I think at the 
point of generating the real flags we know the language of the 
source/target and can exclude language specific warnings. I.e. if 
'switch-enum' is set for C++ target we can generate '-Wswitch-enum' but 
if target is pure C we will add no flags.


I'm not sure about mixing more languages. I think it will be similar to 
COMPILE_OPTIONS (?), see no language specification in 
`add_compile_options` command.



General warning-id's:

* ALL
* DEFAULT
* LEVEL

And `NONE`.


Ok




Group warnings-id's:

Yes, but either the warning names or the property names will need to
allow for language-specific warnings.  We need to be able to control
warnings for C, C++, Fortran, etc. separately.  OTOH it would also
be nice to be able to set C and C++ warnings together since many of
them are common.

Ideas?


See above.

Ruslo
--

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-developers] Making shared xcscheme files for Xcode from Cmake

2016-03-31 Thread Harry Mallon
Hello all,

This became an annoyance in our Cmake build system so here is a barebones 
xcscheme creator.
https://github.com/hm1992/CMake/commit/5345881861a4b510d3a3283825584ec90f8d2061

Current situation:
* It seems to work for the executable targets we use in the office.
* It only supports command line args and whether to run as root or not (but 
this was all we needed for now).

If you have any use for it, feel free to use it. If it could be useful as a 
basis for a more integrated module then that would also be fine.

Future ideas:
I'm not using Cmake on Windows at the moment but it would be great if it could 
make VS configs too.

Harry

Harry Mallon

CODEX | Software Engineer

60 Poland Street | London | England | W1F 7NT

E ha...@codexdigital.com | T +44 203 7000 
989

Website | Facebook 
| Twitter

[http://www.codexdigital.com/?action=asset=83095F5A-2233-47F5-9598-19228D7E37AE]
-- 

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] Fix for [CMake 0015701] Eclipse Generator does accept / as seperator in SOURCE_GROUP instead of \\

2016-03-31 Thread Brad King
On 03/31/2016 05:12 AM, Patrik Lehmann wrote:
> Please recognize attached patch.

Thanks!  Applied and merged to 'next' for testing with some
formatting tweaks:

 Eclipse: Implement traversal of nested source groups (#15701)
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4828a78c

-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] [CMake] add_custom_command() OUTPUT does not accept generator expressions, why?

2016-03-31 Thread Brad King
On 03/31/2016 07:26 AM, Yves Frederix wrote:
>> If anyone is interested in trying to implement generator expressions
>> for custom command outputs, I can provide more details to get started.
> 
> I am interested in having a go at this. I recently ran into this issue
> at work as well and actually tried some things already. However, I
> realized it was not that straightforward (not even talking about doing
> it 'right' here ;)). Any pointers are welcome!

Thanks!

The main challenge is shown in the cmTargetTraceDependencies::FollowName
method where it calls cmMakefile::GetSourceFileWithOutput.  This logic
is done without knowledge of the current configuration.  Therefore we
cannot expand generator expressions of the available outputs because
they may contain $.  Some table of pre-expanded per-config
outputs mapping back to their cmSourceFile instances may need to be
built.  Achieving this may even require adding a generate-time
companion of cmSourceFile that knows its configuration.  It will need
to be investigated further.

cmTargetTraceDependencies::CheckCustomCommand currently has a loop
over all configurations to generate the union of dependencies.  This
is used to allow generator expressions in the DEPENDS option.
The cmTargetTraceDependencies logic may need to be refactored to move
the loop over the configurations out to a higher level.  We may need
to trace dependencies separately for each configuration (for multi-
config generators).

Also see cmCustomCommandGenerator.  The generators will need to
be adapted to use this to get the custom command outputs with
generator expressions expanded.  They already do for the commands
and dependencies.

-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] Fix for FindPythonLibs with multiple configurations

2016-03-31 Thread Brad King
Hi Richard,

> The attached patch fixes this nesting issue.

Thanks for working on this.  Please look at revising this to avoid
exposing the _ANYCONFIG variable.  Use a "_Python_..." internal
variable that is unset, or find another way to do it without the
variable, such as `(PYTHON_RELEASE_LIBRARY OR PYTHON_DEBUG_LIBRARY)`.

> idiom for dealing with pre-specified multi-configuration libraries

I don't think our find modules ever consider the possibility of
pre-specified multi-config libraries.  Each cache entry is meant
to hold a single find_library result and the module puts them
together.  The leaking across multiple calls was not intentional.
Therefore this is not a concern for me.

Thanks,
-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] [CMake] add_custom_command() OUTPUT does not accept generator expressions, why?

2016-03-31 Thread Dan Liew
Hi,

On 28 March 2016 at 15:05, Brad King  wrote:
> On 03/27/2016 06:11 AM, Dan Liew wrote:
>> OUTPUT does not accept generator expressions, why?
>
> It hasn't been implemented.  At least at one time it would have been
> very hard to implement.  I'm not sure now because there has been a lot
> of refactoring since I last looked at it.
>
> There is some discussion here:
>
>  https://cmake.org/Bug/view.php?id=13840
>  https://cmake.org/Bug/view.php?id=12877#c28315
>
>> If I can't use generator expressions with ``OUTPUT``, how am I
>> supposed to output a file into the build directory of a target?
>
> Unfortunately it is not possible to do cleanly without fixing the
> above.  Approximations include:
>
> * Use a POST_BUILD command on the target instead.
>
> * Make the OUTPUT a timestamp file and generate the real output
>   as a side effect.
>
> If anyone is interested in trying to implement generator expressions
> for custom command outputs, I can provide more details to get started.

Thanks for the info Brad. I wish I had time to look into this but I
don't so for now I'll just work around it.

Dan.
-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [cmake-developers] Review request: FindTBB module

2016-03-31 Thread Andreas Schuh
Hi all,

I also came across these FindTBB modules while in need for one. As the more 
recent one from the OGRE project did not support MSVS 2015 yet, and also does 
not create import targets for a more convenient and “modern” CMake use of the 
TBB library targets, I wrote my own module.

Features:
- Makes use of COMPONENTS argument of find_package to look for the different 
TBB libraries.
- Adds IMPORTED library targets with IMPORTED_* and INTERFACE_* properties set 
appropriately.
- Considers TBB_ROOT as user hint and bases library search on root derived from 
TBB_INCLUDE_DIR otherwise.
- Uses PATH_SUFFIXES instead of full search paths as done by OGRE FindTBB 
module to take advantage of CMake’s default search paths.
- Checks TBB_VERSION against VERSION argument of find_package using 
find_package_handle_standard_args.

This module is part of my CMake BASIS project which, among other things, 
consists of custom CMake functions and modules which attempt to standardise and 
reduce the CMake code needed by most projects (in research). These CMake BASIS 
Modules can be found on GitHub: 
https://github.com/schuhschuh/cmake-basis-modules.

Would be great if someone could review the FindTBB module at


https://github.com/schuhschuh/cmake-basis-modules/blob/develop/FindTBB.cmake

and provide some feedback about what needs to be modified before it can be 
added to the official CMake Modules.

Best,
Andreas

> On 12 Mar 2015, at 00:04, Klaim - Joël Lamotte  wrote:
> 
> 
> ​Hi,
> 
> did you manage to improve over the DaxToolkit FindTBB module?
> 
> Thanks for your time.
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers

-- 

Powered by www.kitware.com

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

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

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

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

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

[cmake-developers] Fix for [CMake 0015701] Eclipse Generator does accept / as seperator in SOURCE_GROUP instead of \\

2016-03-31 Thread Patrik Lehmann
Hi.

I fixed the bug [CMake 0015701] in the Eclipse Generator. The handling of 
Source Groups was not correct.

Please recognize attached patch.

Kind Regards,

Patrik Lehmann

0001-CMake-0015701-Fixed-handling-of-sourceGroups-trees.patch~
Description: application/trash
-- 

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-developers] [CMake 0016041]: Add support for $ in add_custom_command()

2016-03-31 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=16041 
== 
Reported By:keksa
Assigned To:
== 
Project:CMake
Issue ID:   16041
Category:   CMake
Reproducibility:N/A
Severity:   feature
Priority:   normal
Status: new
== 
Date Submitted: 2016-03-31 03:23 EDT
Last Modified:  2016-03-31 03:23 EDT
== 
Summary:Add support for $ in
add_custom_command()
Description: 
It would be useful to support the TARGET_OBJECTS generator expression also in 
the add_custom_command() context (COMMAND and DEPENDS options).

It is useful for building list of objects and than process them by custom 
command (e.g. linker, archiver etc.).
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-03-31 03:23 keksa  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