Re: [CMake] CMake Installerproject with NSIS

2012-10-23 Thread Eric Noulard
2012/10/24 Lodron, Gerald :
> Hi
>
> I am trying to make my first installer of my already working cmake
> application but I have the problem that no output is done by CMake. I have
> installed NSIS, whereby my CMake flags in GUI are:
> CPACK_BINARY_NSIS is true, CPACK_BINARY_ZIP is false and CPACK_SOURCE_ZIP is
> true
>
> My CMake script looks like this:
>
> SET(Srcs MySource.cpp )
>
> INCLUDE_DIRECTORIES(
> ${CMAKE_CURRENT_BINARY_DIR}
> )
>
> ADD_EXECUTABLE( MyApp ${ Srcs _Srcs})
>
> TARGET_LINK_LIBRARIES(MyApp
> MyLib
>   )
>
> install(
> TARGETS MyApp
> RUNTIME
> DESTINATION bin
> COMPONENT applications
>)
>
> set(CPACK_PACKAGE_NAME " MyApp ")
> set(CPACK_PACKAGE_VENDOR "www.joanneum.at")
> set(CPACK_PACKAGE_DESCRIPTION_SUMMARY " MyApp - Installation")
> set(CPACK_PACKAGE_VERSION "1.0.0")
> set(CPACK_PACKAGE_VERSION_MAJOR "1")
> set(CPACK_PACKAGE_VERSION_MINOR "0")
> set(CPACK_PACKAGE_VERSION_PATCH "0")
> set(CPACK_PACKAGE_INSTALL_DIRECTORY " MyApp ")
>
> set(CPACK_COMPONENTS_ALL applications libraries headers)
> set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME " MyApp Application")
> set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
> set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
> set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION " MyApp executable")
> set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Libraries used by MyApp")
> set(CPACK_COMPONENT_HEADERS_DESCRIPTION "C/C++ header files")
>
> include(CPack)
>
>
> When I configure and generate I run without errors, when I look into my
> visual studio there are no changes visible.


You should have 2 new buildable target:
"PACKAGE" and "PACKAGE_SOURCE".

> When I look into the binary
> directory there is also no installer found, also no *.nsi file which could
> be opened by NSIS. So how could I generate a exe ? Thanks for help…

Installer and *.nsi file are generated when you build PACKAGE target.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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


[CMake] WG: CMake Installerproject with NSIS

2012-10-23 Thread Lodron, Gerald
Sorry, i found the PACKAGE project now

Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
Lodron, Gerald
Gesendet: Mittwoch, 24. Oktober 2012 07:54
An: CMake (cmake@cmake.org)
Betreff: [CMake] CMake Installerproject with NSIS

Hi

I am trying to make my first installer of my already working cmake application 
but I have the problem that no output is done by CMake. I have installed NSIS, 
whereby my CMake flags in GUI are:
CPACK_BINARY_NSIS is true, CPACK_BINARY_ZIP is false and CPACK_SOURCE_ZIP is 
true

My CMake script looks like this:

SET(Srcs MySource.cpp )

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
)

ADD_EXECUTABLE( MyApp ${ Srcs _Srcs})

TARGET_LINK_LIBRARIES(MyApp
MyLib
  )

install(
TARGETS MyApp
RUNTIME
DESTINATION bin
COMPONENT applications
   )

set(CPACK_PACKAGE_NAME " MyApp ")
set(CPACK_PACKAGE_VENDOR "www.joanneum.at")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY " MyApp - Installation")
set(CPACK_PACKAGE_VERSION "1.0.0")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_INSTALL_DIRECTORY " MyApp ")

set(CPACK_COMPONENTS_ALL applications libraries headers)
set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME " MyApp Application")
set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION " MyApp executable")
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Libraries used by MyApp")
set(CPACK_COMPONENT_HEADERS_DESCRIPTION "C/C++ header files")

include(CPack)


When I configure and generate I run without errors, when I look into my visual 
studio there are no changes visible. When I look into the binary directory 
there is also no installer found, also no *.nsi file which could be opened by 
NSIS. So how could I generate a exe ? Thanks for help...

Gerald

--

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

[CMake] CMake Installerproject with NSIS

2012-10-23 Thread Lodron, Gerald
Hi

I am trying to make my first installer of my already working cmake application 
but I have the problem that no output is done by CMake. I have installed NSIS, 
whereby my CMake flags in GUI are:
CPACK_BINARY_NSIS is true, CPACK_BINARY_ZIP is false and CPACK_SOURCE_ZIP is 
true

My CMake script looks like this:

SET(Srcs MySource.cpp )

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
)

ADD_EXECUTABLE( MyApp ${ Srcs _Srcs})

TARGET_LINK_LIBRARIES(MyApp
MyLib
  )

install(
TARGETS MyApp
RUNTIME
DESTINATION bin
COMPONENT applications
   )

set(CPACK_PACKAGE_NAME " MyApp ")
set(CPACK_PACKAGE_VENDOR "www.joanneum.at")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY " MyApp - Installation")
set(CPACK_PACKAGE_VERSION "1.0.0")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_INSTALL_DIRECTORY " MyApp ")

set(CPACK_COMPONENTS_ALL applications libraries headers)
set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME " MyApp Application")
set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION " MyApp executable")
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Libraries used by MyApp")
set(CPACK_COMPONENT_HEADERS_DESCRIPTION "C/C++ header files")

include(CPack)


When I configure and generate I run without errors, when I look into my visual 
studio there are no changes visible. When I look into the binary directory 
there is also no installer found, also no *.nsi file which could be opened by 
NSIS. So how could I generate a exe ? Thanks for help...

Gerald

--

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

Re: [CMake] Project-specific setting with cmake -> eclipse CDT project generator?

2012-10-23 Thread Alexander Neundorf
On Monday 22 October 2012, Markus Litz wrote:
> Yes that is true. But there are some things that are stored for that
> project. For example, if you would like to add a specific source code
> formatter, you define it at "C/C++ General" -> "Formatter" -> "Enable
> project specific settings".
> These are setting which cannot be generated.

The generator could read the project files, if they are already existing, and 
reuse those interesting parts.
It doesn't do that currently.
A patch would be welcome :-)

Alex
--

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


[CMake] How to update CTestCustom.cmake.in so that message like "You are in 'detached HEAD' state." are ignored ?

2012-10-23 Thread Jean-Christophe Fillion-Robin
Hi Folks,

I tried to add an exception to CTestConfig.cmake [1] so that message like "*You
are in 'detached HEAD' state"* are not reported by it seems I am missing
something.

CTestCustom.cmake.in:
https://github.com/Slicer/Slicer/blob/master/CMake/CTestCustom.cmake.in#L242-243

CDash output:
http://slicer.cdash.org/viewBuildError.php?type=1&buildid=44593

Thanks for your help,
Jc

-- 
+1 919 869 8849
--

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

Re: [CMake] Cmake link trouble in Windows

2012-10-23 Thread Bill Hoffman

On 10/23/2012 10:55 AM, Vyacheslav Karamov wrote:


1. I don't understand what did you mean, but I guess
you want to create library test
CMake will link to the right thing.  The trick is symbols are not 
exported by default on windows.  So, if you do not change your code, no 
symbols are exported, and the .lib is not created.


See this:

http://www.cmake.org/Wiki/BuildingWinDLL

--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
--

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


Re: [CMake] Cmake link trouble in Windows

2012-10-23 Thread Vyacheslav Karamov

Hi!

1. I don't understand what did you mean, but I guess
you want to create library test

ADD_LIBRARY(test SHARED ${FAN_SRC})

then you wanted to specify in which directory some libraries should be 
searched


LINK_DIRECTORIES(${ACE_LIB_DIR})

and then you tried to link library ACE with your target (which is 
probably created by code which was not provided) fan.



23.10.2012 16:59, 张峰 пишет:

hello:
Thanks for your help。 but now i am in another trouble.
In Windows,i am trying to build a shard library,It needs to link 
dynamic library and static library。

when i want to link a dynamic library,it comes:
(fatal error U1073:does not know how to generate "ACE.lib")
AUX_SOURCE_DIRECTORY(. SRC)
ADD_LIBRARY(test SHARED ${FAN_SRC})
LINK_DIRECTORIES(${ACE_LIB_DIR})
TARGET_LINK_LIBRARIES(fan ACE)
1. Actually, "test" should link "ACE.dll",how to make test link to 
ACE.dll ?
2.if i use LINK_LIBRARIES() instead of TARGET_LINK_LIBRARIES(),this 
may work,why ??

AUX_SOURCE_DIRECTORY(. SRC)
LINK_DIRECTORIES(${ACE_LIB_DIR})
LINK_LIBRARIES(ACE)
ADD_LIBRARY(test SHARED ${FAN_SRC})
3.Seems Windows will give priority to link static library,but i need 
to link dynamic library in my projects ,how could i do ??
4.how do TARGET_LINK_LIBRARIES() and LINK_LIBRARIES() determine what 
kind of library to link ? DO i need to use LINK_LIBRARIES(ACE.dll) 
instead of LINK_LIBRARIES(ACE) in Windows ?

Waiting for your letter.
With Best Wishes !!





--

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

Re: [CMake] Cmake link trouble in Windows

2012-10-23 Thread John Drescher
>  Thanks  for your help。 but now i am in another trouble.
> In Windows,i am trying to build a shard library,It needs to link dynamic
> library and static library。
> when i want to link a dynamic library,it  comes:
> (fatal error U1073:does not know how to generate "ACE.lib")
>
> AUX_SOURCE_DIRECTORY(. SRC)
> ADD_LIBRARY(test  SHARED  ${FAN_SRC})
> LINK_DIRECTORIES(${ACE_LIB_DIR})
> TARGET_LINK_LIBRARIES(fan ACE)
>
> 1. Actually, "test" should link "ACE.dll",how to make test link to ACE.dll ?
>
> 2.if i use LINK_LIBRARIES() instead of TARGET_LINK_LIBRARIES(),this may
> work,why ??
>
> AUX_SOURCE_DIRECTORY(. SRC)
> LINK_DIRECTORIES(${ACE_LIB_DIR})
> LINK_LIBRARIES(ACE)
> ADD_LIBRARY(test SHARED ${FAN_SRC})
>
> 3.Seems Windows will give priority to link static library,but  i need to
> link dynamic library in my projects ,how could i do ??
>
> 4.how do TARGET_LINK_LIBRARIES() and LINK_LIBRARIES() determine what kind of
> library to link  ?  DO i need to use LINK_LIBRARIES(ACE.dll) instead of
> LINK_LIBRARIES(ACE)  in  Windows ?
>

You do not link to DLLs on windows. You link to import libraries when
using dlls. During the dll creation it should create a .lib along with
the .dll.

John
--

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

[CMake] Cmake link trouble in Windows

2012-10-23 Thread 张峰
hello:
 Thanks  for your help。 but now i am in another trouble.
In Windows,i am trying to build a shard library,It needs to link dynamic 
library and static library。
when i want to link a dynamic library,it  comes:
(fatal error U1073:does not know how to generate "ACE.lib")
 
AUX_SOURCE_DIRECTORY(. SRC)
ADD_LIBRARY(test  SHARED  ${FAN_SRC})
LINK_DIRECTORIES(${ACE_LIB_DIR})
TARGET_LINK_LIBRARIES(fan ACE)
 
1. Actually, "test" should link "ACE.dll",how to make test link to ACE.dll ?
 
2.if i use LINK_LIBRARIES() instead of TARGET_LINK_LIBRARIES(),this may 
work,why ??
 
AUX_SOURCE_DIRECTORY(. SRC)
LINK_DIRECTORIES(${ACE_LIB_DIR})
LINK_LIBRARIES(ACE)
ADD_LIBRARY(test SHARED ${FAN_SRC})
 
3.SeemsWindowswill give priority tolinkstatic library,but  i need to link 
dynamic library in my projects ,how could i do ??
 
4.how do TARGET_LINK_LIBRARIES() and LINK_LIBRARIES() determine what kind of 
library to link  ?  DO i need to use LINK_LIBRARIES(ACE.dll) instead of 
LINK_LIBRARIES(ACE)  in  Windows ?
 
Waiting for your letter.
With  Best Wishes !!
 

 --

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

Re: [CMake] Continue install after a failure

2012-10-23 Thread Petr Kmoch
On Tue, Oct 23, 2012 at 1:07 PM, Eric Noulard wrote:

> 2012/10/23 David Cole :
> > On Tue, Oct 23, 2012 at 2:53 AM, Petr Kmoch 
> wrote:
> >> On Mon, Oct 22, 2012 at 4:58 PM, David Cole 
> wrote:
> >>>
> >>> On Mon, Oct 22, 2012 at 3:22 AM, Petr Kmoch 
> wrote:
> >>> > Hi Andreas,
> >>> >
> >>> > thanks for your tip. Unfortunately, 'make -k install' doesn't help,
> as
> >>> > the
> >>> > entire install step is a single command (cmake -P ...), so once this
> >>> > fails,
> >>> > there is no other command make could continue with. Is there no way
> to
> >>> > do
> >>> > this natively in cmake?
> >>> >
> >>> > I could (in theory) add OPTIONAL to all install() commands, but that
> has
> >>> > the
> >>> > problem of being absolutely silent when a file is not found, and I'd
> >>> > need at
> >>> > least a message or warning. Is cmake really all-or-nothing in this
> >>> > aspect,
> >>> > or does anyone know a feature I'm overlooking?
> >>> >
> >>> > Thanks for any help.
> >>> >
> >>> > Petr
> >>> >
> >>> >
> >>> > On Sat, Oct 20, 2012 at 12:46 PM, Andreas Pakulat 
> wrote:
> >>> >>
> >>> >> Hi,
> >>> >>
> >>> >> On Sat, Oct 20, 2012 at 11:39 AM, Petr Kmoch 
> >>> >> wrote:
> >>> >> > when running the install step of a CMake-generated buildsystem
> (i.e.
> >>> >> > 'make
> >>> >> > install' or building the VS project INSTALL), the run terminates
> >>> >> > after
> >>> >> > the
> >>> >> > first failure (e.g. when it cannot find a file which is to be
> >>> >> > installed). Is
> >>> >> > there a way to globally change this behaviour so that the error is
> >>> >> > reported
> >>> >> > (perhaps as a warning), but the install step goes on?
> >>> >>
> >>> >> For Makefile Generator you can run make -k install, that way make
> >>> >> keeps on going even when errors occur. No idea about VS, NMake,
> Ninja
> >>> >> or XCode generators probably depends on wether the respective tool
> has
> >>> >> a switch for continuing if errors occur.
> >>> >>
> >>> >> Andreas
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> >
> >>> > 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
> >>>
> >>>
> >>> CMake is all-or-nothing with respect to an install tree. If the cmake
> >>> install script hits a "FATAL_ERROR" message then it stops and will not
> >>> continue beyond that point...
> >>>
> >>> The best way to "Continue install after a failure" is to eliminate the
> >>> failure, and try again.
> >>
> >>
> >> Would you accept a patch giving control over this behaviour? Something
> like
> >> a boolean variable CMAKE_INSTALL_STOP_ON_ERROR (the default being TRUE,
> of
> >> course).
> >>
> >> Petr
> >
> > Why is patching CMake easier than fixing your project? And how long
> > are you going to let your own project's install tree be broken before
> > you do fix it?
> >
> > I don't like the idea of a half-installed (or any fraction less than
> > 1.0) bit of software...
>
> Me neither.
>
> >
> > Perhaps others will chime in and we can get a sense of how folks weigh
> > in on this issue.
>
> My personal opinion is that may be the only feature I'd like would be a
> "real fake install" i.e. 0% installed not a possibly random X percent
> installed with random leftover.
>
> it could be callable like:
> make fake-install or check-install or ... set(CMAKE_FAKE_INSTALL 1) or ...
>
> which would check whether all need-to be installed bits are accessibles.
> This would basically put the file(INSTALL ...) sub-command in a mode
> that would only check access and print-out some informations message
> without moving, copying or renaming any files or directory.
>
> e.g:
>
> -- Would be Up-to-date: .../share/aclocal/cmake.m4
> -- Would be Installing: /doc/cmake-2.8/cpack.html
>
> instead of
> -- Up-to-date: .../share/aclocal/cmake.m4
> -- Installing: .../doc/cmake-2.8/cpack.html
>
> That said I did live without that feature until now so I bet I can
> live without it forever :-]
>
>
We're using the install step of CMake to prepare the "installation source"
in a location where it's then picked up by a 3rd party install-shield
generator. And we're currently doing major re-structuring of the entire
installation (involving several big cooperating products), which must work
on several sites with different 3rd party installation paths etc. Only
being able to fix one error per install run is extremely frustrating.

Eric's suggestion of a "fake install" would solve our case, of course.

I understand it's far from a typical use case, but AFAIK, all software
development tools are moving away from "bail out on first error" to trying
to report as many as possible (and still failing at the end, if applicable).

Petr
--

Powered by www.kitware.com

Visit other Kitwa

Re: [CMake] Continue install after a failure

2012-10-23 Thread Eric Noulard
2012/10/23 David Cole :
> On Tue, Oct 23, 2012 at 2:53 AM, Petr Kmoch  wrote:
>> On Mon, Oct 22, 2012 at 4:58 PM, David Cole  wrote:
>>>
>>> On Mon, Oct 22, 2012 at 3:22 AM, Petr Kmoch  wrote:
>>> > Hi Andreas,
>>> >
>>> > thanks for your tip. Unfortunately, 'make -k install' doesn't help, as
>>> > the
>>> > entire install step is a single command (cmake -P ...), so once this
>>> > fails,
>>> > there is no other command make could continue with. Is there no way to
>>> > do
>>> > this natively in cmake?
>>> >
>>> > I could (in theory) add OPTIONAL to all install() commands, but that has
>>> > the
>>> > problem of being absolutely silent when a file is not found, and I'd
>>> > need at
>>> > least a message or warning. Is cmake really all-or-nothing in this
>>> > aspect,
>>> > or does anyone know a feature I'm overlooking?
>>> >
>>> > Thanks for any help.
>>> >
>>> > Petr
>>> >
>>> >
>>> > On Sat, Oct 20, 2012 at 12:46 PM, Andreas Pakulat  wrote:
>>> >>
>>> >> Hi,
>>> >>
>>> >> On Sat, Oct 20, 2012 at 11:39 AM, Petr Kmoch 
>>> >> wrote:
>>> >> > when running the install step of a CMake-generated buildsystem (i.e.
>>> >> > 'make
>>> >> > install' or building the VS project INSTALL), the run terminates
>>> >> > after
>>> >> > the
>>> >> > first failure (e.g. when it cannot find a file which is to be
>>> >> > installed). Is
>>> >> > there a way to globally change this behaviour so that the error is
>>> >> > reported
>>> >> > (perhaps as a warning), but the install step goes on?
>>> >>
>>> >> For Makefile Generator you can run make -k install, that way make
>>> >> keeps on going even when errors occur. No idea about VS, NMake, Ninja
>>> >> or XCode generators probably depends on wether the respective tool has
>>> >> a switch for continuing if errors occur.
>>> >>
>>> >> Andreas
>>> >
>>> >
>>> >
>>> > --
>>> >
>>> > 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
>>>
>>>
>>> CMake is all-or-nothing with respect to an install tree. If the cmake
>>> install script hits a "FATAL_ERROR" message then it stops and will not
>>> continue beyond that point...
>>>
>>> The best way to "Continue install after a failure" is to eliminate the
>>> failure, and try again.
>>
>>
>> Would you accept a patch giving control over this behaviour? Something like
>> a boolean variable CMAKE_INSTALL_STOP_ON_ERROR (the default being TRUE, of
>> course).
>>
>> Petr
>
> Why is patching CMake easier than fixing your project? And how long
> are you going to let your own project's install tree be broken before
> you do fix it?
>
> I don't like the idea of a half-installed (or any fraction less than
> 1.0) bit of software...

Me neither.

>
> Perhaps others will chime in and we can get a sense of how folks weigh
> in on this issue.

My personal opinion is that may be the only feature I'd like would be a
"real fake install" i.e. 0% installed not a possibly random X percent
installed with random leftover.

it could be callable like:
make fake-install or check-install or ... set(CMAKE_FAKE_INSTALL 1) or ...

which would check whether all need-to be installed bits are accessibles.
This would basically put the file(INSTALL ...) sub-command in a mode
that would only check access and print-out some informations message
without moving, copying or renaming any files or directory.

e.g:

-- Would be Up-to-date: .../share/aclocal/cmake.m4
-- Would be Installing: /doc/cmake-2.8/cpack.html

instead of
-- Up-to-date: .../share/aclocal/cmake.m4
-- Installing: .../doc/cmake-2.8/cpack.html

That said I did live without that feature until now so I bet I can
live without it forever :-]

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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


Re: [CMake] Not all targets are built on Linux

2012-10-23 Thread David Cole
Are you using EXCLUDE_FROM_ALL anywhere in the CMakeLists files?

  http://cmake.org/cmake/help/v2.8.9/cmake.html#prop_tgt:EXCLUDE_FROM_ALL

Sending us a snippet of the CMakeLists file for one of the targets
that does not get built in 'all' might be helpful.


On Mon, Oct 22, 2012 at 11:41 AM, Paul Baumer  wrote:
> Hi,
>
> I have a project with several shared libraries and executables. It builds
> fine on Windows. On Linux "make" only builds some of the targets although
> all targets are displayed when I type "make help". How is it possible that
> targets are there and not built with "make" or "make all" ?
>
> How can I debug this problem?
>
> Paul
>
> --
>
> 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


Re: [CMake] Continue install after a failure

2012-10-23 Thread David Cole
On Tue, Oct 23, 2012 at 2:53 AM, Petr Kmoch  wrote:
> On Mon, Oct 22, 2012 at 4:58 PM, David Cole  wrote:
>>
>> On Mon, Oct 22, 2012 at 3:22 AM, Petr Kmoch  wrote:
>> > Hi Andreas,
>> >
>> > thanks for your tip. Unfortunately, 'make -k install' doesn't help, as
>> > the
>> > entire install step is a single command (cmake -P ...), so once this
>> > fails,
>> > there is no other command make could continue with. Is there no way to
>> > do
>> > this natively in cmake?
>> >
>> > I could (in theory) add OPTIONAL to all install() commands, but that has
>> > the
>> > problem of being absolutely silent when a file is not found, and I'd
>> > need at
>> > least a message or warning. Is cmake really all-or-nothing in this
>> > aspect,
>> > or does anyone know a feature I'm overlooking?
>> >
>> > Thanks for any help.
>> >
>> > Petr
>> >
>> >
>> > On Sat, Oct 20, 2012 at 12:46 PM, Andreas Pakulat  wrote:
>> >>
>> >> Hi,
>> >>
>> >> On Sat, Oct 20, 2012 at 11:39 AM, Petr Kmoch 
>> >> wrote:
>> >> > when running the install step of a CMake-generated buildsystem (i.e.
>> >> > 'make
>> >> > install' or building the VS project INSTALL), the run terminates
>> >> > after
>> >> > the
>> >> > first failure (e.g. when it cannot find a file which is to be
>> >> > installed). Is
>> >> > there a way to globally change this behaviour so that the error is
>> >> > reported
>> >> > (perhaps as a warning), but the install step goes on?
>> >>
>> >> For Makefile Generator you can run make -k install, that way make
>> >> keeps on going even when errors occur. No idea about VS, NMake, Ninja
>> >> or XCode generators probably depends on wether the respective tool has
>> >> a switch for continuing if errors occur.
>> >>
>> >> Andreas
>> >
>> >
>> >
>> > --
>> >
>> > 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
>>
>>
>> CMake is all-or-nothing with respect to an install tree. If the cmake
>> install script hits a "FATAL_ERROR" message then it stops and will not
>> continue beyond that point...
>>
>> The best way to "Continue install after a failure" is to eliminate the
>> failure, and try again.
>
>
> Would you accept a patch giving control over this behaviour? Something like
> a boolean variable CMAKE_INSTALL_STOP_ON_ERROR (the default being TRUE, of
> course).
>
> Petr

Why is patching CMake easier than fixing your project? And how long
are you going to let your own project's install tree be broken before
you do fix it?

I don't like the idea of a half-installed (or any fraction less than
1.0) bit of software...

Perhaps others will chime in and we can get a sense of how folks weigh
in on this issue.

I will consider any patch that is offered for consideration... but
I'll be honest: I'd never use this feature myself.


David
--

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


Re: [CMake] [SOLVED] CPack: Project and independent subproject

2012-10-23 Thread Eric Noulard
2012/10/23 Romain LEGUAY :
> Le 23/10/12 10:45, Romain LEGUAY a écrit :
>
>> Thank you Eric,
>>
>> I succeed to create the package by using CPACK_INSTALL_CMAKE_PROJECTS
>> variable.
>>
>> I have some problem now to put my package in a specific folder. I try to
>> set CPACK_TOPLEVEL_TAG variable but there is no change...
>
>
> I just resolve this problem: I use CPACK_PACKAGE_DIRECTORY variable.

This work, but this is not the "most appropriate" way to achieve what you want.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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


Re: [CMake] CPack: Project and independent subproject

2012-10-23 Thread Eric Noulard
2012/10/23 Romain LEGUAY :
> Thank you Eric,
>
> I succeed to create the package by using CPACK_INSTALL_CMAKE_PROJECTS
> variable.
>
> I have some problem now to put my package in a specific folder. I try to set
> CPACK_TOPLEVEL_TAG variable but there is no change...

Toplevel won't be included unless you set
CPACK_INCLUDE_TOPLEVEL_DIRECTORY

however..

The variables you may be looking for are either
CPACK_PACKAGE_INSTALL_DIRECTORY
or
CPACK_PACKAGING_INSTALL_PREFIX

depending on the generator used. As usual:

cpack --help-variable CPACK_INCLUDE_TOPLEVEL_DIRECTORY
cpack --help-variable CPACK_PACKAGE_INSTALL_DIRECTORY
cpack --help-variable CPACK_PACKAGING_INSTALL_PREFIX


>> By the does your Demo/ directory have a "project(...)" command in its
>> CMakeLists.txt?
>>
> No I didn't put any project(...) in Demo/ or Application/ directories.
>
> Thanks again for your help,

You are welcome.


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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


Re: [CMake] [SOLVED] CPack: Project and independent subproject

2012-10-23 Thread Romain LEGUAY

Le 23/10/12 10:45, Romain LEGUAY a écrit :

Thank you Eric,

I succeed to create the package by using CPACK_INSTALL_CMAKE_PROJECTS 
variable.


I have some problem now to put my package in a specific folder. I try 
to set CPACK_TOPLEVEL_TAG variable but there is no change...


I just resolve this problem: I use CPACK_PACKAGE_DIRECTORY variable.

So all it solved ;)

Romain


Le 22/10/12 20:59, Eric Noulard a écrit :
If you want to have control over what is installed the better to do 
that is to create COMPONENT.

This is a part of my CMakeLists.txt:

install(TARGETS ${PROJECT_NAME}
   DESTINATION "Demos"
   COMPONENT ${PROJECT_NAME})

like this but I doubt that you can name a COMPONENT with the same
name as the name of your project.

then you must either define:
set(CPACK_INSTALL_CMAKE_PROJECTS
"${CMAKE_CURRENT_BINARY_DIR};${PROJECT_NAME};${PROJECT_NAME}:/")

see documentation
cpack --help-variable CPACK_INSTALL_CMAKE_PROJECTS
I searched some methods to put the wanted files inside a package but 
I only

found how to ignore some files.

Does anyone have those kind of problem?

By the does your Demo/ directory have a "project(...)" command in its
CMakeLists.txt?


No I didn't put any project(...) in Demo/ or Application/ directories.

Thanks again for your help,
Romain


--

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


Re: [CMake] CPack: Project and independent subproject

2012-10-23 Thread Romain LEGUAY

Thank you Eric,

I succeed to create the package by using CPACK_INSTALL_CMAKE_PROJECTS 
variable.


I have some problem now to put my package in a specific folder. I try to 
set CPACK_TOPLEVEL_TAG variable but there is no change...


Le 22/10/12 20:59, Eric Noulard a écrit :
If you want to have control over what is installed the better to do 
that is to create COMPONENT.

This is a part of my CMakeLists.txt:

install(TARGETS ${PROJECT_NAME}
   DESTINATION "Demos"
   COMPONENT ${PROJECT_NAME})

like this but I doubt that you can name a COMPONENT with the same
name as the name of your project.

then you must either define:
set(CPACK_INSTALL_CMAKE_PROJECTS
"${CMAKE_CURRENT_BINARY_DIR};${PROJECT_NAME};${PROJECT_NAME}:/")

see documentation
cpack --help-variable CPACK_INSTALL_CMAKE_PROJECTS

I searched some methods to put the wanted files inside a package but I only
found how to ignore some files.

Does anyone have those kind of problem?

By the does your Demo/ directory have a "project(...)" command in its
CMakeLists.txt?


No I didn't put any project(...) in Demo/ or Application/ directories.

Thanks again for your help,
Romain
--

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