Re: [CMake] Shared library from sources in several subdirectories

2015-12-08 Thread Nils Gladitz

On 12/07/2015 11:51 PM, Bruce Stephens wrote:


On Mon, Dec 7, 2015 at 9:08 AM, Nils Gladitz > wrote:


I would avoid creating these single use, per directory libraries
entirely.


Well, creating the static libraries is obviously just an artifact of 
our current

build scheme, so it makes sense to ditch it.

Creating these CMake object libraries doesn't seem bad; is there some
reason to avoid doing that? A reason for doing it is it gives targets for
target_include_directories, so just the crypto objects can be built with
the OpenSSL include directory.


While the additional object libraries will more easily allow you to have 
more granular property settings they also might make it more difficult 
to maintain property settings that you do want to be the same for the 
entire library (especially when inheriting properties from linked targets).




Also for some reason setting the POSITION_INDEPENDENT_CODE
property for the top-level shared library (the default anyway) doesn't
seem to propagate down (and maybe it can't), and the named thing
makes it easy to apply the property to the sources. Though now I look,
I could use set_property on the sources (or the directory), and I could
use set_property similarly to add include directories (and compile
definitions).


I am not entirely sure what you mean here but it might be relevant to 
point out that directory properties refer to the location 
(CMakeLists.txt) where a target is defined not the location where source 
files are.


Given that if you have a single target then there is only one directory 
in which it is defined and from which it gets directory properties 
irregardless of over how many directories the sources files may be 
spread over.



A single target can build sources located in any number of
directories.

If you want to subdivide the source file listing of that one
target for organizational purposes you can do so with e.g.
include(), target_sources() and/or list variables.


Thanks for suggesting that. For some reason it hadn't occurred to me.
I'm not sure whether that would work out better for this particular case
or not, or for the larger library I'd like to do (with ~500 sources in 
a tree

of ~40 directories).


The number of source files is the same irregardless of how many targets 
you split them up over and the number of objects in the final link step 
will stay the same as well.
But I would think that you would see improvements over the split 
approach given that there are fewer superfluous intermediate steps.


Nils
-- 

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 Uninstalling locked files

2015-12-08 Thread Lloyd
Hi,

In CPack NSIS template I came across a variable CPACK_NSIS_DELETE_FILES.
When the NSIS script is generated, this variable is expanded to "nsis
delete commands" for all the cmake install commands.

The proble with this is, if the file is locked it will not be deleted. To
overcome this NSIS has a "REBOOTOK" flag  in the delete command. When the
system is reboot these locked files will be deleted.

eg.

Delete /REBOOTOK "$INSTDIR\uninst.exe"

Does CMake/CPack provide any mechanism for deleting locked files ?

Thanks,
  Lloyd
-- 

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-developers] Static Bootstrap: CCMake & GPM

2015-12-08 Thread Gregor Jasny via cmake-developers

Hello Axel,

On 08/12/15 01:53, Huebl, Axel wrote:

My problem: I found that in the last step of linking ccmake against a
static (pre-compiled, ubuntu 12.04) ncurses library leads to linker
errors such as:

/usr/lib/x86_64-linux-gnu/libncurses.a(lib_mouse.o): In function
`_nc_mouse_event':


Could you please post the content of 
/usr/lib/x86_64-linux-gnu/pkgconfig/ncurses.pc ?



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


[cmake-developers] Proposal to teach cmDepends to only take dependencies from the source tree

2015-12-08 Thread Attila Krasznahorkay
Dear All,

In our software infrastructure I now got to the point that in building "high 
level" packages/projects the CMake build spends a very noticeable amount of 
time in calculating the dependencies of source files. To give you a feel of the 
issue, in one example that I was profiling, I build a small "package" that uses 
>180 other "packages", which at this point are all installed on a network file 
system (AFS). Those low level packages themselves depend on N external packages 
as well (like Boost, Oracle, etc.).

So the include list for the build becomes very long, with most of the needed 
headers being outside of the source tree. In this case evaluating all the 
dependencies for a shared library made up of just 3 source files can take >10 
seconds.

I tried to find a way to tell CMake to ignore the dependencies that are outside 
of the source tree. As at this point for my use case those files can be 
considered fixed. I don't need to consider that they may change without me 
knowing. But as far as I could see, there is no mechanism in the code at the 
moment to achieve this.

I did consider teaching cmDepends to only take non-system include paths into 
account for the dependency calculation. So that whatever is specified as a 
system include path, would be ignored. But since I found that GCC becomes 
significantly slower in building my sources if I specify >100 -isystem /afs/... 
paths to it compared to specifying all those paths with -I, I gave up on this 
idea.

I also considered adding a new regular expression to cmDependsC to be able to 
specify using a regular expression which include paths to take into account and 
which to ignore. Which could still be a good idea to implement in cmDepends 
(not cmDependsC) later on, but for my own use case something simpler was enough.

In the end I applied the following patch to CMake 3.4.1 locally to speed it up 
for my use case very significantly. Of course this is not a patch that could be 
applied to CMake for a general audience. But I do think that if this 
code/behaviour could be switched on using something like a directory property / 
global variable, a lot of users could make good use of it. As it can be a 
reasonable assumption in many development environments that only the changes 
inside of the source tree should be tracked by the build system.

If you think that this is a good idea, I would be willing to provide some help 
in implementing it "properly" as well.

Cheers,
 Attila



cmDepends-sourceOnly.diff
Description: Binary data
-- 

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] Fixed ProjectGUID

2015-12-08 Thread Dr . Sören Textor

Taking a look at the CMakeCache.txt offers the missing
 ${target_name}_GUID_CMAKE
variable.

Thus
  set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )
seems to work.

But how do I get the actual GUID set by CMake? This one was stored in 
CMakeCache.txt before. But right know I cannot find the GUID from a generated 
project file in any ccmake chache file.
How do I gain the GUID created by CMake. In my project I just store the new 
GUIDs created by CMake in a file. Next time I build the project file I'm 
looking if a GUID  was already generated for that project an will use that one.

Best regards,
SirAnn



Am 08.12.2015 um 11:25 schrieb Dr. Sören Textor:

Hello
I just installed 3.4.1 and the usage of a hardcoded guid does not seem to work 
anymore:

set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )

Is thre another way to set the project GUID?

best regards
SirAnn

   Original-Nachricht 
>/Datum: Fri, 7 Jan 2011 22:26:31 +0100 />/Von: Pau Garcia i Quiles > />/An: David Cole > />/CC: "Sören Freudiger" >, cmake at cmake.org 
 />/Betreff: Re: [CMake] Fixed ProjectGUID /
>/Hello, />//>/In Visual Studio 2010, ProjectGUID is a global. This bug provides a />/patch to add global definitions to CMake, but only up to Visual Studio />/2008. It shouldn't be difficult to update the patch to add support for />/Visual C++ 2010. Setting the ProjectGUID would then be as easy as: />//>/set_target_properties( thetarget PROPERTIES VS_GLOBAL_ProjectGUID />/"{384A545C-A6F2-4833-9260-F05C46557610}" ) />//>/I opened the bug and provided the code almost two years ago, so it's />/not like I expect CMake developers to suddenly implement it... />//>/2011/1/7 David Cole >: />/> The guids should remain constant in a given build tree for the life of />/the />/> CMakeCache.txt file. />/> />/> But after you delete that and start in a fresh build tree, you'll get />/fresh />/> guids. />/> />/> If you want constant guids in your vcproj files, they should be 
built by />/> hand, not with CMake. />/> />/> />/> HTH, />/> David />/> />/> />/> 2011/1/7 "Sören Freudiger" > />/>> />/>> Hello />/>> Is it possible to set the ProjectGUID by CMake? Every time I 
generate a />/>> vcproj file with CMake the ProjectGUID changes. But we need to have a />/fixed />/>> one (because other projects are including the vcproj). />/>> />/>> Best regards />/>> SirAnn />/>> -- />/>> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit />/>> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl />/>> ___ />/>> Powered by www.kitware.com />/>> />/>> Visit other Kitware open-source projects at />/>> http://www.kitware.com/opensource/opensource.html />/>> />/>> Please keep messages on-topic and check the CMake FAQ at: />/>> http://www.cmake.org/Wiki/CMake_FAQ />/>> />/>> Follow this link to subscribe/unsubscribe: />/>> http://www.cmake.org/mailman/listinfo/cmake />/> />/> />/> ___ />/> Powered by www.kitware.com />/> />/> Visit other Kitware open-source projects at />/> http://www.kitware.com/opensource/opensource.html />/> />/> Please keep messages on-topic and check the CMake FAQ at: />/> http://www.cmake.org/Wiki/CMake_FAQ />/> />/> Follow this link to subscribe/unsubscribe: />/> http://www.cmake.org/mailman/listinfo/cmake />/> />//>//>//>/-- />/Pau Garcia i Quiles />/http://www.elpauer.org  />/(Due to my workload, I may need 10 days to answer) /

--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren:http://www.gmx.net/de/go/freephone





--
Dr.-Ing. Sören Textor
Softwareentwicklung

phone | +49 6221 31698 225

fax | +49 6221 31698 399

email | s.tex...@ditec-gmbh.de 

web | http://www.ditec-gmbh.de

DiTEC Dr. Siegfried Kahlich & Dierk Langer GmbH

Im Breitspiel 19 | 69126 Heidelberg | Germany

Handelsregister | Mannheim | HRB 341229

Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe, sowie 
Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit 
unserer ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, 
insbesondere für den Fall der Schutzrechtsanmeldung.


This document has to be treated confidentially. Its contents are not to 
be passed on, duplicated, exploited or disclosed without our express 
permission. All rights reserved, especially the right to apply for 
protective rights.


-- 

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 

[CMake] Fixed ProjectGUID

2015-12-08 Thread Dr . Sören Textor

Hello
I just installed 3.4.1 and the usage of a hardcoded guid does not seem to work 
anymore:

set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )

Is thre another way to set the project GUID?

best regards
SirAnn

  Original-Nachricht 
/Datum: Fri, 7 Jan 2011 22:26:31 +0100 />/Von: Pau Garcia i Quiles > />/An: David Cole > />/CC: "Sören Freudiger" >, cmake at cmake.org 
 />/Betreff: Re: [CMake] Fixed ProjectGUID /
/Hello, />//>/In Visual Studio 2010, ProjectGUID is a global. This bug provides a />/patch to add global definitions to CMake, but only up to Visual Studio />/2008. It shouldn't be difficult to update the patch to add support for />/Visual C++ 2010. Setting the ProjectGUID would then be as easy as: />//>/set_target_properties( thetarget PROPERTIES VS_GLOBAL_ProjectGUID />/"{384A545C-A6F2-4833-9260-F05C46557610}" ) />//>/I opened the bug and provided the code almost two years ago, so it's />/not like I expect CMake developers to suddenly implement it... />//>/2011/1/7 David Cole >: />/ > The guids should remain constant in a given build tree for the life of />/the />/ > CMakeCache.txt file. />/ > />/ > But after you delete that and start in a fresh build tree, you'll get />/fresh />/ > guids. />/ > />/ > If you want constant guids in your vcproj files, they should be built 
by />/ > hand, not with CMake. />/ > />/ > />/ > HTH, />/ > David />/ > />/ > />/ > 2011/1/7 "Sören Freudiger" > />/ >> />/ >> Hello />/ >> Is it possible to set the ProjectGUID by CMake? Every time I 
generate a />/ >> vcproj file with CMake the ProjectGUID changes. But we need to have a />/fixed />/ >> one (because other projects are including the vcproj). />/ >> />/ >> Best regards />/ >> SirAnn />/ >> -- />/ >> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit />/ >> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl />/ >> ___ />/ >> Powered by www.kitware.com />/ >> />/ >> Visit other Kitware open-source projects at />/ >> http://www.kitware.com/opensource/opensource.html />/ >> />/ >> Please keep messages on-topic and check the CMake FAQ at: />/ >> http://www.cmake.org/Wiki/CMake_FAQ />/ >> />/ >> Follow this link to subscribe/unsubscribe: />/ >> http://www.cmake.org/mailman/listinfo/cmake />/ > />/ > />/ > ___ />/ > Powered by www.kitware.com />/ > />/ > Visit other Kitware open-source projects at />/ > http://www.kitware.com/opensource/opensource.html />/ > />/ > Please keep messages on-topic and check the CMake FAQ at: />/ > http://www.cmake.org/Wiki/CMake_FAQ />/ > />/ > Follow this link to subscribe/unsubscribe: />/ > http://www.cmake.org/mailman/listinfo/cmake />/ > />//>//>//>/-- />/Pau Garcia i Quiles />/http://www.elpauer.org  />/(Due to my workload, I may need 10 days to answer) /

--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren:http://www.gmx.net/de/go/freephone


-- 

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] Fixed ProjectGUID

2015-12-08 Thread Nils Gladitz

On 12/08/2015 12:06 PM, Dr. Sören Textor wrote:

Taking a look at the CMakeCache.txt offers the missing
 ${target_name}_GUID_CMAKE
variable.
Thus
   set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )
seems to work.

But how do I get the actual GUID set by CMake? This one was stored in 
CMakeCache.txt before. But right know I cannot find the GUID from a generated 
project file in any ccmake chache file.
How do I gain the GUID created by CMake. In my project I just store the new 
GUIDs created by CMake in a file. Next time I build the project file I'm 
looking if a GUID  was already generated for that project an will use that one.



See https://cmake.org/gitweb?p=cmake.git;a=commit;h=c85367f4
I don't think cmake exposes the GUID that it uses anymore but you should 
still be able to provide your own.


Nils
-- 

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] Fixed ProjectGUID

2015-12-08 Thread Dr . Sören Textor
Yes, it seems that cmake does not store that ID as befere. Thus I just 
create my own UUID ;-)


String( UUID ...)

Am 08.12.2015 um 12:28 schrieb Nils Gladitz:

On 12/08/2015 12:06 PM, Dr. Sören Textor wrote:

Taking a look at the CMakeCache.txt offers the missing
 ${target_name}_GUID_CMAKE
variable.
Thus
   set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )
seems to work.

But how do I get the actual GUID set by CMake? This one was stored in 
CMakeCache.txt before. But right know I cannot find the GUID from a generated 
project file in any ccmake chache file.
How do I gain the GUID created by CMake. In my project I just store the new 
GUIDs created by CMake in a file. Next time I build the project file I'm 
looking if a GUID  was already generated for that project an will use that one.



See https://cmake.org/gitweb?p=cmake.git;a=commit;h=c85367f4
I don't think cmake exposes the GUID that it uses anymore but you 
should still be able to provide your own.


Nils


--
Dr.-Ing. Sören Textor
Softwareentwicklung

phone | +49 6221 31698 225

fax | +49 6221 31698 399

email | s.tex...@ditec-gmbh.de 

web | http://www.ditec-gmbh.de

DiTEC Dr. Siegfried Kahlich & Dierk Langer GmbH

Im Breitspiel 19 | 69126 Heidelberg | Germany

Handelsregister | Mannheim | HRB 341229

Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe, sowie 
Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit 
unserer ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, 
insbesondere für den Fall der Schutzrechtsanmeldung.


This document has to be treated confidentially. Its contents are not to 
be passed on, duplicated, exploited or disclosed without our express 
permission. All rights reserved, especially the right to apply for 
protective rights.


-- 

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-developers] Proposal to teach cmDepends to only take dependencies from the source tree

2015-12-08 Thread Ben Boeckel
On Tue, Dec 08, 2015 at 10:09:13 +0100, Attila Krasznahorkay wrote:
> In the end I applied the following patch to CMake 3.4.1 locally to
> speed it up for my use case very significantly. Of course this is not
> a patch that could be applied to CMake for a general audience. But I
> do think that if this code/behaviour could be switched on using
> something like a directory property / global variable, a lot of users
> could make good use of it. As it can be a reasonable assumption in
> many development environments that only the changes inside of the
> source tree should be tracked by the build system.

So some projects allow you to override specific headers (e.g., Boost) to
provide  which would be included from the source
tree. This file is not included directly by any users of Boost
(usually), but instead included via other Boost headers, so scanning of
system includes can be important.

So as long as there's an option/policy for it, I'm fine with the
behavior. A policy could make it the default too with a directory
property to re-enable global scanning.

Hmm…the build tree should also probably be allowed as well.

--Ben
-- 

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] Idea: generic task-driven make-like targets with CMake

2015-12-08 Thread Kevin Wojniak
The one thing I’ve found I still have to replace with CMake is the 
ability to specify generic “make” targets that do various tasks, 
such as a release build using the same build directory, run tests, grab 
dependencies.


For example, with Make I can do:

release:
mkdir -p build_dir
cd build_dir && cmake -DCMAKE_BUILD_TYPE=Release ..

And all I need to run is:

make release

But this obviously doesn’t work with native MSVC builds. So, then 
you’re stuck duplicating this logic with Batch or PowerShell scripts, 
or using a scripting language such as Python or Ruby.


Now, Ruby with Rake is a very nice replacement, so this can become:

task :release do
FileUtils.mkdir_p “build_dir”
Dir.chdir “build_dir” do
sh “cmake”, “-DCMAKE_BUILD_TYPE=Release”, “..”
end
end

And I can run on all platforms where Ruby/Rake are available:

rake release

However, Rake/Ruby is a heavy requirement to run these tasks which are 
very simple for most projects. Plus, you cannot use CMake logic such as 
compiler/platform detection if you need it outside of CMake.


Is there any way to do this cleanly with CMake tools? If not, what if a 
simple “ctask” tool was added that offered this basic functionality. 
For example, within my CMakeLists.txt file I could have tasks defined 
like:


add_task(release
COMMAND ${CMAKE_COMMAND} -E make_directory “build_dir”
COMMAND ${CMAKE_COMMAND} -E chdir “build_dir” ${CMAKE_COMMAND} 
“-DCMAKE_BUILD_TYPE=Release”, “..”

)

Then, this could be executed as:

ctask release

Tasks could depend on other tasks with a DEPENDS argument, just like 
normal CMake targets.


Thoughts?

Kevin
--

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] Idea: generic task-driven make-like targets with CMake

2015-12-08 Thread Nils Gladitz

On 08.12.2015 19:04, Kevin Wojniak wrote:


add_task(release
COMMAND ${CMAKE_COMMAND} -E make_directory “build_dir”
COMMAND ${CMAKE_COMMAND} -E chdir “build_dir” ${CMAKE_COMMAND} 
“-DCMAKE_BUILD_TYPE=Release”, “..”

)



There is add_custom_target().

You can e.g. add_custom_target(release ${CMAKE_COMMAND} -E echo foobar)
and with the Makefiles generator run "make release" and with visual 
studio trigger the build of the "release" project.


For scripting you can use cmake in script mode with -P.

e.g. given a script file release.cmake:
message("Hello World")

add_custom_target(release ${CMAKE_COMMAND} -P 
${CMAKE_CURRENT_SOURCE_DIR}/release.cmake)


Nils
--

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] Idea: generic task-driven make-like targets with CMake

2015-12-08 Thread Kevin Wojniak
Functionality like add_custom_target combined with script mode is close, 
but not quite there. add_custom_target already requires a build 
directory and a generator, so it’s too late. Script mode requires 
setting variables on the command line, so it’s too verbose. For 
example:


if(“${ACTION}” STREQUAL “release”)
execute_process(…)
endif()

cmake -P myscript.cmake -DACTION=release

I suppose you could have multiple *.cmake files for each task, and those 
could then call the master file with necessary variables set, but then 
you’d need one file per task and that could become excessive.


Kevin


On 8 Dec 2015, at 10:22, Nils Gladitz wrote:


On 08.12.2015 19:04, Kevin Wojniak wrote:


add_task(release
COMMAND ${CMAKE_COMMAND} -E make_directory “build_dir”
COMMAND ${CMAKE_COMMAND} -E chdir “build_dir” ${CMAKE_COMMAND} 
“-DCMAKE_BUILD_TYPE=Release”, “..”

)



There is add_custom_target().

You can e.g. add_custom_target(release ${CMAKE_COMMAND} -E echo 
foobar)
and with the Makefiles generator run "make release" and with visual 
studio trigger the build of the "release" project.


For scripting you can use cmake in script mode with -P.

e.g. given a script file release.cmake:
 message("Hello World")

add_custom_target(release ${CMAKE_COMMAND} -P 
${CMAKE_CURRENT_SOURCE_DIR}/release.cmake)


Nils

--

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] target_include_directories SYSTEM adds -isystem to Clang, but not GCC

2015-12-08 Thread digitalriptide
Thank you Gregor! I have tried the Makefile generator, but on OS X -isystem
still seems to be missing with GCC. The -isystem flag appears with Clang,
however. I have installed CMake 3.4.1 and GCC 5.3.0, both through MacPorts.
I can provide a sample project, if that would help.

On Fri, Nov 20, 2015 at 8:28 AM, Gregor Jasny  wrote:

> On 15/11/15 21:13, digitalriptide wrote:
>
>> Did this fix make it into 3.4? After upgrading to 3.4, GCC still seems
>> to lack -isystem flags on OS X. Is there anything extra I need to do?
>>
>
> It should be fixed for the Makefile and Ninja generators but not Xcode.
> My proposed fix broke older Xcode versions so that I had to revert it
> back. I did not find time to pick this up again.
>
> 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

Re: [CMake] Idea: generic task-driven make-like targets with CMake

2015-12-08 Thread Tamás Kenéz
Kevin, I have a shell script for such tasks, see
https://gist.github.com/tamaskenez/d4509f240f4224eb9853. Feel free to use
it if that's what you need.
It extends the `cmake` command by executing multiple, related `cmake` calls
with one command. See docs in gist.

Your 'make release' example looks like this:

cmakex cr -Hsourcedir -Bbuilddir # Configure Release

with additional options you can do many tasks with one command

cmakex cbitdr -Hsourcedir -Bbuilddir -GXcode # Configure, Build,
Install, Test Debug & Release using Xcode

Tamas

On Tue, Dec 8, 2015 at 7:44 PM, Kevin Wojniak  wrote:

> Functionality like add_custom_target combined with script mode is close,
> but not quite there. add_custom_target already requires a build directory
> and a generator, so it’s too late. Script mode requires setting variables
> on the command line, so it’s too verbose. For example:
>
> if(“${ACTION}” STREQUAL “release”)
> execute_process(…)
> endif()
>
> cmake -P myscript.cmake -DACTION=release
>
> I suppose you could have multiple *.cmake files for each task, and those
> could then call the master file with necessary variables set, but then
> you’d need one file per task and that could become excessive.
>
> Kevin
>
>
>
> On 8 Dec 2015, at 10:22, Nils Gladitz wrote:
>
> On 08.12.2015 19:04, Kevin Wojniak wrote:
>>
>>>
>>> add_task(release
>>> COMMAND ${CMAKE_COMMAND} -E make_directory “build_dir”
>>> COMMAND ${CMAKE_COMMAND} -E chdir “build_dir” ${CMAKE_COMMAND}
>>> “-DCMAKE_BUILD_TYPE=Release”, “..”
>>> )
>>>
>>>
>> There is add_custom_target().
>>
>> You can e.g. add_custom_target(release ${CMAKE_COMMAND} -E echo foobar)
>> and with the Makefiles generator run "make release" and with visual
>> studio trigger the build of the "release" project.
>>
>> For scripting you can use cmake in script mode with -P.
>>
>> e.g. given a script file release.cmake:
>>  message("Hello World")
>>
>> add_custom_target(release ${CMAKE_COMMAND} -P
>> ${CMAKE_CURRENT_SOURCE_DIR}/release.cmake)
>>
>> Nils
>>
> --
>
> 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-developers] [CMake 0015874]: Add command line flag to force ctest to exit with non-zero code when no tests are run

2015-12-08 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15874 
== 
Reported By:Kevin Wojniak
Assigned To:
== 
Project:CMake
Issue ID:   15874
Category:   CTest
Reproducibility:always
Severity:   feature
Priority:   normal
Status: new
== 
Date Submitted: 2015-12-08 17:29 EST
Last Modified:  2015-12-08 17:29 EST
== 
Summary:Add command line flag to force ctest to exit with
non-zero code when no tests are run
Description: 
If there is an error with how tests are configured, and ctest is run, it just
outputs "No tests were found" and exits with code 0. For scripts that depend on
ctest exit code reflecting whether tests succeeded or not, this fails.

A flag should be set that forces a non-zero exit code when no tests are run.
Otherwise the only way to handle this is to parse "No tests were found" but that
is a hack and is not always possible.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-12-08 17:29 Kevin Wojniak  New Issue
==

-- 

Powered by www.kitware.com

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

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

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

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

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


[Cmake-commits] CMake branch, master, updated. v3.4.1-653-g3a824a9

2015-12-08 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  3a824a963ac54930b072e2d31c54e182af3d027c (commit)
  from  c6eacfd56a9c5a8da2304c446230127b6ce42470 (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=3a824a963ac54930b072e2d31c54e182af3d027c
commit 3a824a963ac54930b072e2d31c54e182af3d027c
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Wed Dec 9 00:01:06 2015 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Dec 9 00:01:06 2015 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 11d90d7..c24341f 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 4)
-set(CMake_VERSION_PATCH 20151208)
+set(CMake_VERSION_PATCH 20151209)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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


[CMake] How to set _default_ timeout for the ctest command?

2015-12-08 Thread Alan W. Irwin

For the lapack CMake-based build and test system, some of the ctests
can exceed 1500 seconds (the default limit) for special conditions
(e.g, a quadruple-precision build of lapack that can be very slow). 
To reduce such issues without forcing users to use the ctest --timeout

 option, the lapack developers would like to
increase the default limit substantially above 1500 seconds.  Does
anyone here know how to do that?

I guessed that setting CTEST_TEST_TIMEOUT might do that, but when I
experimentally set that to a small number (actually 1) (just before
the first add_test command of another project I am completely familiar
with (PLplot, natch)) the ctests that ran beyond that one second limit
did not error out (i.e., I presume they were still using the 1500
second default).  Note, the ctests I am referring to are simply run
using the ctest command from the command line and are not submitted to
a dashboard server.

I presume another way to do it would be to set the TIMEOUT test property
for every ctest, but that constitutes a maintanence issue, i.e., it
is a pretty clumsy way to do it.

So any ideas for setting the default timeout (either higher or lower
than 1500) for ctests would be welcome.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

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-developers] Please comment on ios-universal topic

2015-12-08 Thread Gregor Jasny via cmake-developers
Hello,

On 02/12/15 13:44, Bartosz Kosiorek wrote:
> I would like to propose to rename property name to INSTALL_IOS_UNIVERSAL_LIBS.

My thoughts about the property name:

I added the necessary functionality to also combine Frameworks and App
Bundles. So the _LIBS suffix now got misleading. And I think that
providing a different property for libraries, frameworks and app bundles
is not really helpful. To combine all targets one could set the CMAKE_
prefixed variable, to combine only some, one could set the property on
the target itself.

Deploying applications which support both armv7 (32bit) and armv8
(64bit) is already working by setting both architectures in the
OSX_ARCHITECTURES property because both are covered by the device SDK.

So technically we already support UNIVERSAL libraries. What we don't
support is combining device and simulator builds. So how about replacing
UNIVERSAL with COMBINED?

IOS_INSTALL_COMBINED_BINARY

I'm not sure if dropping the IOS bundle currently makes sense. At the
moment just iOS (and watchOS, tvOS) is the odd platfrom which requires
work-arounds.

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