Re: [CMake] Private dependencies of static libraries exported as targets

2016-08-18 Thread Nicholas Braden
Ah! When I do that, it also solves the include path bloat issue. No
longer does `client` know about the include directory of `bar`. Seems
it was a difference in minimum CMake version respecting old behavior.

In FooTargets.cmake, I see this line:
INTERFACE_LINK_LIBRARIES "\$"

Awesome. Of course, this only helps Ivan if they can use CMake >= 3.0
- still good to know that the solution is simple.

On Thu, Aug 18, 2016 at 8:29 AM, Tamás Kenéz  wrote:
> Ivan,
>
>> But, if library `foo` is built as static, then its clients suddenly
>> become required to link to `bar` as well, and this information is not
>> recorded anywhere!
>
> I changed the cmake_minimum_required version in your projects from 2.8 to
> 3.0 which fixed the issue.
> (I tried it with cmake 3.6.1)
>
> Tamas
>
> On Wed, Aug 17, 2016 at 2:55 PM, Ivan Shapovalov 
> wrote:
>>
>> On 2016-08-17 at 05:19 -0500, Nicholas Braden wrote:
>> > Huh, this is weird. It seems to be an issue with the export/import
>> > mechanism. If you make a project where everything is in the same
>> > CMakeLists.txt and there is no install step, there is no include
>> > directory pollution. See my attached project for example. On my
>> > system
>> > I run this to build:
>> >
>> > mkdir build && cd build && cmake -G "MinGW Makefiles" .. && cmake
>> > --build . -- VERBOSE=1
>> >
>> > When it builds main:
>> >
>> > C:\MinGW\bin\g++.exe@CMakeFiles/main.dir/includes_CXX.rsp
>> > -std=gnu++14 -o CMakeFiles\main.dir\main.cpp.obj -c
>> > C:\Users\LB\Code\cmake-private-static-dependencies\main.cpp
>> >
>> > The entirety of the includes_CXX.rsp file:
>> >
>> > -IC:/Users/LB/Code/cmake-private-static-dependencies/c
>> >
>> > The project you provided definitely has the include directory
>> > pollution problem - the client includes_CXX.rsp file contains an
>> > -isystem directive for bar. It looks like the generated
>> > FooTargets-noconfig.cmake contains this line (setting properties on
>> > foo):
>> >
>> > IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG "bar"
>> >
>> > I'm not fully sure but I think this is wrong because it is saying
>> > that
>> > bar is a public dependency. This seems to be an oversight in CMake,
>> > as
>> > there is no 'private' alternative of the above variable for imported
>> > targets - that is, there is no IMPORTED_LINK_LIBRARIES_NOCONFIG, thus
>> > there is no way for CMake to provide special treatment as in my
>> > example. It seems CMake literally converts private dependencies of
>> > static libraries to public dependencies only when using the export
>> > functionality.
>> >
>> > ...and that's as much as I can figure right now. Can you confirm that
>> > my attached example doesn't exhibit the problem? If it doesn't have
>> > the include directory pollution problem, I'd be inclined to say it's
>> > a
>> > bug with the export/import functionality.
>>
>> Indeed, your sample project does not exhibit include path bloat. So
>> this really looks like a limitation of CMake import/export mechanism
>> (I say limitation, not bug, because there are simply no target
>> properties detailed enough to allow this behavior).
>>
>> There is a property IMPORTED_LINK_DEPENDENT_LIBRARIES_ which is
>> _almost_ what we want, but just for shared libraries.
>>
>> --
>> Ivan Shapovalov / intelfx /
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>
>
-- 

Powered by www.kitware.com

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

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

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

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

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

Re: [CMake] howto retrigger check_function_exists

2016-08-18 Thread David Cole via CMake
The code is not meant to be called. The "require += info_size" line is
to keep compiler optimizations from stripping out the info_size string
variable from the final executable.

This code is simply built, and then the resulting binary is scanned
for the string "INFO:size[],key[]" and then the string
analyzed to pull out the size

Does that make sense?


D



On Thu, Aug 18, 2016 at 3:24 PM, J Decker  wrote:
> I don't understand how this works
>
> info_size[1] will return 'N'
> how will it know it has to pass like 14 arguments to get the right
> character?  And even then the character '4' is not the value 4.
>
>
>
> - this is the code generated for check_type_size
>
> #include 
> #include 
> #include 
> #include "time.h"
>
>
> #undef KEY
> #if defined(__i386)
> # define KEY '_','_','i','3','8','6'
> #elif defined(__x86_64)
> # define KEY '_','_','x','8','6','_','6','4'
> #elif defined(__ppc__)
> # define KEY '_','_','p','p','c','_','_'
> #elif defined(__ppc64__)
> # define KEY '_','_','p','p','c','6','4','_','_'
> #endif
>
> #define SIZE (sizeof(time_t))
> char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
>   ('0' + ((SIZE / 1)%10)),
>   ('0' + ((SIZE / 1000)%10)),
>   ('0' + ((SIZE / 100)%10)),
>   ('0' + ((SIZE / 10)%10)),
>   ('0' +  (SIZE% 10)),
>   ']',
> #ifdef KEY
>   ' ','k','e','y','[', KEY, ']',
> #endif
>   '\0'};
>
> #ifdef __CLASSIC_C__
> int main(argc, argv) int argc; char *argv[];
> #else
> int main(int argc, char *argv[])
> #endif
> {
>   int require = 0;
>   require += info_size[argc];
>   (void)argv;
>   return require;
> }
>
>
>
>
>
>
> On Thu, Aug 18, 2016 at 11:50 AM, J Decker  wrote:
>>
>> I was trying to add some libraries for CMAKE_REQUIRED_LIBRARIES to be able
>> to find more symbols, but changing that didn't cause the
>> check_function-0exists to re-run; is there a shorter way to get it to re-run
>> without deleting CMakeCache.txt?
>> I'm not abject to manually editing files; I had tried to remove just the
>> cached variable reference, but that didn't help.
>>
>> Same for check_type_size() I guess
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] howto retrigger check_function_exists

2016-08-18 Thread J Decker
I don't understand how this works

info_size[1] will return 'N'
how will it know it has to pass like 14 arguments to get the right
character?  And even then the character '4' is not the value 4.



- this is the code generated for check_type_size

#include 
#include 
#include 
#include "time.h"


#undef KEY
#if defined(__i386)
# define KEY '_','_','i','3','8','6'
#elif defined(__x86_64)
# define KEY '_','_','x','8','6','_','6','4'
#elif defined(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#endif

#define SIZE (sizeof(time_t))
char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
  ('0' + ((SIZE / 1)%10)),
  ('0' + ((SIZE / 1000)%10)),
  ('0' + ((SIZE / 100)%10)),
  ('0' + ((SIZE / 10)%10)),
  ('0' +  (SIZE% 10)),
  ']',
#ifdef KEY
  ' ','k','e','y','[', KEY, ']',
#endif
  '\0'};

#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
  int require = 0;
  require += info_size[argc];
  (void)argv;
  return require;
}






On Thu, Aug 18, 2016 at 11:50 AM, J Decker  wrote:

> I was trying to add some libraries for CMAKE_REQUIRED_LIBRARIES to be able
> to find more symbols, but changing that didn't cause the
> check_function-0exists to re-run; is there a shorter way to get it to
> re-run without deleting CMakeCache.txt?
> I'm not abject to manually editing files; I had tried to remove just the
> cached variable reference, but that didn't help.
>
> Same for check_type_size() I guess
>
-- 

Powered by www.kitware.com

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

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

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

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

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

[CMake] howto retrigger check_function_exists

2016-08-18 Thread J Decker
I was trying to add some libraries for CMAKE_REQUIRED_LIBRARIES to be able
to find more symbols, but changing that didn't cause the
check_function-0exists to re-run; is there a shorter way to get it to
re-run without deleting CMakeCache.txt?
I'm not abject to manually editing files; I had tried to remove just the
cached variable reference, but that didn't help.

Same for check_type_size() I guess
-- 

Powered by www.kitware.com

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

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

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

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

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

Re: [CMake] SecTrustEvaluateAsync != NULL

2016-08-18 Thread Laura Fowler
Hi Sean:
Many thanks for suggesting to use clang++. I was able to successfully
compile cmake.

Cheers,
Laura


On Thu, Aug 18, 2016 at 10:45 AM, Sean McBride  wrote:
> On Thu, 18 Aug 2016 09:27:43 -0600, Laura Fowler said:
>
>>
>>/Users/LauraLaptop/InstalledSoftwares/sourcecode/cmake-3.6.1/Utilities/
>>cmcurl/lib/vtls/darwinssl.c:1999:6:
>>error: ‘SecTrustEvaluateAsync’ undeclared (first use in this function)
>>
>>   if(SecTrustEvaluateAsync != NULL) {
>>
>>  ^
>
> If you look in SecTrust.h (where the SecTrustEvaluateAsync() API is 
> declared), you'll see it's wrapped in
>
> #ifdef __BLOCKS__
>
> Likely your complier (gcc 5.3) does not support blocks.  Is there a reason 
> you want to use gcc instead of the system complier (clang)?
>
> Cheers,
>
> --
> 
> Sean McBride, B. Eng s...@rogue-research.com
> Rogue Researchwww.rogue-research.com
> Mac Software Developer  Montréal, Québec, Canada



-- 
!-
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: la...@ucar.edu
phone: 303-497-1628

!-
-- 

Powered by www.kitware.com

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

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

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

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

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

Re: [CMake] CPack: Combine Debug and Release build

2016-08-18 Thread clinton
One thing I've done before is to tell cpack to bundle up 2 projects in one 
cpack session. 
One project is a debug build, and the other a release build. 

if ( CREATE_MULTI_CONFIG_PACKAGE ) 
set (CPACK_INSTALL_CMAKE_PROJECTS 
# self project 
" ${CMAKE_CURRENT_BINARY_DIR} ; ${CMAKE_PROJECT_NAME} ;ALL;/" 
# other project 
" ${DIR_TO_OTHER_PROJECT} ; ${CMAKE_PROJECT_NAME} ;ALL;/" 
) 
endif () 

- On Aug 18, 2016, at 5:12 AM, tonka tonka  wrote: 

> Hey,

> I want to switch to cpack to build my zip, installer etc.. Everything works
> fine, but I am not able to get my debug build into my cpack end file. It will
> always use the release build, which is fine for end-user deployment but not 
> for
> and sdk installer, because on windows I have to provide both
> build-configurations.

> Can anybody give me some advice what I can do to get such result?

> Thanks in advance
> Tonka
> --

> Powered by www.kitware.com

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

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

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

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

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

Powered by www.kitware.com

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

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

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

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

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

Re: [CMake] SecTrustEvaluateAsync != NULL

2016-08-18 Thread Sean McBride
On Thu, 18 Aug 2016 09:27:43 -0600, Laura Fowler said:

>
>/Users/LauraLaptop/InstalledSoftwares/sourcecode/cmake-3.6.1/Utilities/
>cmcurl/lib/vtls/darwinssl.c:1999:6:
>error: ‘SecTrustEvaluateAsync’ undeclared (first use in this function)
>
>   if(SecTrustEvaluateAsync != NULL) {
>
>  ^

If you look in SecTrust.h (where the SecTrustEvaluateAsync() API is declared), 
you'll see it's wrapped in

#ifdef __BLOCKS__

Likely your complier (gcc 5.3) does not support blocks.  Is there a reason you 
want to use gcc instead of the system complier (clang)?

Cheers,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada
-- 

Powered by www.kitware.com

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

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

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

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

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

Re: [CMake] Installing a list of components

2016-08-18 Thread tom.edwards
That was one of the other problems I encountered during the initial conversion 
to CMake. I fixed it by wrapping all the ADD_* commands with my own functions 
which override the target’s output directory. Now we only need to install if a 
script or static resource changes.

From: Klaim - Joël Lamotte-- 

Powered by www.kitware.com

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

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

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

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

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

Re: [CMake] Installing a list of components

2016-08-18 Thread Klaim - Joël Lamotte
On 18 August 2016 at 17:32, Klaim - Joël Lamotte  wrote:

> The discussion led to a ticket for a potential feature: https://gitlab.
> kitware.com/cmake/cmake/issues/15450
> Discussion ended there: http://public.kitware.com/pipermail/cmake/2015-
> March/060120.html
>

http://cmake.3232098.n2.nabble.com/List-all-binaries-associated-with-a-target-td7590021.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:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Installing a list of components

2016-08-18 Thread Klaim - Joël Lamotte
On 18 August 2016 at 17:26,  wrote:

> I’m working on an application which consists of many different components
> surrounding a common core. We ship multiple products from the same source
> tree by adding and/or removing components from the output application
> directory.
>
>
>
> Using CMake’s install system in this environment is proving difficult.
> I’ve managed to set things up so that all components are installed to the
> same place, which is fine for development but not suitable for testing or
> shipping. A proper solution would install only the components needed for an
> individual application.
>
>
>
> The new EXCLUDE_FROM_ALL option for the install command overcomes one of
> the biggest hurdles to reaching that goal. I can now add that option to
> every install command, generate a list of component names, and add a custom
> target for each application which invokes CMake and has it install only the
> relevant components.
>
>
>
> The problem now is that I can only install one component at a time, and
> that invoking CMake 200+ times to install them all individually is
> unacceptably slow.
>
>
>
> Looking at the install scripts CMake generates I see lines like this:
>
>
>
> > if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "foobar" OR NOT
> CMAKE_INSTALL_COMPONENT)
>
>
>
> The install process would become much more flexible if STREQUAL were
> changed to IN_LIST. As far as I can see this change: a) has no performance
> penalty when the component value isn’t a list and b) would be backwards
> compatible unless an individual component name contained a semicolon (which
> seems an unlikely scenario).
>
>
>
> What do the developers think?
>
>
As a side note, I have pointed problems with similar setup, in particular
when you want to be able to debug too just after a build, in a context
which look like an installed app, with only
the files necessary for the app.
The discussion led to a ticket for a potential feature:
https://gitlab.kitware.com/cmake/cmake/issues/15450
Discussion ended there:
http://public.kitware.com/pipermail/cmake/2015-March/060120.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:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

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

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

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

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

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

[CMake] SecTrustEvaluateAsync != NULL

2016-08-18 Thread Laura Fowler
Hello:

This is my first post on the mailing list, so please bare with me. I
would like to compile cmake on my machine, but I get the following
error during the "make" step.


/Users/LauraLaptop/InstalledSoftwares/sourcecode/cmake-3.6.1/Utilities/cmcurl/lib/vtls/darwinssl.c:
In function ‘darwinssl_connect_step3’:

/Users/LauraLaptop/InstalledSoftwares/sourcecode/cmake-3.6.1/Utilities/cmcurl/lib/vtls/darwinssl.c:1999:6:
error: ‘SecTrustEvaluateAsync’ undeclared (first use in this function)

   if(SecTrustEvaluateAsync != NULL) {

  ^

/Users/LauraLaptop/InstalledSoftwares/sourcecode/cmake-3.6.1/Utilities/cmcurl/lib/vtls/darwinssl.c:1999:6:
note: each undeclared identifier is reported only once for each
function it appears in
make[2]: *** [Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/vtls/darwinssl.c.o]
Error 1
make[1]: *** [Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/all] Error 2
make: *** [all] Error 2


I assume that ./bootstrap worked fine since it asked me to run "make"
as the next step. My operating system is OS X El Capitan Version
10.11.6 and I am using gcc version 5.3.

I apologize if that kind of error has been reported before. I am not
sure as how to browse through previous posts. I will be glad to
provide any additional files that you may need from my bootstrap step.
Many thanks for our help.

Cheers,
Laura


-- 
!-
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: la...@ucar.edu
phone: 303-497-1628

!-
-- 

Powered by www.kitware.com

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

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

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

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

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

[CMake] Installing a list of components

2016-08-18 Thread tom.edwards
I’m working on an application which consists of many different components 
surrounding a common core. We ship multiple products from the same source tree 
by adding and/or removing components from the output application directory.

Using CMake’s install system in this environment is proving difficult. I’ve 
managed to set things up so that all components are installed to the same 
place, which is fine for development but not suitable for testing or shipping. 
A proper solution would install only the components needed for an individual 
application.

The new EXCLUDE_FROM_ALL option for the install command overcomes one of the 
biggest hurdles to reaching that goal. I can now add that option to every 
install command, generate a list of component names, and add a custom target 
for each application which invokes CMake and has it install only the relevant 
components.

The problem now is that I can only install one component at a time, and that 
invoking CMake 200+ times to install them all individually is unacceptably slow.

Looking at the install scripts CMake generates I see lines like this:

> if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "foobar" OR NOT 
> CMAKE_INSTALL_COMPONENT)

The install process would become much more flexible if STREQUAL were changed to 
IN_LIST. As far as I can see this change: a) has no performance penalty when 
the component value isn’t a list and b) would be backwards compatible unless an 
individual component name contained a semicolon (which seems an unlikely 
scenario).

What do the developers think? 
-- 

Powered by www.kitware.com

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

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

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

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

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

Re: [CMake] Private dependencies of static libraries exported as targets

2016-08-18 Thread Tamás Kenéz
Ivan,

> But, if library `foo` is built as static, then its clients suddenly
> become required to link to `bar` as well, and this information is not
> recorded anywhere!

I changed the cmake_minimum_required version in your projects from 2.8 to
3.0 which fixed the issue.
(I tried it with cmake 3.6.1)

Tamas

On Wed, Aug 17, 2016 at 2:55 PM, Ivan Shapovalov 
wrote:

> On 2016-08-17 at 05:19 -0500, Nicholas Braden wrote:
> > Huh, this is weird. It seems to be an issue with the export/import
> > mechanism. If you make a project where everything is in the same
> > CMakeLists.txt and there is no install step, there is no include
> > directory pollution. See my attached project for example. On my
> > system
> > I run this to build:
> >
> > mkdir build && cd build && cmake -G "MinGW Makefiles" .. && cmake
> > --build . -- VERBOSE=1
> >
> > When it builds main:
> >
> > C:\MinGW\bin\g++.exe@CMakeFiles/main.dir/includes_CXX.rsp
> > -std=gnu++14 -o CMakeFiles\main.dir\main.cpp.obj -c
> > C:\Users\LB\Code\cmake-private-static-dependencies\main.cpp
> >
> > The entirety of the includes_CXX.rsp file:
> >
> > -IC:/Users/LB/Code/cmake-private-static-dependencies/c
> >
> > The project you provided definitely has the include directory
> > pollution problem - the client includes_CXX.rsp file contains an
> > -isystem directive for bar. It looks like the generated
> > FooTargets-noconfig.cmake contains this line (setting properties on
> > foo):
> >
> > IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG "bar"
> >
> > I'm not fully sure but I think this is wrong because it is saying
> > that
> > bar is a public dependency. This seems to be an oversight in CMake,
> > as
> > there is no 'private' alternative of the above variable for imported
> > targets - that is, there is no IMPORTED_LINK_LIBRARIES_NOCONFIG, thus
> > there is no way for CMake to provide special treatment as in my
> > example. It seems CMake literally converts private dependencies of
> > static libraries to public dependencies only when using the export
> > functionality.
> >
> > ...and that's as much as I can figure right now. Can you confirm that
> > my attached example doesn't exhibit the problem? If it doesn't have
> > the include directory pollution problem, I'd be inclined to say it's
> > a
> > bug with the export/import functionality.
>
> Indeed, your sample project does not exhibit include path bloat. So
> this really looks like a limitation of CMake import/export mechanism
> (I say limitation, not bug, because there are simply no target
> properties detailed enough to allow this behavior).
>
> There is a property IMPORTED_LINK_DEPENDENT_LIBRARIES_ which is
> _almost_ what we want, but just for shared libraries.
>
> --
> Ivan Shapovalov / intelfx /
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

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

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

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

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

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

[CMake] CPack: Combine Debug and Release build

2016-08-18 Thread tonka tonka
Hey,

I want to switch to cpack to build my zip, installer etc.. Everything works
fine, but I am not able to get my debug build into my cpack end file. It
will always use the release build, which is fine for end-user deployment
but not for and sdk installer, because on windows I have to provide both
build-configurations.

Can anybody give me some advice what I can do to get such result?

Thanks in advance
Tonka
-- 

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