Re: [CMake] find_package config and install

2019-01-22 Thread Lars
Alan,

Appreciate you taking the time to help.

It is unfortunately not an option to move 'foo' package to CMake at this time.

To summarize, we want to perform find_package in config mode to a none-CMake 
package that contain a target and some config files. Our current solution is to 
manually create the foo-config.cmake file that creates an imported target and 
sets properties on target. The 'foo' package must work with CPack in order to 
include the necessary files in MSI and RPM. As an experiment we added two 
install(..) commands to the foo-config.cmake file and this does include both 
'foo' target and configuration files in the installers. However we are not sure 
if this is good modern CMake solution. This solution means that 
find_package(..) will automatically install files to the build tree which is 
slightly more functionality than the command name indicates.

Any comments are welcome 

kind regards, Lars


Fra: Alan W. Irwin 
Sendt: onsdag 23. januar 2019 04.14
Til: Lars
Kopi: cmake@cmake.org
Emne: Re: Sv: [CMake] find_package config and install

Hi Lars:

On 2019-01-22 12:05- Lars wrote:

> Alan,
>
>
> Thank you very much for the response.

You are welcome.

> Our 'foo' package does not use CMake. That means there is no build-system to 
> produce the foo-config.cmake file, the file is manually created.  The file 
> does allow different projects to import the target from 'foo' package that 
> has been installed. However, we need to include the library and config file 
> in CPack installer and who is responsible for that task?
>
>
> We are using Qt5 config mode to import targets like you describe in 
> development context and it works. However, to setup packaging system (CPack) 
> we need to perform the Install(..) command so
> that the necessary Qt5 targets are included in the installer (MSI and RPM). 
> We cannot require the customer to install a 2GB Qt5 installer for a few 
> libraries. In that context it is unclear who\when\how should perform the 
> installation.

As you are probably already aware, the Qt5 software produces their 
"*-config.cmake" in a non-CMake way.
And it appears you are attempting to follow that method for your own
"foo" package case.  I applaud that attempt since that end result
should make life much easier for users of your foo package that do use
CMake.  However, now I hear you are using CPack for foo as well.  So
maybe it is time to bite the bullet and move foo to a cmake build
(which should make your life much simpler for creating both a working
"foo-config.cmake" file and a working CPack configuration.)

I specifically used the term "bite the bullet" because changing build
systems for any large software project with many different executables
and libraries is obviously not a trivial task.  But I assure you the
end goal of having a complete CMake-based build, test, and CPack
system is worth the pain of the transition.  But I would also advise
you it is possible to get from your present state to that goal in
small manageable steps that are not painful at all because partially
implemented CMake-based build systems normally happily coexist with
other build systems.

To take an example of such a soft (and completely unplanned)
transition to CMake (from more than a decade ago now) in the PLplot
case we had a mature autotools-based build system that was mostly good
enough "except for a few nagging problems"  So out of curiosity
more than anything else I started a hobby project of implementing the
build of just one of our smaller libraries with CMake.  And that
proved to be trivial (it only took a half an hour or so to learn what
I needed about CMake starting from zero knowledge), and the resulting
library built much faster.  Following up on that initial promising
result I quickly (with some substantial help from other PLplot
developers at the time who were interested in learning about CMake)
extended that hobby build system to more and more of our libraries and
executables.  Until within a month or so of me starting this "hobby"
this self-organized group of
developers for our CMake-based build system was producing the same
libraries, shared-objects, and executables as our "standard"
autotools-based build system.  But that configuration was much easier
to understand than for our standard build system, and both the
configuration and build was much faster than for the autotools case.

As a result we "got serious" and for the next month or so extended the
work to support both PLplot testing and the installed version of
PLplot to essentially complete the project.  For a year after
that we maintained both the CMake-based and autotools-based build
systems, but interest in the latter dropped so fast that at
the end of that year we completely removed all traces of
our autotools-based build system from 

Re: [CMake] find_package config and install

2019-01-22 Thread Lars
Alan,


Thank you very much for the response.


Our 'foo' package does not use CMake. That means there is no build-system to 
produce the foo-config.cmake file, the file is manually created.  The file does 
allow different projects to import the target from 'foo' package that has been 
installed. However, we need to include the library and config file in CPack 
installer and who is responsible for that task?


We are using Qt5 config mode to import targets like you describe in development 
context and it works. However, to setup packaging system (CPack) we need to 
perform the Install(..) command so
that the necessary Qt5 targets are included in the installer (MSI and RPM). We 
cannot require the customer to install a 2GB Qt5 installer for a few libraries. 
In that context it is unclear who\when\how should perform the installation.


kind regards, Lars



Fra: Alan W. Irwin 
Sendt: tirsdag 22. januar 2019 09.29
Til: Lars
Kopi: cmake@cmake.org
Emne: Re: [CMake] find_package config and install

On 2019-01-21 11:09- Lars wrote:

> Hello,
>
> We are creating a foo-config.cmake file for a package. The 'foo' package 
> contain a dynamic library that provides two interfaces and a number of 
> configuration files. There is a mapping between an interface and required 
> configuration files. What is the recommended approach for installing targets 
> and necessary configuration files in this context? Should this be performed 
> by foo-config.cmake or system that performed find_package? If 
> foo-config.cmake should perform the install, how should it be informed of 
> which interface is required? Can the "components" tag be used for this task?
>
> Qt 5.11 support config mode but does not perform any install. Does anyone 
> know why?
>
> We are using CMake 3.13.2
>

Hi Lars:

Here is an overview of packaging which I believe will
be useful to you.

foo-config.cmake does no installation itself.  Instead,
the build system for project "foo" installs that file to
help keep track of all the installed targets for foo that
get exported by foo.  That file (and the many files it includes)
allows different projects to import foo targets with ease
from a foo package that has already been installed.

So, for example, Qt5 config mode allows your project to import Qt5
targets that have been exported by that project, but in order to
access that functionality, Qt5 has to already be installed by some
means completely independent of CMake.

Some references that explain all this (and a lot more) are
<https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html>,
the install(EXPORT...) variant of the install commmand documented in
<https://cmake.org/cmake/help/latest/command/install.html>,
and <https://cmake.org/cmake/help/latest/command/export.html>.

In sum, cmake makes it trivially easy to import targets (e.g., from an
already installed Qt5 package).  It is substantially more work to
export targets from your own "foo" project using the foo-config.cmake
approach because there are a fair number of details you have to keep
track of to provide a useful result that other projects can import
successfully.  But exporting is pretty straightforward once you
have read the above documentation, and it sure makes life convenient
for other projects which wish to import targets from an already
installed foo package.

Alan
__
Alan W. Irwin

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


[CMake] find_package config and install

2019-01-21 Thread Lars
Hello,

We are creating a foo-config.cmake file for a package. The 'foo' package 
contain a dynamic library that provides two interfaces and a number of 
configuration files. There is a mapping between an interface and required 
configuration files. What is the recommended approach for installing targets 
and necessary configuration files in this context? Should this be performed by 
foo-config.cmake or system that performed find_package? If foo-config.cmake 
should perform the install, how should it be informed of which interface is 
required? Can the "components" tag be used for this task?

Qt 5.11 support config mode but does not perform any install. Does anyone know 
why?

We are using CMake 3.13.2

kind regards, Lars

-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] install files generator expression

2019-01-09 Thread Lars
Petr,

That worked nicely. Cheers 

regards, Lars


Fra: Petr Kmoch 
Sendt: onsdag 9. januar 2019 16.11
Til: Lars
Kopi: cmake@cmake.org
Emne: Re: [CMake] install files generator expression

Hi Lars.

The DESTINATION parameter of install() accepts only a single argument, which 
means it's tripping on the line break between the two genexes. Make it one 
argument:

INSTALL(FILES ${qt5_locations}
  DESTINATION
$<$:bin>$<$:lib>
  COMPONENT runtime)

This should work.

Petr


On Wed, 9 Jan 2019 at 12:29, Lars 
mailto:laasu...@hotmail.com>> wrote:
Hello,

We use find_package command in config mode to find Qt 5.11 libraries. The 
libraries are available as imported (Qt5::Core etc).

Our understand is that CMake does not support install of imported targets. 
Therefore we use get_target_property to find actual location of library and 
Install(Files ...) to install the files.

The install command looks like this (and works);
INSTALL(FILES ${qt5_locations} DESTINATION "bin" COMPONENT runtime)

The documentation states that DESTINATION supports generator expression. We 
would like to use generator expression to install libraries in "bin" on Windows 
and "lib" on Linux but have not be able to accomplish this task. The below 
command generated the following error message "Install files given unknown 
argument  $<$:lib>". We have tried other variants but none 
of them work.

INSTALL(FILES ${qt5_locations}
  DESTINATION
$<$:bin>
    $<$:lib>
  COMPONENT runtime)

Appreicate any input.

kind regards, Lars


--

Powered by www.kitware.com<http://www.kitware.com>

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] install files generator expression

2019-01-09 Thread Lars
Hello,

We use find_package command in config mode to find Qt 5.11 libraries. The 
libraries are available as imported (Qt5::Core etc).

Our understand is that CMake does not support install of imported targets. 
Therefore we use get_target_property to find actual location of library and 
Install(Files ...) to install the files.

The install command looks like this (and works);
INSTALL(FILES ${qt5_locations} DESTINATION "bin" COMPONENT runtime)

The documentation states that DESTINATION supports generator expression. We 
would like to use generator expression to install libraries in "bin" on Windows 
and "lib" on Linux but have not be able to accomplish this task. The below 
command generated the following error message "Install files given unknown 
argument  $<$:lib>". We have tried other variants but none 
of them work.

INSTALL(FILES ${qt5_locations}
  DESTINATION
$<$:bin>
$<$:lib>
  COMPONENT runtime)

Appreicate any input.

kind regards, Lars


-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] set_property imported_location_release

2018-12-21 Thread Lars
That is what I thought. Thank you.

Fra: Marc CHEVRIER 
Sendt: fredag 21. desember 2018 15.46.18
Til: cmake@cmake.org; Lars
Emne: Re: Sv: [CMake] set_property imported_location_release

Yes, the most efficient way is using conditional setting. For example:

if (CMAKE_SIZEOF_VOID_P EQUAL 4)
  set(import_path /to/lib32)
else()
  set(import_path /to/lib64)
endif()

set_property(TARGET foo PROPERTY IMPORT_LOCATION "${import_path}/lib.so")

Le 21 déc. 2018 à 15:14 +0100, Lars , a écrit :
Marc,

Appreciate the quick and helpful response.

In a config file that supports multiple platforms, do I need to create 
import_location_path variable and populate it depending on platform and 32/64 
etc? Any other options?

Thanks.

Kind regards, Lars


Fra: Marc CHEVRIER 
Sendt: fredag 21. desember 2018 13.41
Til: cmake@cmake.org; Lars
Emne: Re: [CMake] set_property imported_location_release

Properties IMPORTED_LOCATION* do not support generator expressions.

Generally speaking, if a property supports generator expression, it is 
explicitly specified in documentation.
Le 21 déc. 2018 à 13:07 +0100, Lars , a écrit :
Hello,

Trying to import an external library but having some issue with setting 
imported_location_release property.

Basically I have config file which does this;
add_library(foo STATIC IMPORTED)
set_property(target foo APPEND PROPERTY
   interface_include_directories
"$"
"$")

set_property(TARGET foo APPEND PROPERTY
  IMPORTED_LOCATION_RELEASE
$<$:${foo_root}/lib/release/foo.a>)

The imported target is used in a target_link_libraries method;
target_link_libraries(an_application foo)

Running CMake 3.6.1 does not produce any warnings. Running make I get a "target 
pattern contains no '%'" error message with a reference to a Build.make file.

The Build.make contains the string " 
$<$:/tmp/prototype/foo/lib/release/foo.a".  We did not 
expect to see the generator expression in the Build.make file.

Does set_property support generator expression in this context? What are we 
doing wrong?

Appreciate any help :-)

king regards, Lars

--

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] set_property imported_location_release

2018-12-21 Thread Lars
Marc,

Appreciate the quick and helpful response.

In a config file that supports multiple platforms, do I need to create 
import_location_path variable and populate it depending on platform and 32/64 
etc? Any other options?

Thanks.

Kind regards, Lars


Fra: Marc CHEVRIER 
Sendt: fredag 21. desember 2018 13.41
Til: cmake@cmake.org; Lars
Emne: Re: [CMake] set_property imported_location_release

Properties IMPORTED_LOCATION* do not support generator expressions.

Generally speaking, if a property supports generator expression, it is 
explicitly specified in documentation.
Le 21 déc. 2018 à 13:07 +0100, Lars , a écrit :
Hello,

Trying to import an external library but having some issue with setting 
imported_location_release property.

Basically I have config file which does this;
add_library(foo STATIC IMPORTED)
set_property(target foo APPEND PROPERTY
   interface_include_directories
"$"
"$")

set_property(TARGET foo APPEND PROPERTY
  IMPORTED_LOCATION_RELEASE
$<$:${foo_root}/lib/release/foo.a>)

The imported target is used in a target_link_libraries method;
target_link_libraries(an_application foo)

Running CMake 3.6.1 does not produce any warnings. Running make I get a "target 
pattern contains no '%'" error message with a reference to a Build.make file.

The Build.make contains the string " 
$<$:/tmp/prototype/foo/lib/release/foo.a".  We did not 
expect to see the generator expression in the Build.make file.

Does set_property support generator expression in this context? What are we 
doing wrong?

Appreciate any help :-)

king regards, Lars

--

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] set_property imported_location_release

2018-12-21 Thread Lars
Hello,

Trying to import an external library but having some issue with setting 
imported_location_release property.

Basically I have config file which does this;
add_library(foo STATIC IMPORTED)
set_property(target foo APPEND PROPERTY
   interface_include_directories
"$"
"$")

set_property(TARGET foo APPEND PROPERTY
  IMPORTED_LOCATION_RELEASE
$<$:${foo_root}/lib/release/foo.a>)

The imported target is used in a target_link_libraries method;
target_link_libraries(an_application foo)

Running CMake 3.6.1 does not produce any warnings. Running make I get a "target 
pattern contains no '%'" error message with a reference to a Build.make file.

The Build.make contains the string " 
$<$:/tmp/prototype/foo/lib/release/foo.a".  We did not 
expect to see the generator expression in the Build.make file.

Does set_property support generator expression in this context? What are we 
doing wrong?

Appreciate any help :-)

king regards, Lars

-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] Detecting compilation option and flags

2018-05-20 Thread Lars Christensen
I rely on these to detect options and flags:

$<TARGET_PROPERTY:${_target},COMPILE_FLAGS>
$<TARGET_PROPERTY:${_target},COMPILE_OPTIONS>

But not all options are picked up. These are missing:

1. Debug flag (when CMAKE_BUILD_TYPE=Debug)
2. -std=xx (CMAKE_CXX_STANDARD)

How can I reliably detect ALL compilation flags for a target?

Picking up these two flags is required for my pre-compiled header cmake
hack[1]. It used to work OK. I guess Debug can be detected and picked up
from _FLAGS_DEBUG, but I don't see a way to pick up -std=.

Lars

1) https://github.com/larsch/cmake-precompiled-header/
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] CMAke install files using cmake-generator-expression

2018-01-15 Thread Lars
Hello,


Using CMake 3.8.1 on Windows 7 SP1.


The following cmake expression will produce an error.

INSTALL(

  FILES

$<$${COMP_PATH}/win32/bin/comp.dll>

  DESTINATION "${install_dir}")


"CMake error: Error evaluating generator expression: $.

$ may only be used with binary targets. It may not be used 
with add_custom_command

or add_custom_target."


Tried using "GNU" instead of "MSVC" but did not help.

Tried using "PROGRAMS" instead of "FILES" but did not help.

Replacing $ with $ works, so it appears 
cmake-generator-expression work just not using compiler as key.


What does binary target mean in this context?


Why does this fail?


Kind regards,

Lars
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] install common resource files

2017-06-12 Thread Lars
Hello,

We have a set of configuration files located in a common location that multiple 
target rely on at runtime.

The structure looks something like this;

root
 - CMakeLists.txt

 - targetA
   - CMakeLists.txt

 - targetB
   - CMakeLists.txt

 - targetC
   - CMakeLists.txt

 - common
   - config.xml
   - config.ini

Both targetA and targetB depend on config.xml and config.ini. TargetC does not 
depend on the files.

What is the preferred way using CMake to install the resource given the above 
mentioned dependencies?

Two options;
- add CMakeLists.txt to common folder and install files from there. Do not like 
this option as this means I always install the files regardless of which target 
I want to install (targetC does not require does files).
- add install rules to targetA/CMakeLists.txt and targetB/CMakeLists.txt. This 
is a better option but still requires same logic in multiple files.


Any other options?


Regards, Lars
-- 

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] CMake install imported target using WIX

2017-02-21 Thread Lars
Hello,


We are using the "config" mode of Find_Package that locates CompConfig.cmake 
which create IMPORTED targets.


CMakeLists.txt

Find_Package(some_comp ${some_comp_path})


CompConfig.cmake;

add_executable(app IMPORTED)

add_library(lib SHARED IMPORTED)


This works fine and once I read 
https://public.kitware.com/Bug/view.php?id=14311 I managed to get 'make 
install' to include the IMPORTED targets.


However, it seems CPack -G WIX does not include the imported executables and 
libraries in its msi.


There is no trace of 'app' or 'lib' in the files.wxs file produced by CPack.


I wanted to check whether this is the expected behaviour or a known issue? If 
this is a bug, appreciate any input on how to proceed to debug this issue.


Using CMake 3.5.2 and Windows 7
-- 

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] [CMake 0015749]: Make the URL option of ExternalProject_Add to accept lists

2016-07-13 Thread Schmertmann, Lars
Thanks for the hint. I removed the ^ to replace
all occurrences and not only the first one.

ExternalProject.cmake, Line 1670:
 string(REGEX REPLACE "^file://" "" url "${url}")

Lars S.



Am 13.07.2016 um 11:14 schrieb David Cole:
> Looks like you could also use a list of paths if you express them in
> "file://..." form. Local files can also be expressed as URLs.
>
>
> David C.
>
>
>
> On Wed, Jul 13, 2016 at 4:18 AM, Schmertmann, Lars
> <lars.schmertm...@governikus.de> wrote:
>> Hello there,
>>
>> I try to continue the work from André.
>> With the attached patch it is possible to use a list of URLs
>> but it is still limited to a single path.
>>
>> I think for a mix of pathes/URLs we need to move a lot of code
>> from ExternalProject.cmake into ExternalProject-download.cmake.
>> Maybe it is good to realize this in a new ticket/commit?
>>
>> Best regards
>>  Lars Schmertmann
>>
>>
>> --
>>
>> 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

From 071f1e8af68ffac903c3fdec6bae5ae5a5f3c0c8 Mon Sep 17 00:00:00 2001
From: Lars Schmertmann <lars.schmertm...@governikus.de>
Date: Tue, 12 Jul 2016 16:53:36 +0200
Subject: [PATCH] Add support for multiple/alternative URLs

Now it is possible to pass multiple URLs as a list
that will be tried in and foreach(). So it will
try next URL if the previous failed.
---
 Modules/ExternalProject-download.cmake.in | 84 +--
 Modules/ExternalProject.cmake | 19 +--
 2 files changed, 62 insertions(+), 41 deletions(-)

diff --git a/Modules/ExternalProject-download.cmake.in b/Modules/ExternalProject-download.cmake.in
index 5b73cd8..91d74e0 100644
--- a/Modules/ExternalProject-download.cmake.in
+++ b/Modules/ExternalProject-download.cmake.in
@@ -114,48 +114,56 @@ endif()
 
 set(retry_number 5)
 
+message(STATUS "Downloading...
+   dst='@LOCAL@'
+   timeout='@TIMEOUT_MSG@'"
+)
+
 foreach(i RANGE ${retry_number})
   sleep_before_download(${i})
 
-  message(STATUS "downloading...
-   src='@REMOTE@'
-   dst='@LOCAL@'
-   timeout='@TIMEOUT_MSG@'")
-
-  @TLS_VERIFY_CODE@
-  @TLS_CAINFO_CODE@
-
-  file(
-  DOWNLOAD
-  "@REMOTE@" "@LOCAL@"
-  @SHOW_PROGRESS@
-  @TIMEOUT_ARGS@
-  STATUS status
-  LOG log
-  )
-
-  list(GET status 0 status_code)
-  list(GET status 1 status_string)
-
-  if(status_code EQUAL 0)
-check_file_hash(has_hash hash_is_good)
-if(has_hash AND NOT hash_is_good)
-  message(STATUS "Hash mismatch, removing...")
-  file(REMOVE "@LOCAL@")
+  foreach(url @REMOTE@)
+message(STATUS "Using src='${url}'")
+
+@TLS_VERIFY_CODE@
+@TLS_CAINFO_CODE@
+
+file(
+DOWNLOAD
+"${url}" "@LOCAL@"
+@SHOW_PROGRESS@
+@TIMEOUT_ARGS@
+STATUS status
+LOG log
+)
+
+list(GET status 0 status_code)
+list(GET status 1 status_string)
+
+if(status_code EQUAL 0)
+  check_file_hash(has_hash hash_is_good)
+  if(has_hash AND NOT hash_is_good)
+message(STATUS "Hash mismatch, removing...")
+file(REMOVE "@LOCAL@")
+  else()
+message(STATUS "Downloading... done")
+return()
+  endif()
 else()
-  message(STATUS "Downloading... done")
-  return()
+  string(APPEND logFailedURLs "error: downloading '${url}' failed
+   status_code: ${status_code}
+   status_string: ${status_string}
+   log:
+   --- LOG BEGIN ---
+   ${log}
+   --- LOG END ---
+   "
+  )
 endif()
-  else()
-message("error: downloading '@REMOTE@' failed
-  status_code: ${status_code}
-  status_string: ${status_string}
-  log:
-  --- LOG BEGIN ---
-  ${log}
-  --- LOG END ---"
-)
-  endif()
+  endforeach()
 endforeach()
 
-message(FATAL_ERROR "Downloading failed")
+message(FATAL_ERROR "Each download failed!
+  ${logFailedURLs}
+  "
+)
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 

[cmake-developers] [CMake 0015749]: Make the URL option of ExternalProject_Add to accept lists

2016-07-13 Thread Schmertmann, Lars
Hello there,

I try to continue the work from André.
With the attached patch it is possible to use a list of URLs
but it is still limited to a single path.

I think for a mix of pathes/URLs we need to move a lot of code
from ExternalProject.cmake into ExternalProject-download.cmake.
Maybe it is good to realize this in a new ticket/commit?

Best regards
Lars Schmertmann

From 036b3cb1a459befe7c0917f98c53ec0f176d2a8e Mon Sep 17 00:00:00 2001
From: Lars Schmertmann <lars.schmertm...@governikus.de>
Date: Tue, 12 Jul 2016 16:53:36 +0200
Subject: [PATCH] Add support for multiple/alternative URLs

Now it is possible to pass multiple URLs as a list
that will be tried in and foreach(). So it will
try next URL if the previous failed.
---
 Modules/ExternalProject-download.cmake.in | 84 +--
 Modules/ExternalProject.cmake | 17 ++-
 2 files changed, 61 insertions(+), 40 deletions(-)

diff --git a/Modules/ExternalProject-download.cmake.in b/Modules/ExternalProject-download.cmake.in
index 5b73cd8..91d74e0 100644
--- a/Modules/ExternalProject-download.cmake.in
+++ b/Modules/ExternalProject-download.cmake.in
@@ -114,48 +114,56 @@ endif()
 
 set(retry_number 5)
 
+message(STATUS "Downloading...
+   dst='@LOCAL@'
+   timeout='@TIMEOUT_MSG@'"
+)
+
 foreach(i RANGE ${retry_number})
   sleep_before_download(${i})
 
-  message(STATUS "downloading...
-   src='@REMOTE@'
-   dst='@LOCAL@'
-   timeout='@TIMEOUT_MSG@'")
-
-  @TLS_VERIFY_CODE@
-  @TLS_CAINFO_CODE@
-
-  file(
-  DOWNLOAD
-  "@REMOTE@" "@LOCAL@"
-  @SHOW_PROGRESS@
-  @TIMEOUT_ARGS@
-  STATUS status
-  LOG log
-  )
-
-  list(GET status 0 status_code)
-  list(GET status 1 status_string)
-
-  if(status_code EQUAL 0)
-check_file_hash(has_hash hash_is_good)
-if(has_hash AND NOT hash_is_good)
-  message(STATUS "Hash mismatch, removing...")
-  file(REMOVE "@LOCAL@")
+  foreach(url @REMOTE@)
+message(STATUS "Using src='${url}'")
+
+@TLS_VERIFY_CODE@
+@TLS_CAINFO_CODE@
+
+file(
+DOWNLOAD
+"${url}" "@LOCAL@"
+@SHOW_PROGRESS@
+@TIMEOUT_ARGS@
+STATUS status
+LOG log
+)
+
+list(GET status 0 status_code)
+list(GET status 1 status_string)
+
+if(status_code EQUAL 0)
+  check_file_hash(has_hash hash_is_good)
+  if(has_hash AND NOT hash_is_good)
+message(STATUS "Hash mismatch, removing...")
+file(REMOVE "@LOCAL@")
+  else()
+message(STATUS "Downloading... done")
+return()
+  endif()
 else()
-  message(STATUS "Downloading... done")
-  return()
+  string(APPEND logFailedURLs "error: downloading '${url}' failed
+   status_code: ${status_code}
+   status_string: ${status_string}
+   log:
+   --- LOG BEGIN ---
+   ${log}
+   --- LOG END ---
+   "
+  )
 endif()
-  else()
-message("error: downloading '@REMOTE@' failed
-  status_code: ${status_code}
-  status_string: ${status_string}
-  log:
-  --- LOG BEGIN ---
-  ${log}
-  --- LOG END ---"
-)
-  endif()
+  endforeach()
 endforeach()
 
-message(FATAL_ERROR "Downloading failed")
+message(FATAL_ERROR "Each download failed!
+  ${logFailedURLs}
+  "
+)
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 3686fb6..749d5ea 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -69,8 +69,8 @@ Create custom targets to build projects in external trees
 URL of mercurial repo
   ``HG_TAG ``
 Mercurial branch name, commit id or tag
-  ``URL /.../src.tgz``
-Full path or URL of source
+  ``URL /.../src.tgz ``
+Full path or URL(s) of source. Multiple URLs are allowed as mirrors.
   ``URL_HASH ALGO=value``
 Hash of file at URL
   ``URL_MD5 md5``
@@ -1861,6 +1861,19 @@ function(_ep_add_download_command name)
   @ONLY
   )
 list(APPEND depends ${stamp_dir}/${name}-urlinfo.txt)
+
+list(LENGTH url url_list_length)
+if(NOT "${url_list_length}" STREQUAL "1")
+  foreach(entry ${url})
+if(NOT "${entry}" MATCHES "^[a-z]+://")
+  message(FATAL_ERROR "At least one entry of URL is a path (invalid in a list)")
+endif()
+  endforeach()
+  if("x${fname}" STREQUAL "x")
+list(GET url 0 fname)
+  endif()
+endif()
+
 if(IS_DIRECTORY "${url}")
   get_filename_component(abs_dir "${url}" ABSOLUTE)
   set(comment "Performing download step (DIR copy) for '${name}'")
-- 
2.9.0

-- 

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 

[CMake] VS2015 and toolset v110

2016-06-21 Thread Lars
Hello,
 
Environment is Windows 7sp1, CMake 3.5.2 and Visual Studio 2015 Pro.
 
Running below command in MSBuild Command prompt for VS2015 shell;
cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 14 2015" -T v110 ../src
 
output is;
The c compiler identification is unknown
The cxx compiler identification is unknown
No CMAKE_C_COMPILER could be found
No CMAKE_CXX_COMPILER could be found
 
Updating command with different toolset (same shell)
cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 14 2015" -T v140 ../src
 
output is;
The c compiler identification is MSVC 19.0.23..
The cxx compiler identification is MSVC 19.0.23..
check for working c compiler using Visual Studio 14 2015
check for working c compiler using Visual Studio 14 2015 -- works
 
Using toolset v140 appears to find the compiler but using v100 or v110 or vs120 
does not work. Why is this happening?
 
The second example using v140 actually also fails but that is because it is 
trying to find boost_math_c99_v140 library which does not exists (we use v110 
library).
 
(and no, I cannot change toolset at the moment)
 
Kind regards, Lars
  -- 

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] cmake env - no command given

2016-02-08 Thread Lars
Hello,
 
Using Windows 7 SP1 and cmake 3.3.0
 
The first command below works (starts calc) when execute in cmd shell. The 
second command produces the error message "cmake -E env: no command given". Is 
this a bug in cmake?
 
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E env "PATH=C:\temp" calc
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E env "PATH=C:\temp\" calc
 
 
regards, Lars
  -- 

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] include_external_msproject

2016-01-28 Thread Lars
A solution file is in my view just an aggregation of projects. So I expected it 
to work in this context. Anyway, that leaves one question, how do I specify 
configuration and platform for the include_external_msproject?
 
Using (below) does not work. I still get the error message "Please check to 
make sure that your have specified a valid combination of Configuration and 
Platform for this project. Configuration='Debug' Platform='x86'. 
 
include_external_msproject(ext_test c:/test/test/test.sln PLATFORM "AnyCPU")
 
Updating the visual studio project with Configurations "Debug", 
"RelWithDebInfo" and "Release" and Platform "x86" is a workaround. Obviously it 
would be ideal if this could be controlled using cmake.
 
Appreciate any input.
 
Regards, Lars
 
> From: iosif.neitzke+cm...@gmail.com
> Date: Tue, 26 Jan 2016 09:24:35 -0600
> To: cmake@cmake.org
> Subject: Re: [CMake] include_external_msproject
> 
> No, I do not believe so.
> 
> https://cmake.org/cmake/help/v3.4/command/include_external_msproject.html
> 
> Keyword being 'project'.
> 
> On Tue, Jan 26, 2016 at 8:43 AM, Lars <laasu...@hotmail.com> wrote:
> > Appreciate some help understanding include_external_msproject.
> > Using Windows 7 and cmake 3.3
> >
> > This is what has been done so far,
> >
> > 1. Opened Visual Studio 2012 and created a new project (Windows Forms
> > Application) and saved it under c:\temp\test.
> >
> > 2. Used the following to an cmake;
> > include_external_msproject(ext_test c:/test/test/test.sln)
> >
> > This generates an error MSB4126: The specified solution configuration
> > "Debug|x86" is invalid. Please specify a valid solution configuration using
> > the configuration and platform properties...
> >
> > 3. So update the cmake file (below), clear build folder and build again;
> > include_external_msproject(ext_test c:/test/test/test.sln PLATFORM "Any
> > CPU")
> >
> > This generate the exact same error message as above. So the PLATFORM keyword
> > does not appear to be used in this context. Anyone care to explain how
> > PLATFORM works and howto specify correct configuration and platform?
> >
> > 4. To workaround the problem we open the visual studio project and added the
> > configuration and platform combo "Debug" and "x86" which cmake appears to
> > require. We use the original cmake script (below), clear build folder and
> > build again.
> > include_external_msproject(ext_test c:/test/test/test.sln)
> >
> > The following error is produced;
> > c:\temp\test\test\test.sln.metaproj : error MSB4057: The target
> > "GetNativeManifest" does not exists in the project.
> >
> > Searched all files in source and build directory and cannot find any
> > reference to "GetNativeManifest". See some issue online in regards to build
> > order but cannot see how that applies to this simple example. Really do not
> > understand this issue. Any ideas?
> >
> > 6. Update cmake and use .csproj instead of the solution file and it works.
> > The test.exe file is build. The cmake looks like this
> > include_external_msproject(ext_test c:/test/test/test.csproj)
> >
> > Does include_external_msproject support solution files?
> >
> >
> > --
> >
> > 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
>

[CMake] include_external_msproject

2016-01-26 Thread Lars
Appreciate some help understanding include_external_msproject.
Using Windows 7 and cmake 3.3  
 
This is what has been done so far,
 
1. Opened Visual Studio 2012 and created a new project (Windows Forms 
Application) and saved it under c:\temp\test.
 
2. Used the following to an cmake;
include_external_msproject(ext_test c:/test/test/test.sln)
 
This generates an error MSB4126: The specified solution configuration 
"Debug|x86" is invalid. Please specify a valid solution configuration using the 
configuration and platform properties...
 
3. So update the cmake file (below), clear build folder and build again;
include_external_msproject(ext_test c:/test/test/test.sln PLATFORM "Any CPU")
 
This generate the exact same error message as above. So the PLATFORM keyword 
does not appear to be used in this context. Anyone care to explain how PLATFORM 
works and howto specify correct configuration and platform?
 
4. To workaround the problem we open the visual studio project and added the 
configuration and platform combo "Debug" and "x86" which cmake appears to 
require. We use the original cmake script (below), clear build folder and build 
again.
include_external_msproject(ext_test c:/test/test/test.sln)
 
The following error is produced;
c:\temp\test\test\test.sln.metaproj : error MSB4057: The target 
"GetNativeManifest" does not exists in the project.
 
Searched all files in source and build directory and cannot find any reference 
to "GetNativeManifest". See some issue online in regards to build order but 
cannot see how that applies to this simple example. Really do not understand 
this issue. Any ideas?
 
6. Update cmake and use .csproj instead of the solution file and it works. The 
test.exe file is build. The cmake looks like this
include_external_msproject(ext_test c:/test/test/test.csproj)
 
Does include_external_msproject support solution files?
 
  -- 

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] add_custom_command scope

2016-01-19 Thread Lars
 Hello,
 
Using CMake 3.3 and VS2012.
 
The below cmake scripts generate "Policy CMP0040 is not set: The target in the 
TARGET signature of add_custom_command must exists". Why cannot the 
custom/CMakeLists.txt file see the target created in app/CMakeLists.txt ? 
Moving the ADD_CUSTOM_COMMAND to the app/CMakeLists.txt fixes the problem but I 
would like to keep them separate if possible.
 
PROJECT(TEST)
ADD_DIRECTORY(app)
ADD_DIRECTORY(custom)
 
The app CMakeLists.txt looks like this;
ADD_EXECUTABLE(app main.cpp)
TARGET_LINK_LIBRARIES(app)
 
The custom CMakeLists.txt looks like this;
ADD_CUSTOM_COMMAND(
  TARGET app 
  POST_BUILD
  COMMAND tbd.exe)
 
Appreciate any input.
 
Kind regards, Lars
  -- 

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] cmake.exe build type from cmd

2015-10-21 Thread Lars
Hello,
 
Using CMake 3.3 on Windows 7 platform with VS2012.
 
To build software I run;
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Visual Studio 11" /path/to/source
msbuild /m /p:Configuration=RelWithDebInfo INSTALL.wcxproj 
 
To help developers I would like to create a couple of scripts. Does cmake.exe 
provide any means to return the value of an cache entry? I would like to know 
the value of CMAKE_BUILD_TYPE. Do not want to parse the CMakeCache.txt file.
 
Appreciate any input.
 
kind regards, LarsA
  -- 

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] Install targets and component

2015-08-11 Thread Lars
Thank you Nils, that solved the issue. Cannot believe I missed that in the 
documentation.
 
Regards, Lars
 
 Date: Tue, 11 Aug 2015 09:41:22 +0200
 From: nilsglad...@gmail.com
 To: laasu...@hotmail.com; cmake@cmake.org
 Subject: Re: [CMake] Install targets and component
 
 On 08/11/2015 09:05 AM, Lars wrote:
  Hello,
 
  The following cmake script appears to work but the target is associated
  with Unspecified group according to cmake_install.cmake file.
  INSTALL(
 TARGETS MyLib
 RUNTIME DESTINATION ${BIN_PATH}
 LIBRARY DESTINATION ${LIB_PATH}
 COMPONENT COMP_APP)
 
  By removing the following section the target is associated with COMP_APP
  as expected.
  LIBRARY DESTINATION ${LIB_PATH}
 
  We are now using CMake 3.3. This worked great with CMake 2.8.12.
 
 The behavior should be the same in 2.8.12 and 3.3.
 
 Like DESTINATION the COMPONENT option is scoped by the RUNTIME, LIBRARY, 
 ARCHIVE etc. keywords.
 
 The last of those in your call is LIBRARY hence the COMPONENT will apply 
 only to LIBRARY files installed by this command.
 
 If you want COMPONENT to apply to all kinds of installed target files 
 list it before any of the scoping options e.g.
 
 install(
 TARGETS MyLib
 COMPONENT COMP_APP
 RUNTIME DESTINATION ${BIN_PATH}
 LIBRARY DESTINATION ${LIB_PATH}
 )
 
 or repeat it for each scope:
 
 install(
 TARGETS MyLib
 
 RUNTIME
 DESTINATION ${BIN_PATH}
 COMPONENT COMP_APP
 LIBRARY
 DESTINATION ${LIB_PATH}
 COMPONENT COMP_APP
 )
 
 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] Install targets and component

2015-08-11 Thread Lars
Hello,
 
The following cmake script appears to work but the target is associated with 
Unspecified group according to cmake_install.cmake file.
INSTALL(
  TARGETS MyLib
  RUNTIME DESTINATION ${BIN_PATH}
  LIBRARY DESTINATION ${LIB_PATH}
  COMPONENT COMP_APP)
 
By removing the following section the target is associated with COMP_APP as 
expected.
LIBRARY DESTINATION ${LIB_PATH}
 
We are now using CMake 3.3. This worked great with CMake 2.8.12.
 
Any ideas?
 
kind regards, Lars
 
 
  -- 

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] Target_link_libraries imported library

2015-05-13 Thread Lars
Hello,
 
We have an internal software product foo which is exported.
 
A typical component:
add_library(foo_library SHARED ...)
target_link_libraries(foo_library 
  foo_common 
  foo_comp
  ${Boost_LIBRARIES})
 
When building the exported package a file name FooDepends-release.cmake is 
produced which contains;
set_target_properties(foo_library PROPERTIES
  IMPORTED_IMPLIB_RELEASE ${_IMPORT_PREFIX}/lib/foo_library.lib
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE 
foo_common;foo_comp;c:\boost\lib\boost_filesystem-vc110-mt-1_55.lib;)
 
In another software product we use Find_Package command to find foo. Linking 
also works;
add_library(bar-library SHARED ...)
target_link_libraries(bar-library
  foo_library
  ${Boost_LIBRARIES})
 
There is one problem with this setup and that is the 
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE contains a static path to a boost 
lib. So the c:\boost\lib\boost_filesystem-vc110-mt-1_55.lib is appended to 
the linking of bar-library and this will fail if the path is incorrect. We 
cannot guarantee that boost is located at the same path on all Windows system. 
So how can we remove or update the boost path?
Using CMake 2.8.12 on Windows 7.
 
  -- 

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] ExternalData_Add_Test get referenced files

2015-01-20 Thread Lars Bilke
Dear CMake-user,

I am using the ExternalData-module to create CTest tests which require data 
files managed by ExternalData. I successfully used the DATA{name}-syntax. Now 
I need (at a later point in CMake) the referenced files for each test. Is it 
possible to retrieve this information? Is it stored in some test properties?

Thanks!
Lars
-- 

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] ADD_CUSTOM_COMMAND Application dependency

2014-11-19 Thread Lars



 The below example build App and copies it to EXECUTABLE_OUTPUT_PATH.
ADD_EXECUTABLE(App ${source})
TARGET_LINK_LIBRARIES(App ${lib1} ${lib2})
INSTALL(TARGETS App ..)
The top level CMakeLists.txt has install directives for lib1 and lib2
INSTALL(FILES ${lib1}/bin/lib1.dll DESTINATION ...)
INSTALL(FILES ${lib2}/bin/lib2.dll DESTINATION ...)
Later in the build process we would like to use App
ADD_CUSTOM_COMMAND(OUTPUT ${src} COMMAND App ...)
The ADD_CUSTOM_COMMAND command currently fails because lib1 and lib2 are not 
present in EXECUTABLE_OUTPUT_PATH.
The following solutions work but are not desirable approaches:
 - Copying the necessary files to EXECUTABLE_OUTPUT_PATH via 
ADD_CUSTOM_COMMAND. This would be repeating top level install directives at 
target level.
 - Update path environment variable to include paths to lib1 and lib2 
libraries.
What other options are available using CMake? Does ADD_CUSTOM_COMMAND have a 
way to update path environment prior to executing a command?
 

  -- 

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] ADD_CUSTOM_COMMAND Application dependency

2014-11-19 Thread Lars
Hi Angeliki,
Thank you for the suggestions.

I suspect your first example wont work because lib1 and lib2 are not in 
executable_output_path. So when the add_custom_command executes App it wont 
be able to resolve the dependencies to lib1 and lib2. If I only had one 
dependency I could possibly set the working_directory to the path of lib1 and 
use the absolute path of the App for the command. That would probably work 
but not with multiple dependencies.
Your second example might do the job but wont be accepted as a solution in our 
company.
regards, Lars

Date: Wed, 19 Nov 2014 14:10:07 +0100
Subject: Re: [CMake] ADD_CUSTOM_COMMAND Application dependency
From: angeliki.chrysoc...@gmail.com
To: laasu...@hotmail.com
CC: cmake@cmake.org

Hi Lars,
What if you provide the working directory to ADD_CUSTOM_COMMAND like this:
add_custom_command(OUTPUT outputCOMMAND command_to_be_executed 
arg_1 arg_2DEPENDS ${lib1} ${lib2}WORKING_DIRECTORY 
${EXECUTABLE_OUTPUT_PATH}VERBATIM)
Would it work?
Otherwise a trick (more like a hack) like the following might be useful:
add_custom_command(OUTPUT outputCOMMAND 
PATH=$ENV{PATH}:more_paths ENVIRONMENT_VAR=some_other_value  
command_to_be_executed arg_1 arg_2DEPENDS dependency_1 dependency_2 
   WORKING_DIRECTORY working_dirVERBATIM)
This sets the PATH temporarily during the execution of the command, where you 
could possibly add the paths to the libraries you need. You can set more 
environment variables as well.
Cheers!Angeliki

On Wed, Nov 19, 2014 at 11:14 AM, Lars laasu...@hotmail.com wrote:






 The below example build App and copies it to EXECUTABLE_OUTPUT_PATH.
ADD_EXECUTABLE(App ${source})
TARGET_LINK_LIBRARIES(App ${lib1} ${lib2})
INSTALL(TARGETS App ..)
The top level CMakeLists.txt has install directives for lib1 and lib2
INSTALL(FILES ${lib1}/bin/lib1.dll DESTINATION ...)
INSTALL(FILES ${lib2}/bin/lib2.dll DESTINATION ...)
Later in the build process we would like to use App
ADD_CUSTOM_COMMAND(OUTPUT ${src} COMMAND App ...)
The ADD_CUSTOM_COMMAND command currently fails because lib1 and lib2 are not 
present in EXECUTABLE_OUTPUT_PATH.
The following solutions work but are not desirable approaches:
 - Copying the necessary files to EXECUTABLE_OUTPUT_PATH via 
ADD_CUSTOM_COMMAND. This would be repeating top level install directives at 
target level.
 - Update path environment variable to include paths to lib1 and lib2 
libraries.
What other options are available using CMake? Does ADD_CUSTOM_COMMAND have a 
way to update path environment prior to executing a command?
 

  

--



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] ADD_CUSTOM_COMMAND Application dependency

2014-11-19 Thread Lars
Hello again,
There can only be one working directory and the two lib's are located in 
different dirs.
regards, Lars

Date: Wed, 19 Nov 2014 19:21:54 +0100
Subject: Re: [CMake] ADD_CUSTOM_COMMAND Application dependency
From: angeliki.chrysoc...@gmail.com
To: laasu...@hotmail.com
CC: cmake@cmake.org

Hi Lars,
I see...Why don't you set the working directory then to lib1 and lib2, and use 
the full path to App to call App? Not sure it will work, but maybe.
Cheers!Angeliki

On Wed, Nov 19, 2014 at 7:19 PM, Lars laasu...@hotmail.com wrote:



Hi Angeliki,
Thank you for the suggestions.

I suspect your first example wont work because lib1 and lib2 are not in 
executable_output_path. So when the add_custom_command executes App it wont 
be able to resolve the dependencies to lib1 and lib2. If I only had one 
dependency I could possibly set the working_directory to the path of lib1 and 
use the absolute path of the App for the command. That would probably work 
but not with multiple dependencies.
Your second example might do the job but wont be accepted as a solution in our 
company.
regards, Lars

Date: Wed, 19 Nov 2014 14:10:07 +0100
Subject: Re: [CMake] ADD_CUSTOM_COMMAND Application dependency
From: angeliki.chrysoc...@gmail.com
To: laasu...@hotmail.com
CC: cmake@cmake.org

Hi Lars,
What if you provide the working directory to ADD_CUSTOM_COMMAND like this:
add_custom_command(OUTPUT outputCOMMAND command_to_be_executed 
arg_1 arg_2DEPENDS ${lib1} ${lib2}WORKING_DIRECTORY 
${EXECUTABLE_OUTPUT_PATH}VERBATIM)
Would it work?
Otherwise a trick (more like a hack) like the following might be useful:
add_custom_command(OUTPUT outputCOMMAND 
PATH=$ENV{PATH}:more_paths ENVIRONMENT_VAR=some_other_value  
command_to_be_executed arg_1 arg_2DEPENDS dependency_1 dependency_2 
   WORKING_DIRECTORY working_dirVERBATIM)
This sets the PATH temporarily during the execution of the command, where you 
could possibly add the paths to the libraries you need. You can set more 
environment variables as well.
Cheers!Angeliki

On Wed, Nov 19, 2014 at 11:14 AM, Lars laasu...@hotmail.com wrote:






 The below example build App and copies it to EXECUTABLE_OUTPUT_PATH.
ADD_EXECUTABLE(App ${source})
TARGET_LINK_LIBRARIES(App ${lib1} ${lib2})
INSTALL(TARGETS App ..)
The top level CMakeLists.txt has install directives for lib1 and lib2
INSTALL(FILES ${lib1}/bin/lib1.dll DESTINATION ...)
INSTALL(FILES ${lib2}/bin/lib2.dll DESTINATION ...)
Later in the build process we would like to use App
ADD_CUSTOM_COMMAND(OUTPUT ${src} COMMAND App ...)
The ADD_CUSTOM_COMMAND command currently fails because lib1 and lib2 are not 
present in EXECUTABLE_OUTPUT_PATH.
The following solutions work but are not desirable approaches:
 - Copying the necessary files to EXECUTABLE_OUTPUT_PATH via 
ADD_CUSTOM_COMMAND. This would be repeating top level install directives at 
target level.
 - Update path environment variable to include paths to lib1 and lib2 
libraries.
What other options are available using CMake? Does ADD_CUSTOM_COMMAND have a 
way to update path environment prior to executing a command?
 

  

--



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] CPack installation directory

2014-03-04 Thread Lars

Appreciate your feedback.
 I tried looking at it but this seems to be a bit more complicated
than I initially thought.
 GUIDs only seem to be auto generated for components relative to one
of the standard prefixes like program files and I am not entirely
sure what the implication is.
 Also if at all the root should not be a hardcoded path since e.g.
c:\ might not be the root drive everywhere.
Who is generating the the GUID? Do you mean light or candle?


 What if the user who installs the application is not the user that
uses the application or if there are multiple users?
The answer to that question depends on the requirements, configuration and 
environment of the project. It would be great if CPack could provide a way to 
specify or override the default root prefix which currently is C:\Program 
Files on Windows for one, multiple or all components to something else. So my 
question would be, what would be a good design for this feature?
 I'd perhaps install user specific files by copying them from the
system wide installation directory into the home directory on the
first run (by that specific user).


We are considering this kind of solution. However we then lose the ability to 
remove these files on uninstall. We also feel this is mixing application 
development with deployment. 


regards, Lars
  -- 

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

[CMake] CPack installation directory

2014-02-28 Thread Lars
Hello, 
 
Using CMake version 2.8.12.1 on Windows 7
 
Here is a test project which produces a MSI which by default installs files to 
C:\Program Files (x86)\Product\
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)

PROJECT(TBD)



SET(CPACK_PACKAGE_NAME TBD)

SET(CPACK_INSTALL_PREFIX C:/TBD)

SET(CPACK_PACKAGE_INSTALL_DIRECTORY Product)

SET(CPACK_WIX_UPGRADE_GUID A8DAADFA-A2A6-3322-12A3-AF5CD7704008)

SET(CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR}/TBD)
 
INSTALL(
  DIRECTORY img

  DESTINATION img

  COMPONENT res)


INCLUDE(CPack)
-
 
How can I configure the wix generator to produce a msi which by default install 
files to c:\tbd ?
 
kind regards, 
Lars
  -- 

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

[CMake] cmake release and process

2014-02-12 Thread Lars
Hello,
 
#1. The cmake roadmap informs me that 100% of version 3.0 is complete. Any news 
on when this will be released?
 
#2. How does the development team decide which issues are included in any given 
release? As an example, I reported a feature request some months back 
(http://www.cmake.org/Bug/view.php?id=14580) and it looks un-touched since. 
Obviously I do not expect it to be fixed just curious about the process. How do 
I know whether the issue has been reviewed and the outcome of the review? 
Should I provide more information? 
This is not a criticism of the work being done, just trying to understand.
 
kind regards,
Lars
  -- 

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

[CMake] Method to get effective include_directories and compile_definitions

2014-02-10 Thread Lars Christensen
Hello,

Is there a way to get the effective include directories and compile
definitions for a target, including those specified at the directory level
and any INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITION on
targets that are required via target_link_libraries?

Iterating recursively over LINK_LIBRARIES to find interface
include/definition is the alternative, but I guess I'd need to handle
non-target dependencies, as well as possible cyclic dependencies.

Ideas?

Example:

include_directories(/path/to/common)
add_definitions(-DCOMMON=1)

add_library(lib1 lib1.c)
target_include_directories(lib1 PUBLIC /path/to/lib1)
target_compile_definitions(lib1 PUBLIC -DLIB1=1)

add_library(lib2 lib2.c)
target_include_directories(lib2 PUBLIC /path/to/lib2)
target_compile_definitions(lib2 PUBLIC -DLIB2=1)

target_link_libraries(lib2 lib1)

How would I get all 3 include directories and definitions for lib2 into
variables? The INCLUDE_DIRECTORIES property on the lib2 target only
includes the common and lib2-specific include directory, while the
COMPILE_DEFINITIONS property only includes the specific definition, not
even the directory-level definition (COMMON).

I'm trying to generate PC-Lint configuration files and need the definitions
and include directories. The wiki solution no longer works with interface
include_directories and compile_definitions.

Lars
-- 

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

Re: [CMake] depend.make

2013-12-16 Thread Lars
That sounds like a decent solution from my point of view. 
 
I will create an issue for this topic.
 
Regards,
Lars
 
Date: Fri, 13 Dec 2013 10:53:49 +0100
From: nilsglad...@gmail.com
To: laasu...@hotmail.com; bill.hoff...@kitware.com; cmake@cmake.org
Subject: Re: [CMake] depend.make


  

  
  
On 13.12.2013 10:43, Lars wrote:



  
  Using the include_regular_expression macro made a
huge difference. The build time was reduced by more than 50%.

 

The regular expression appear to be only applied to part of
the dependency file path. So in the case of Boost this
works pretty well for us because we use #include
boost/filesystem.hpp but more difficult to remove qt
dependency like #include QDir. How do you view adding a
feature that allow applying regex to the absolute path?
Secondly, the documentation of include_regular_expression should
probably mention something about the target string (relative
path, not absolute).

  

Maybe CMake could filter out includes in system directories (like
gcc -MM does).

System directories in this case could be directories added with e.g.
include_directories(SYSTEM).



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

Re: [CMake] depend.make

2013-12-13 Thread Lars
Using the include_regular_expression macro made a huge difference. The build 
time was reduced by more than 50%.
 
The regular expression appear to be only applied to part of the dependency file 
path. So in the case of Boost this works pretty well for us because we use 
#include boost/filesystem.hpp but more difficult to remove qt dependency like 
#include QDir. How do you view adding a feature that allow applying regex to 
the absolute path? Secondly, the documentation of include_regular_expression 
should probably mention something about the target string (relative path, not 
absolute).
 
Regards, Lars
 
 Date: Thu, 12 Dec 2013 14:23:53 -0500
 From: bill.hoff...@kitware.com
 To: laasu...@hotmail.com; cmake@cmake.org
 Subject: Re: [CMake] depend.make
 
 On 12/12/2013 1:07 PM, Lars wrote:
  Building our software using CMake and VS2005 on Windows platform is very
  slow. Debugging this issue I discovered the several of the depent.make
  files are huge. One example is a depent.make file that is roughly 10 MB.
  In this file most of the object files dependent on almost all boost
  header files. I am guessing a huge depent.make file would affect at
  least dependency scanning.
 
  Obviously I do not know how much this affect performance.
 
  Will take a look at ninja.
 
  Any other suggestions?
 
 You could do this:
 include_regular_expression(^([^b]|b[^o]|bo[^o]|boo[^s]|boos[^t]|boost[^/]).*$)
 
 Then see if it impacts your performance. I would be interested to here 
 if it did or did not.
 
 -Bill
 
  --

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

Re: [CMake] depend.make

2013-12-12 Thread Lars
Thank you for your feedback. 
 
This however only explain part of the issue as far as I can tell. To debug the 
issue I added 
#pragma message(boost tr1 iostream) 
at the top of the boost/tr1/iostream file. When building the source that 
message is shown in the console windows which then indicate the compiler has 
accessed the file. So far so good. I then did the same trick with 
boost/aligned_storage.hpp, boost/array.hpp and boost/assert.hpp which are the 
three first boost reference in depend.make and none of them not show up during 
building.  
 
So why are these files included in the depend.make?
 
Regards,
Lars
Date: Wed, 11 Dec 2013 16:08:28 +0100
From: nilsglad...@gmail.com
To: laasu...@hotmail.com; cmake@cmake.org
Subject: Re: [CMake] depend.make


  

  
  
On 11.12.2013 12:53, Lars wrote:



  
   

Here is the source code used (which does not use the Boost
library).

#include iostream

int main(int argc, char **argv)

{

  std::cout  Hello world  std::endl;

 

  return 0;

}

  

${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an
iostream header which your #include iostream probably
picks up.

Maybe that further includes the other boost headers?



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

Re: [CMake] depend.make

2013-12-12 Thread Lars
Very interesting.
 
Found this thread where Brad King is saying more or less the same thing (this 
is in 2009). Can anyone confirm this is still the case?

How can we filter out boost from depend.make? Using include_regular_expression 
only allows files filtering and that does not really help in this case.
 
Regards,
Lars
 
 From: marco.clemen...@cern.ch
 To: cmake@cmake.org
 CC: laasu...@hotmail.com; nilsglad...@gmail.com
 Subject: Re: [CMake] depend.make
 Date: Thu, 12 Dec 2013 12:03:06 +0100
 
 Hi,
 
 I cannot find it anymore in the documentation , but I remember to have read 
 that the dependency scanner of CMake does not take into account the 
 preprocessor conditionals (#ifdef, etc), thus producing a superset of the 
 actual dependencies.
 It is quite probable that boost/tr1/iostream _may_ include the other headers 
 under some particular combination of preprocessor macros, so they are not 
 used 
 at compile time, but they taken into account by CMake.
 
 Cheers
 Marco
 
 On Thursday 12 December 2013 11:51:52 Lars wrote:
  Thank you for your feedback.
  
  This however only explain part of the issue as far as I can tell. To debug
  the issue I added #pragma message(boost tr1 iostream)
  at the top of the boost/tr1/iostream file. When building the source that
  message is shown in the console windows which then indicate the compiler
  has accessed the file. So far so good. I then did the same trick with
  boost/aligned_storage.hpp, boost/array.hpp and boost/assert.hpp which are
  the three first boost reference in depend.make and none of them not show up
  during building.
  
  So why are these files included in the depend.make?
  
  Regards,
  Lars
  Date: Wed, 11 Dec 2013 16:08:28 +0100
  From: nilsglad...@gmail.com
  To: laasu...@hotmail.com; cmake@cmake.org
  Subject: Re: [CMake] depend.make
  
  
  
  
  
  
  On 11.12.2013 12:53, Lars wrote:
  
  
  
  
  
  
  Here is the source code used (which does not use the Boost
  library).
  
  #include iostream
  
  int main(int argc, char **argv)
  
  {
  
std::cout  Hello world  std::endl;
  
  
  
return 0;
  
  }
  
  
  
  ${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an
  iostream header which your #include iostream probably
  picks up.
  
  Maybe that further includes the other boost headers?
  
  
  
  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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-12 Thread Lars
Here is the link: http://www.itk.org/Bug/print_bug_page.php?bug_id=8561
 
From: laasu...@hotmail.com
To: marco.clemen...@cern.ch; cmake@cmake.org
Date: Thu, 12 Dec 2013 13:58:36 +0100
Subject: Re: [CMake] depend.make




Very interesting.
 
Found this thread where Brad King is saying more or less the same thing (this 
is in 2009). Can anyone confirm this is still the case?

How can we filter out boost from depend.make? Using include_regular_expression 
only allows files filtering and that does not really help in this case.
 
Regards,
Lars
 
 From: marco.clemen...@cern.ch
 To: cmake@cmake.org
 CC: laasu...@hotmail.com; nilsglad...@gmail.com
 Subject: Re: [CMake] depend.make
 Date: Thu, 12 Dec 2013 12:03:06 +0100
 
 Hi,
 
 I cannot find it anymore in the documentation , but I remember to have read 
 that the dependency scanner of CMake does not take into account the 
 preprocessor conditionals (#ifdef, etc), thus producing a superset of the 
 actual dependencies.
 It is quite probable that boost/tr1/iostream _may_ include the other headers 
 under some particular combination of preprocessor macros, so they are not 
 used 
 at compile time, but they taken into account by CMake.
 
 Cheers
 Marco
 
 On Thursday 12 December 2013 11:51:52 Lars wrote:
  Thank you for your feedback.
  
  This however only explain part of the issue as far as I can tell. To debug
  the issue I added #pragma message(boost tr1 iostream)
  at the top of the boost/tr1/iostream file. When building the source that
  message is shown in the console windows which then indicate the compiler
  has accessed the file. So far so good. I then did the same trick with
  boost/aligned_storage.hpp, boost/array.hpp and boost/assert.hpp which are
  the three first boost reference in depend.make and none of them not show up
  during building.
  
  So why are these files included in the depend.make?
  
  Regards,
  Lars
  Date: Wed, 11 Dec 2013 16:08:28 +0100
  From: nilsglad...@gmail.com
  To: laasu...@hotmail.com; cmake@cmake.org
  Subject: Re: [CMake] depend.make
  
  
  
  
  
  
  On 11.12.2013 12:53, Lars wrote:
  
  
  
  
  
  
  Here is the source code used (which does not use the Boost
  library).
  
  #include iostream
  
  int main(int argc, char **argv)
  
  {
  
std::cout  Hello world  std::endl;
  
  
  
return 0;
  
  }
  
  
  
  ${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an
  iostream header which your #include iostream probably
  picks up.
  
  Maybe that further includes the other boost headers?
  
  
  
  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://www.cmake.org/mailman/listinfo/cmake 
  --

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-12 Thread Lars
Building our software using CMake and VS2005 on Windows platform is very slow. 
Debugging this issue I discovered the several of the depent.make files are 
huge. One example is a depent.make file that is roughly 10 MB. In this file 
most of the object files dependent on almost all boost header files. I am 
guessing a huge depent.make file would affect at least dependency scanning.
Obviously I do not know how much this affect performance.
Will take a look at ninja.
Any other suggestions?
Regards,Lars

 Date: Thu, 12 Dec 2013 11:14:29 -0500
 From: bill.hoff...@kitware.com
 To: cmake@cmake.org
 Subject: Re: [CMake] depend.make
 
 On 12/12/2013 8:17 AM, Lars wrote:
  Here is the link: http://www.itk.org/Bug/print_bug_page.php?bug_id=8561
 Is this causing you a problem?If there are some extra depends on 
 boost files what is the harm?  I am assuming that you are not changing 
 them that much...   You could also try the ninja generator that does the 
 depends different and is faster anyway...
 
 
 -Bill
 
 --
 
 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://www.cmake.org/mailman/listinfo/cmake
  --

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] depend.make

2013-12-11 Thread Lars
This test has been performed on Windows 7 SP1 (64bit) and using CMake 2.8.12.1 
and VS2005 SP1.
 
Here is the source code used (which does not use the Boost library).
#include iostream
int main(int argc, char **argv)
{
  std::cout  Hello world  std::endl;
 
  return 0;
}
 
Here is the CMakeLists.txt used which find and include Boost.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
FIND_PACKAGE(Boost 1.47.0 COMPONENTS
  program_options
  system
  regex
  math_c99)
IF(Boost_FOUND)
  SET(Boost_INCLUDE_DIRS 
${Boost_INCLUDE_DIR}/boost/tr1/tr1
${Boost_INCLUDE_DIR})
  INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
ENDIF()
SET(_SOURCES 
  main.cpp 
)
ADD_EXECUTABLE(Dummy 
  ${_SOURCES} 
)
TARGET_LINK_LIBRARIES(Dummy 
  ${Boost_LIBRARIES} 
)
 
This configuration compiles and links.
When building the target a depend.make file is generated. Viewing this file I 
was surprised to discover that main.cpp.obj appears to depend on a number of 
boost files. There are 1200 lines like there;
CMakeFiles\Dummy.dir\main.cpp.obj: ..\main.cpp
CMakeFiles\Dummy.dir\main.cpp.obj: 
c:\Boost_r\1_47_0\include\boost-1_52\boost\aligned_storage.hpp
CMakeFiles\Dummy.dir\main.cpp.obj: 
c:\Boost_r\1_47_0\include\boost-1_52\boost\array.hpp
CMakeFiles\Dummy.dir\main.cpp.obj: 
c:\Boost_r\1_47_0\include\boost-1_52\boost\assert.hpp
 
Why does depend.make contain so many dependencies between main.cpp.obj and 
boost headers?
 
  --

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

[CMake] command line too long when compiling CUDA code with WindowsSDK7.1_64bit

2013-11-22 Thread Lars Friedrich Lars
Hello,



were compiling CUDA code in a sub-library of a bigger project which depends on ITK, VTK, Qt, RTK and a further proprietary library.



The CMakeLists.txt of this sub-library looks somehow like this:




#


SET(OWN_LIB_NAME CBCTUtils)

SET({OWN_LIB_NAME}_HDRS
 ...
 oraCudaImagingRingPerspectiveReorientationFilter.h
)

SET({OWN_LIB_NAME}_SRCS
 ...
 oraCudaImagingRingPerspectiveReorientationFilter.cxx
)

CUDA_COMPILE({OWN_LIB_NAME}_CUDA
 oraCudaImagingRingPerspectiveReorientationFilter.hcu
 oraCudaImagingRingPerspectiveReorientationFilter.cu
)

# include dirs

INCLUDE_DIRECTORIES(
 {CBCT_BIN_DIR}
 {CBCT_SOURCE_DIR}
 {RTK_INCLUDE_DIRS}
 {RTK_LIBRARY_DIRS}
)

# add utilities library

ADD_LIBRARY({OWN_LIB_NAME} STATIC
 {{OWN_LIB_NAME}_SRCS}
 {{OWN_LIB_NAME}_HDRS}
 {{OWN_LIB_NAME}_CUDA}
)

SET_TARGET_PROPERTIES({OWN_LIB_NAME} PROPERTIES LINKER_LANGUAGE CXX)

TARGET_LINK_LIBRARIES({OWN_LIB_NAME}
 {RTK_LIBS}
 {CUDA_LIBRARIES}
 {CUDA_cufft_LIBRARY}
 {OPENCL_LIBRARIES}
 ITKCommon
 ITKNumerics
 ORAIFTools
 ORAIFImageAccess
 ORAIFNReg2D3DDRREngine
 ORAIFNReg2D3DMathMethods
 ORAIFNReg2D3DAlgorithm
 ExperimentalORAIFImagingRing
)

# unit test

IF(CBCT_BUILD_TESTING)
 ADD_SUBDIRECTORY({CMAKE_CURRENT_SOURCE_DIR}/testing)
ENDIF(CBCT_BUILD_TESTING)


#



The problem is that obviously the underlying generated cl.exe call is incredibly long:



cl.exe -D__CUDA_ARCH__=100 -nologo -E -TP -DCUDA_FLOAT_MATH_FUNCTIONS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS
-DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -D__CUDACC__ /DWIN32 /D_WINDOWS /W3 /Zm1000 /GR
/EHsc -DNOMINMAX /MD /O2 /Ob2 /D NDEBUG -IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/include
-IC:/dev-libs/gdcm-2.0.14-64bit-build -IC:/dev-libs/itk-3.20.1/Code/Review
-IC:/dev-libs/itk-3.20.1-64bit-review-build/Utilities/vxl/core
... -IC:/QtSDK/Qt4.8.3-64bit/include/QtGui -IC:/QtSDK/Qt4.8.3-64bit/include/QtNetwork
-IC:/QtSDK/Qt4.8.3-64bit/include/QtCore -IC:/QtSDK/Qt4.8.3-64bit/include
-IC:/QtSDK/Qt4.8.3-64bit/include/QtGui -IC:/QtSDK/Qt4.8.3-64bit/include/QtNetwork
-IC:/QtSDK/Qt4.8.3-64bit/include/QtCore -IC:/dev/ORA-CBCT-64bit-build
...
...
...
-IC:/dev/ORA-CBCT-64bit-build -IC:/dev/ORA-CBCT-64bit-build
-IC:/dev/ORA-CBCT/trunk/tools -IC:/dev/ORA-CBCT/trunk/core
-IC:/dev/ORA-CBCT/trunk/core/utils -IC:/dev/ORA-CBCT/trunk/gui 
-IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/bin/../include 
-IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/bin/../include/cudart -D __CUDACC__ -D QT_DLL
-D QT_GUI_LIB -D QT_NETWORK_LIB -D QT_CORE_LIB -D QT_DLL -D QT_GUI_LIB -D QT_NETWORK_LIB
-D QT_CORE_LIB -D NVCC -FI cuda_runtime.h C:/dev/ORA-CBCT/trunk/core/utils/oraCudaImagingRingPerspectiveReorientationFilter.cu  C:/Users/RA-Admin/AppData/Local/Temp/tmpxft_1cdc_-7_oraCudaImagingRingPerspectiveReorientationFilter.cpp1.ii



(more than 9000 characters - which is obviously too long for cl.exe The command line is too long.)





Many of the implied included directories (which are automatically derived by CMake) are definitely not required for compiling this library - cross-checked this on the command line manually.



Is it possible to control (manipulate?) the generated includes in this call by invoking the one other cmake macro? Is there some other workaround besides from placing the source code of the dependent libs in folds such C:a a.s.o. in order to get the resultant string shorter?



Thanks.



Lars





















--

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

Re: [CMake] command line too long when compiling CUDA code with WindowsSDK7.1_64bit

2013-11-22 Thread Lars Friedrich Lars

Hi Cory,



works like a charm!

(also without resetting COMPILE_DEFINITIONS)



Thanks a lot!



Lars



Gesendet:Freitag, 22. November 2013 um 14:11 Uhr
Von:Cory Quammen cory.quam...@kitware.com
An:Lars Friedrich Lars lars-friedr...@gmx.net
Cc:cmake@cmake.org
Betreff:Re: [CMake] command line too long when compiling CUDA code with WindowsSDK7.1_64bit


Lars,



When faced with this same problem, my workaround was to clear the list of include directories. It also turned out I needed to clear the compiler definitions passed with -D because nvcc choked on them. Heres how you do that.




SET_DIRECTORY_PROPERTIES( PROPERTIES INCLUDE_DIRECTORIES  )

SET_DIRECTORY_PROPERTIES( PROPERTIES COMPILE_DEFINITIONS  )




After these lines, you can again define includes and definitions needed for your CUDA library with include_directories, etc.



You may have to make sure this library is in a subdirectory for this to work. Thats what I had to do, but it looks like your library may already be in its own subdirectory, in which case clearing the include directories and compiler definitions should be sufficient.



Hope that helps,

Cory



On Fri, Nov 22, 2013 at 7:36 AM, Lars Friedrich Lars lars-friedr...@gmx.net wrote:




Hello,



were compiling CUDA code in a sub-library of a bigger project which depends on ITK, VTK, Qt, RTK and a further proprietary library.



The CMakeLists.txt of this sub-library looks somehow like this:




#


SET(OWN_LIB_NAME CBCTUtils)

SET({OWN_LIB_NAME}_HDRS
 ...
 oraCudaImagingRingPerspectiveReorientationFilter.h
)

SET({OWN_LIB_NAME}_SRCS
 ...
 oraCudaImagingRingPerspectiveReorientationFilter.cxx
)

CUDA_COMPILE({OWN_LIB_NAME}_CUDA
 oraCudaImagingRingPerspectiveReorientationFilter.hcu
 oraCudaImagingRingPerspectiveReorientationFilter.cu
)

# include dirs

INCLUDE_DIRECTORIES(
 {CBCT_BIN_DIR}
 {CBCT_SOURCE_DIR}
 {RTK_INCLUDE_DIRS}
 {RTK_LIBRARY_DIRS}
)

# add utilities library

ADD_LIBRARY({OWN_LIB_NAME} STATIC
 {{OWN_LIB_NAME}_SRCS}
 {{OWN_LIB_NAME}_HDRS}
 {{OWN_LIB_NAME}_CUDA}
)

SET_TARGET_PROPERTIES({OWN_LIB_NAME} PROPERTIES LINKER_LANGUAGE CXX)

TARGET_LINK_LIBRARIES({OWN_LIB_NAME}
 {RTK_LIBS}
 {CUDA_LIBRARIES}
 {CUDA_cufft_LIBRARY}
 {OPENCL_LIBRARIES}
 ITKCommon
 ITKNumerics
 ORAIFTools
 ORAIFImageAccess
 ORAIFNReg2D3DDRREngine
 ORAIFNReg2D3DMathMethods
 ORAIFNReg2D3DAlgorithm
 ExperimentalORAIFImagingRing
)

# unit test

IF(CBCT_BUILD_TESTING)
 ADD_SUBDIRECTORY({CMAKE_CURRENT_SOURCE_DIR}/testing)
ENDIF(CBCT_BUILD_TESTING)


#



The problem is that obviously the underlying generated cl.exe call is incredibly long:



cl.exe -D__CUDA_ARCH__=100 -nologo -E -TP -DCUDA_FLOAT_MATH_FUNCTIONS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS
-DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -D__CUDACC__ /DWIN32 /D_WINDOWS /W3 /Zm1000 /GR
/EHsc -DNOMINMAX /MD /O2 /Ob2 /D NDEBUG -IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/include
-IC:/dev-libs/gdcm-2.0.14-64bit-build -IC:/dev-libs/itk-3.20.1/Code/Review
-IC:/dev-libs/itk-3.20.1-64bit-review-build/Utilities/vxl/core
... -IC:/QtSDK/Qt4.8.3-64bit/include/QtGui -IC:/QtSDK/Qt4.8.3-64bit/include/QtNetwork
-IC:/QtSDK/Qt4.8.3-64bit/include/QtCore -IC:/QtSDK/Qt4.8.3-64bit/include
-IC:/QtSDK/Qt4.8.3-64bit/include/QtGui -IC:/QtSDK/Qt4.8.3-64bit/include/QtNetwork
-IC:/QtSDK/Qt4.8.3-64bit/include/QtCore -IC:/dev/ORA-CBCT-64bit-build
...
...
...
-IC:/dev/ORA-CBCT-64bit-build -IC:/dev/ORA-CBCT-64bit-build
-IC:/dev/ORA-CBCT/trunk/tools -IC:/dev/ORA-CBCT/trunk/core
-IC:/dev/ORA-CBCT/trunk/core/utils -IC:/dev/ORA-CBCT/trunk/gui 
-IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/bin/../include 
-IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/bin/../include/cudart -D __CUDACC__ -D QT_DLL
-D QT_GUI_LIB -D QT_NETWORK_LIB -D QT_CORE_LIB -D QT_DLL -D QT_GUI_LIB -D QT_NETWORK_LIB
-D QT_CORE_LIB -D NVCC -FI cuda_runtime.h C:/dev/ORA-CBCT/trunk/core/utils/oraCudaImagingRingPerspectiveReorientationFilter.cu  C:/Users/RA-Admin/AppData/Local/Temp/tmpxft_1cdc_-7_oraCudaImagingRingPerspectiveReorientationFilter.cpp1.ii



(more than 9000 characters - which is obviously too long for cl.exe The command line is too long.)





Many of the implied included directories (which are automatically derived by CMake) are definitely not required for compiling this library - cross-checked this on the command line manually.



Is it possible to control (manipulate?) the generated includes in this call by invoking the one other cmake macro? Is there some other workaround besides from placing the source code of the dependent libs in folds such C:a a.s.o. in order to get the resultant string shorter?



Thanks.



Lars
























--

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

[CMake] CPack install dirs pr component

2013-11-18 Thread Lars Lars
How can I specify different install dir prefix for two components using CPack 
and Wix generator?
 
The current setup installs runtime files to C:\Program Files\MyCompany\bin and 
data to C:\Program Files\MyCompany\data. We would like to place the data files 
in for instance c:\data. The setup has two components named runtime and 
data which are used together with the install command.
 
Using CMake 2.8.11 on Windows 7.
 
  --

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

[CMake] Xml modification

2013-11-18 Thread Lars Lars
Does cmake support xml modification? We would like to update a number of xml 
configuration files with for instance version information. This information is 
only available at build time. --

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Xml modification

2013-11-18 Thread Lars Lars
Date: Mon, 18 Nov 2013 10:27:26 +0100
From: nilsglad...@gmail.com
To: laasu...@hotmail.com; cmake@cmake.org
Subject: Re: [CMake] Xml modification



  

  
  
On 11/18/2013 09:58 AM, Lars Lars
  wrote:



  
  Does cmake support xml modification? We would like
to update a number of xml configuration files with for instance
version information. This information is only available at build
time. 
  


I think CMake has very limited internal XML capabilities.

As far as I know there are neither CMake script nor external
commands CMake would provide to allow XML modification (not counting
generic text file modifications).



Nils
--- Thank you for the feedback. We would like to avoid adding a 
dependency to a third party lib for such a small task. Does CMake have any 
plans to include ability to modifications xml files? Lars   
   --

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

Re: [CMake] CPack install dirs pr component

2013-11-18 Thread Lars Lars
Date: Mon, 18 Nov 2013 10:21:57 +0100
From: nilsglad...@gmail.com
To: laasu...@hotmail.com; cmake@cmake.org
Subject: Re: [CMake] CPack install dirs pr component



  

  
  
On 11/18/2013 09:48 AM, Lars Lars
  wrote:



  
  How can I specify different install dir prefix
for two components using CPack and Wix generator?

 

The current setup installs runtime files to C:\Program
Files\MyCompany\bin and data to C:\Program Files\MyCompany\data.
We would like to place the data files in for instance c:\data.
The setup has two components named runtime and data which
are used together with the install command.

  



Currently the WiX generator does not support CPack components (WiX
features):

http://www.cmake.org/Bug/view.php?id=14434



As far as I can tell CPack does not support a per component
installation prefix either but I guess it _might_ be possible to
achieve this with custom templates once I actually have an
implementation of CPack components. I am not certain yet since I
haven't entirely decided on how to implement this.



Nils --- Thank you for the feedback. Please execuse my ignorace but does 
the fact that the WIX generator does not support CPack components mean it will 
always install all components? So specifying CPACK_COMPONETS_ALL with a subset 
of components will have no effect? What is the timeframe for adding cpack 
component support for WIX generator? Lars
  --

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

[CMake] Qt4 QT_INSTALL_LIBS

2013-11-14 Thread Lars Lars
Hello,
 
Using CMake 2.8.10 on Windows 7.
 
We have a working project that finds QT liket this:
FIND_PACKAGE(Qt4 4.7.1 COMPONENTS QtCore QtGui)
 
Now we would like to update Qt library, so changed it to:
FIND_PACKAGE(Qt4 4.8.4 COMPONENTS QtCore QtGui)
 
This however fails because FindQt4.cmake execute qmake -query QT_INSTALL_LIBS 
which returns the path where the Qt library was built. We however store Qt in 
another location in our development setup. How can is solved this issue without 
rebuilding the Qt library in the same path as the development setup? 
 
What is the rational behind querying qmake for the the location of the libs? 
 
Regards, Lars
  --

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

Re: [CMake] CPack, Wix using util:XmlFile

2013-11-11 Thread Lars Lars

 
Date: Sun, 10 Nov 2013 21:20:47 +0100
From: nilsglad...@gmail.com
To: laasu...@hotmail.com; cmake@cmake.org
Subject: Re: [CMake] CPack, Wix using util:XmlFile


  

  
  
On 10.11.2013 17:46, Lars Lars wrote:



  
  



Just a follow up question, how does CPack invoke candle and
  light? On Windows 7, using Process Monitor I do see these
  executables being spawned into a separate process when doing
  cpack -G WIX.



  

I am not entirely sure what you mean by how.



But you can find the invocation here:

   
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CPack/WiX/cmCPackWIXGenerator.cxx



Specifically RunLightCommand() and RunCandleCommand() run light and
candle respectively.



You might also want to take a look at:

   
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9531f2587cb6782ba1d17214c14be1cad38d050c;hp=6fb1bc23ee4946ac81151ce64786b51eabd1f04e



Which I just merged to next to implement:

http://public.kitware.com/Bug/view.php?id=14554



I hope that help!



Nils --  Thank you for your reply and very quick response to the feature 
request I reported :-)  It is very nice that you added variable for both 
extension and extra_flags. This will definitely come in handy. I am still quite 
new to CMake so execuse the igorance but does merging the issue into next mean 
it will be included in the next release? Lars
  --

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

[CMake] CPack, Wix using util:XmlFile

2013-11-08 Thread Lars Lars
Hello,
 
Using CMake 2.8.11 and Wix 3.7 on Windows 7.
 
Using CPack to generate a msi using a custom wix template. I would like to add 
an util:XmlFile element to the template but this require candle and light to be 
executed with the option -ext  WixUtilExtension. Does anyone know of a way to 
add this option to the existing version of cmake\cpack? Does Cmake provide any 
utility to modify an xml file?
 
Regards, Lars
  --

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

Re: [CMake] can start menu content depend on what components selected for install

2013-10-04 Thread West Lars-Gunnar
I finally got an answer on stackoverwflow,
http://stackoverflow.com/questions/18965206/how-get-cpack-to-generate-correct-start-menu-shortcuts
Now I know it is a known bug for a long time.
http://public.kitware.com/Bug/print_bug_page.php?bug_id=9846
And it probably never get fixed?


From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
West Lars-Gunnar
Sent: den 30 september 2013 10:54
To: cmake@cmake.org
Subject: [CMake] can start menu content depend on what components selected for 
install

I can't figure out how to generate a start menu that reflects my selection of 
installed components.
This is for installation on windows using cmake, cpack and nsis.
Is it possible to do?

Regards
Lars

--

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

[CMake] can start menu content depend on what components selected for install

2013-09-30 Thread West Lars-Gunnar
I can't figure out how to generate a start menu that reflects my selection of 
installed components.
This is for installation on windows using cmake, cpack and nsis.
Is it possible to do?

Regards
Lars

--

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

[CMake] how generate correct start menu shortcuts for selectable programs in installer

2013-09-24 Thread West Lars-Gunnar
Hi,

This is on windows XP or 7, I want to use cmake, cpack and nsoi and create an 
installer for some programs.
In the installer I select which programs to install and selected programs shall 
show up in the start menu as shortcuts.
Here is a simple try that is incorrect.
Have done one component for each program, is this the best way to organize 
things?
But can't figure out how to generate the start-menu variable depending on what 
programs is selected to install
Now all program shortcuts is always in the menu even if they are not selected 
to be installed.

First is a simple program to be installed.

- prog1.cpp 
#include iostream
#include conio.h

int main()
{
  std::cout  prog1  std::endl;
  _getch();
  return 0;
}
---

and here is the CMakeLists.txt file

-- CMakeLists.txt -
cmake_minimum_required( VERSION 2.8 )
project ( CompoTest )

add_executable(prog1 prog1.cpp)
add_executable(prog2 prog2.cpp)
add_executable(prog3 prog3.cpp)

install(TARGETS prog1
RUNTIME DESTINATION bin
COMPONENT compo1)
install(TARGETS prog2
RUNTIME DESTINATION bin
COMPONENT compo2)
install(TARGETS prog3
RUNTIME DESTINATION bin
COMPONENT compo3)

set ( CPACK_PACKAGE_VERSION 1.0.0 )

set(CPACK_PACKAGE_EXECUTABLES
prog1 prog 1
prog2 prog 2
prog3 prog 3
)

set ( CPACK_COMPONENTS_ALL compo1 compo2 compo3 )
include (CPack)
--

Is it possible to do this?

Regards
Lars

--

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

[CMake] find_package

2013-09-05 Thread Lars Lars
Using Latest version of CMake on Windows 7 and Redhat 6
 
Running the below code on both platforms produce slightly different content in 
QT_LIBRARIES.
 
FIND_PACKAGE(Qt4 4.7.1 COMPONENTS QtCore QtGui)
 
IF (QT4_FOUND)
  MESSAGE(STATUS QT_LIBRARIES: ${QT_LIBRARIES}
ENDIF()
 
On Windows I get;
Optimized;c:/tools/qt/lib/QtCore4.dll;debug;c:/tools/qt/lib/QtCored4.dll;
Optimized;c:/tools/qt/lib/QtGui4.dll;debug;c:/tools/qt/lib/QtGuid4.dll;
 
On Redhat I get;
/tools/qt/lib/libQtCore.so;/tools/qt/lib/libQtGui.so
 
The Redhat version is missing the keywords Optimzed and Debug.  
 
Reading the spec is appears the keywords are optional, is that correct?
 
So when no keyword is specified, then the library can be used with all 
configurations?
 
  --

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

[CMake] cpack component

2013-09-02 Thread Lars Lars
Hello,
We are using CPack (WIX generator) to create an installer. This works fine but 
with one slight problem that the installer contains a component that I did not 
expect.
The main CMakeList.txt file includes;
SET(CPACK_COMPONENTS_ALL RUNTIME)
In a sub CMakeList.txt file I have the following line:
INSTALL(
  DIRECTORY ${DOC_PATH}
  DESTINATION ${INSTALL_DOC_DIR}
  COMPONENT DOC)
The current installer should not include this component but another installer 
will include this component.
In the cmake_install.cmake that correspond to the sub CMakeList.txt I find the 
code below. 

# Set the component getting installed.
IF(NOT CMAKE_INSTALL_COMPONENT) # true
  IF(COMPONENT) # false
MESSAGE(STATUS Install component: \${COMPONENT}\)
SET(CMAKE_INSTALL_COMPONENT ${COMPONENT})
  ELSE(COMPONENT)
SET(CMAKE_INSTALL_COMPONENT)
  ENDIF(COMPONENT)
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
IF(NOT CMAKE_INSTALL_COMPONENT OR ${CMAKE_INSTALL_COMPONENT} STREQUAL DOC)
  FILE(...)
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR ${CMAKE_INSTALL_COMPONENT} STREQUAL 
DOC)

Debugging this code, it appears IF(NOT CMAKE_INSTALL_COMPONENT) is true and 
IF(COMPONENT) is false. This means CMAKE_INSTALL_COMPONENT is set to empty. 
This again means IF(NOT CMAKE_INSTALL_COMPONENT will be true and the file(s) 
will be installed. 
So the problem seems to be rooted in the fact that IF(COMPONENT) is false. So 
who is responsible for setting the content of COMPONENT variable? 
Appreciate any help.
 
  --

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

[CMake] find_package and install

2013-08-29 Thread Lars Lars
Hello,


I have the following configuration;


FIND_PACKAGE(Qt4 4.7.1 COMPONENTS QtCore)

IF (Qt4_FOUND)

INCLUDE(${QT_USE_FILE})

MESSAGE(STATUS QT_LIBRARIES:${QT_LIBRARIES})

ENDIF()
 


# setup header and source files


 
ADD_EXECUTABLE(TBD ${_SOURCES} ${_HEADERS})

TARGET_LINK_LIBRARIES(TBD ${QT_LIBRARIES})


 
The message outputs;

QT_LIBRARIES:optimized;c:/tools/Qt_r/4.7.1-vs2005/lib/QtCore4.lib;debug;c:/tools/Qt_r/4.7.1-vs2005/lib/QtCored4.lib


 
So the target_link_libraries decode the content in QT_LIBRARIES variable to 
determine which library to link against. In this example that means if 
cmake_build_type is equal release then the optimized library is used. If 
cmake_build_type is equal debug then the debug library is used. This is a 
simple description of what happens.
 


Next I need to install the qt libraries. I am able to determine library path 
based on lib path. How do I determine to use optimized or debug or 
general? It would be great if this algorithm was the same as the one used by 
target_link_libraries api to select which library to link against.
 
Appreciate any input.

  --

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

[CMake] Support for custom wix template

2013-08-26 Thread Lars Lars
Hello,
 
I would like to know if the feature CPackWIX: Add support for custom WiX 
templates [commit: bf23891942d95a4075f349f6c4043647d47e546b] will be included 
in version 2.8.12? I cannot find it listed in 
http://public.kitware.com/Bug/roadmap_page.php?version_id=112 but downloading a 
development nightly build the changes are included. They are not a part of the 
2.8.11 version. [Here is link to the content: 
https://github.com/Kitware/CMake/commit/bf23891942d95a4075f349f6c4043647d47e546b
 ]
 
The http://public.kitware.com/Bug/roadmap_page.php specifies 14th of august as 
release date for version 2.8.12. That is obviously not going to happen. What is 
the current release date?
 
Thank you.
 
Regards, Lars
  --

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

Re: [CMake] Support for custom wix template

2013-08-26 Thread Lars Lars


 Date: Mon, 26 Aug 2013 13:29:22 +0200
 Subject: Re: [CMake] Support for custom wix template
 From: eric.noul...@gmail.com
 To: laasu...@hotmail.com
 CC: cmake@cmake.org
 
 2013/8/26 Lars Lars laasu...@hotmail.com:
  Hello,
 
  I would like to know if the feature CPackWIX: Add support for custom WiX
  templates [commit: bf23891942d95a4075f349f6c4043647d47e546b] will be
  included in version 2.8.12? I cannot find it listed in
  http://public.kitware.com/Bug/roadmap_page.php?version_id=112 but
  downloading a development nightly build the changes are included.
 
 May it is not shown on the roadmap because there is no bug report/feature
 request corresponding to this particular commit.
Does the SCM permit commits that are not tied to a bug\feature request?
 
  They are
  not a part of the 2.8.11 version. [Here is link to the content:
  https://github.com/Kitware/CMake/commit/bf23891942d95a4075f349f6c4043647d47e546b
  ]
 
 WiX generator was in 2.8.11 see:
 git tag --contains 85baac1503c638756211ba07c4c25128e6d3d845
 v2.8.11
 v2.8.11.1
 v2.8.11.2
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85baac1503c638756211ba07c4c25128e6d3d845
 
Yes, I am aware that the wix generator is part of version 2.8.11.*. 
The feature I would like is called CPackWIX: Add support for custom WiX 
templates and has commit hash bf23891942d95a4075f349f6c4043647d47e546b.
The commit appears to be included in all major branches;
$ git branch --contains bf23891942d95a4075f349f6c4043647d47e546b  master  
remotes/origin/master* remotes/origin/mastert  remotes/origin/next  
remotes/origin/release
However, I just found it odd that I could not find it mentioned in the roadmap. 
Hence the post.
  The http://public.kitware.com/Bug/roadmap_page.php specifies 14th of august
  as release date for version 2.8.12. That is obviously not going to happen.
  What is the current release date?
 
 The first 2.8.12 rc is out:
 http://www.cmake.org/pipermail/cmake/2013-August/055547.html
 did you test it?
 
 I guess the feature you expect should be in it (but I cannot check
 right now because
 of a temporary internet access issue).
 
 Concerning the real release date, I think like always that this is a
 slightly moving target.
Thought so. Anyone have a ballpark estimate?
 I let Kitware guy answer that question, though :-) 
 -- 
 Erk
 L'élection n'est pas la démocratie -- http://www.le-message.org
  --

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

[CMake] find_package components required or not

2013-08-15 Thread Lars Lars
Hello,
 
The find_package macro provides the keywords REQUIRED and COMPONENTS. 



The docs state: The REQUIRED option stops processing with an error message if 
the package cannot be found. A package-specific list of components may be 
listed after the REQUIRED option or after the COMPONENTS option if no REQUIRED 
option is given.



When using find_package and the REQUIRED keyword, are all components required?


When using find_package and the COMPONENTS keywords, are all components 
required?



It would be nice if the docs could state this information. 
 
regards,
Lars
  --

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

[CMake] Custom target/command dependencies with Visual Studio

2012-02-23 Thread Lars Christensen
I have this simple CMakeLists.txt:

add_custom_target(deptest ALL DEPENDS files.out)
add_custom_command(OUTPUT foo.x COMMAND touch foo.x DEPENDS foo.cpp)
add_custom_command(OUTPUT bar.x COMMAND false DEPENDS bar.cpp)
add_custom_command(OUTPUT files.out COMMAND touch files.out DEPENDS foo.x
bar.x)

Notice that bar.x always fails building intentionally, to demonstrate this
issue:

When I generate Visual Studio 10 solution  project files from this and
build it, it keeps regenerating foo.x every time i choose Build Solution,
even though it is generated perfectly the first time. Only if ALL the
dependencies of files.out are successfully generated, will VS stop building
each and every one.

This is a small problem for this example, but becomes a major nuisance in a
project with hundreds of custom commands generating intermediate files
based on .cpp source files. If just one of them fails, they are all rebuilt.

I don't know if this is the fault of CMake or Visual Studio, but perhaps
someone else have some insight. I cannot see anything wrong with the
dependency settings for the generated .vcxproj files.

With the MinGW Makefiles generator, I don't have the same problem, and
foo.x is only built once.
--

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] Remove a library from linking which was added with target_link_libraries

2011-08-24 Thread Lars Bilke
Dear CMake-users,

is it possible to remove a library which is linked to a target. The library 
linkage was added with the target_link_libraries command. Because of that this 
command gets called by a third party cmake script removing the command call is 
not an option.

Do you have any ideas?
Thanks,
Lars.
___
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] Outputting targets to subdirectories

2010-06-04 Thread Lars Sønderby Jessen
Hi,

I have a project where I need to generate 2 target files in different folders:

OUTPUT_DIR/myapp.exe
OUTPUT_DIR/plugins/myplugin.dll

I've created the following CMakeLists.txt:
SOURCE_DIR/CMakeLists.txt
SOURCE_DIR/plugins/CMakeLists.txt

With the following contents:

SOURCE_DIR/CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
project(myproject)
add_executable(myexe main.cxx)
add_subdirectory(plugins)


SOURCE_DIR/plugins/CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
set(RUNTIME_OUTPUT_DIRECTORY plugins)
add_library(myplugin SHARED myplugin.cxx) 

But this produces the following output:
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/myexe.exe
${CMAKE_CURRENT_BINARY_DIR}/plugins/${CMAKE_CFG_INTDIR}/myplugin.dll

How can I change the 2nd CMakeLists.txt file such that I get the following 
output:
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/myexe.exe
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/plugins/myplugin.dll

?


- Lars
___
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] Unable to compile a simple test program

2007-06-15 Thread Lars Nygard
Hi,

Im having some problems with cmake and Visual studio 2003 .NET. It has worked
good some time, but a few weeks I suddenly got unable to compile a simple test 
program.
When I re-install visual studio, it sometimes works for a while but after a few 
configuration
i get this error. I can't understand what's wrong.
Ive tried re-installing windows, cmake and visual studio several times but this 
error is coming
back.
Can anybody give me some advice on how to analyse what's wrong? Im not that 
profficient
with either configuring visual studio or cmake.
Id really appreciate any help.
regards,
Lars Nygard

Im using Visual Studio .NET 2003, Window XP service pack2 (with all latest 
updates)
and Cmake 2.4 patch 6
This is part of the error file from cmake.
**
Determining if the C compiler works failed with the following output:

Building Custom Rule C:/Documents and Settings/lars/Desktop/Insight 
Toolkit/myPrograms/ImageRegistrationBin/CMakeFiles/CMakeTmp/CMakeLists.txt
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio .NET 
2003/Vc7/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio .NET 
2003/Vc7/bin/cl.exe -- broken
CMake Error: The C compiler C:/Program Files/Microsoft Visual Studio .NET 
2003/Vc7/bin/cl.exe is not able to compile a simple test program.
It fails with the following output:
Microsoft (R) Development Environment  Version 7.10.3077.
Copyright (C) Microsoft Corp 1984-2001. All rights reserved.
-- Build started: Project: cmTryCompileExec, Configuration: Debug Win32 
--
cmTryCompileExec : warning PRJ0009 : Build log could not be opened for writing.
Make sure that the file is not open by another process and is not 
write-protected.
cmTryCompileExec : error PRJ0020 : Tool 'C/C++', Property 'Object File Name' 
contains invalid file name 'cmTryCompileExec.dir\Debug\testCCompiler.c'.
cmTryCompileExec : error PRJ0005 : Unable to create a temporary file in 
directory 'c:\Documents and Settings\lars\Desktop\Insight 
Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug'.
 
Build log was saved at file://c:\Documents and Settings\lars\Desktop\Insight 
Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\Build
 
cmTryCompileExec - 2 error(s), 1 warning(s) 
-- Done --
 
Build: 0 succeeded, 1 failed, 0 skipped
 
CMake will not be able to correctly generate this project.
-- Configuring done
Compiling...
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
cl /Od /D _MBCS /FD /RTCs /MDd /GS /FocmTryCompileExec.dir\Debug\\ 
/FdDebug/cmTryCompileExec.pdb /W3 /c /Zi /TC/DWIN32 /D_WINDOWS  /Zm1000   
/D_DEBUG-DCMAKE_INTDIR=\Debug\
   .\testCCompiler.c
testCCompiler.c
Linking...
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.
/OUT:Debug\cmTryCompileExec.exe /VERSION:0.0 /INCREMENTAL /DEBUG 
/PDB:Debug\cmTryCompileExec.pdb /SUBSYSTEM:CONSOLE /STACK:1000 
/machine:I386 /debug kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
odbc32.lib odbccp32.lib 
.\cmTryCompileExec.dir\Debug\testCCompiler.obj 
 
Build log was saved at file://c:\Documents and Settings\lars\Desktop\Insight 
Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm
 
cmTryCompileExec - 2 error(s), 1 warning(s) 
-- Done --





_
Alt i én. Få Yahoo! Mail med adressekartotek, kalender og
notisblokk. http://no.mail.yahoo.com
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Unable to compile a simple test program

2007-06-15 Thread Lars Nygard
Hi David,

Thaks for your email. I tried what you said but I still get the same error.
Where can I download cmake 2.4.7? The latest version on the site is
2.4.6...
greets,
Lars Nygard


- Original Message 
From: David Cole [EMAIL PROTECTED]
To: Lars Nygard [EMAIL PROTECTED]
Cc: cmake@cmake.org
Sent: Friday, June 15, 2007 10:47:28 AM
Subject: Re: [CMake] Unable to compile a simple test program

This file name: ...
c:\Documents and Settings\lars\Desktop\Insight Toolkit\myPrograms\ImageRegist
rationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug
 
...is 254 characters long.


Try a shorter initial directory for your source and build trees. Also: perhaps 
try updating to CMake 2.4.7, it has some bug fixes in it that may prevent the 
occurrence of ridiculously long file names during try compiles... 


HTH,
David



On 6/15/07, Lars Nygard [EMAIL PROTECTED] wrote:
Hi,

Im having some problems with cmake and Visual studio 2003 .NET. It has worked
good some time, but a few weeks I suddenly got unable to compile a simple test 
program.
When I re-install visual studio, it sometimes works for a while but after a few 
configuration 
i get this error. I can't understand what's wrong.
Ive tried re-installing windows, cmake and visual studio several times but this 
error is coming
back.
Can anybody give me some advice on how to analyse what's wrong? Im not that 
profficient 
with either configuring visual studio or cmake.
Id really appreciate any help.
regards,
Lars Nygard

Im using Visual Studio .NET 2003, Window XP service pack2 (with all latest 
updates)
and Cmake 2.4 patch 6 
This is part of the error file from cmake.
**
Determining if the C compiler works failed with the following output:

Building Custom Rule C:/Documents and Settings/lars/Desktop/Insight 
Toolkit/myPrograms/ImageRegistrationBin/CMakeFiles/CMakeTmp/CMakeLists.txt 
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio .NET 
2003/Vc7/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio .NET 
2003/Vc7/bin/cl.exe -- broken
CMake Error: The C compiler C:/Program Files/Microsoft Visual Studio .NET 
2003/Vc7/bin/cl.exe is not able to compile a simple test program. 
It fails with the following output:
Microsoft (R) Development Environment  Version 7.10.3077.
Copyright (C) Microsoft Corp 1984-2001. All rights reserved.
-- Build started: Project: cmTryCompileExec, Configuration: Debug Win32 
-- 
cmTryCompileExec : warning PRJ0009 : Build log could not be opened for writing.
Make sure that the file is not open by another process and is not 
write-protected.
cmTryCompileExec : error PRJ0020 : Tool 'C/C++', Property 'Object File Name' 
contains invalid file name ' cmTryCompileExec.dir\Debug\testCCompiler.c'.
cmTryCompileExec : error PRJ0005 : Unable to create a temporary file in 
directory 'c:\Documents and Settings\lars\Desktop\Insight 
Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug'.
 

Build log was saved at file://c:\Documents and Settings\lars\Desktop\Insight 
Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\Build
 
cmTryCompileExec - 2 error(s), 1 warning(s)
-- Done --

Build: 0 succeeded, 1 failed, 0 skipped

CMake will not be able to correctly generate this project.
-- Configuring done
Compiling...
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
cl /Od /D _MBCS /FD /RTCs /MDd /GS /Fo cmTryCompileExec.dir\Debug\\ 
/FdDebug/cmTryCompileExec.pdb /W3 /c /Zi /TC/DWIN32 /D_WINDOWS  /Zm1000   
/D_DEBUG-DCMAKE_INTDIR=\Debug\
   .\testCCompiler.c
testCCompiler.c 
Linking...
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.
/OUT:Debug\cmTryCompileExec.exe /VERSION:0.0 /INCREMENTAL /DEBUG 
/PDB:Debug\cmTryCompileExec.pdb /SUBSYSTEM:CONSOLE /STACK:1000 
/machine:I386 /debug kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
odbc32.lib odbccp32.lib
.\cmTryCompileExec.dir\Debug\testCCompiler.obj

Build log was saved at file://c:\Documents and Settings\lars\Desktop\Insight 
Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm
 
cmTryCompileExec - 2 error(s), 1 warning(s

Re: [CMake] Unable to compile a simple test program

2007-06-15 Thread Lars Nygard
Hi,
Thanks for that link to the latest version. It didn't help me unfortunately, Im 
getting
the same error. Other suggestion are welcome.
I just tried Express Visual Studio 2008, and didn't work either. Here is the 
error
message:
-
CMake Error: Error in configuration process, project files may be invalid
___
 
More error report is below. It's somewhat similar to what I get in VS 2003:
Compiler broken and not able to compile a simple test program.
Id really appreciate any help with this.
thanks in advance,
lars

Determining if the C compiler works failed with the following output:

Microsoft (R) Visual C++ Express Edition Version 8.0.50727.42.
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
-- Build started: Project: ZERO_CHECK, Configuration: Debug Win32 --
Checking Build System
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
8/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
8/VC/bin/cl.exe -- broken
CMake Error: The C compiler C:/Program Files/Microsoft Visual Studio 
8/VC/bin/cl.exe is not able to compile a simple test program.
It fails with the following output:
 
CMake will not be able to correctly generate this project.
-- Configuring done
Build log was saved at 
file://c:\Inisght\Binaries\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\ZERO_CHECK.dir\Debug\BuildLog.htm
ZERO_CHECK - 0 error(s), 0 warning(s)
-- Build started: Project: cmTryCompileExec, Configuration: Debug Win32 
--
cmTryCompileExec : error PRJ0005 : Unable to create a temporary file in 
directory 
'c:\Inisght\Binaries\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug'.
cmTryCompileExec : error PRJ0004 : Could not generate command line for the 
'VCCustomBuildTool' tool.
Build log was saved at 
file://c:\Inisght\Binaries\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm
cmTryCompileExec - 2 error(s), 0 warning(s)
== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==
CMake will not be able to correctly generate this project.
-- Configuring done
Build log was saved at 
file://c:\Inisght\Binaries\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\ZERO_CHECK.dir\Debug\BuildLog.htm
ZERO_CHECK - 2 error(s), 0 warning(s)
-- Build started: Project: cmTryCompileExec, Configuration: Debug Win32 
--
Building Custom Rule 
C:/Inisght/Binaries/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/CMakeLists.txt
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
8/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
8/VC/bin/cl.exe -- broken
CMake Error: The C compiler C:/Program Files/Microsoft Visual Studio 
8/VC/bin/cl.exe is not able to compile a simple test program.
It fails with the following output:
 



- Original Message 
From: David Cole [EMAIL PROTECTED]
To: Lars Nygard [EMAIL PROTECTED]
Cc: cmake@cmake.org
Sent: Friday, June 15, 2007 11:38:23 AM
Subject: Re: [CMake] Unable to compile a simple test program

Bill's release candidate email to the list earlier this month (including the 
download link and change descriptions) is in the list archives:

http://www.cmake.org/pipermail/cmake/2007-June/014461.html 



On 6/15/07, Lars Nygard [EMAIL PROTECTED] wrote:
Hi David,
 
Thaks for your email. I tried what you said but I still get the same error.
Where can I download cmake 2.4.7? The latest version on the site is
2.4.6...
greets,
Lars Nygard


- Original Message 
From: David Cole  [EMAIL PROTECTED]
To: Lars Nygard [EMAIL PROTECTED]
Cc: cmake@cmake.org
Sent: Friday, June 15, 2007 10:47:28 AM
Subject: Re: [CMake] Unable to compile a simple test program

This file name: ...
c:\Documents and Settings\lars\Desktop\Insight Toolkit\myPrograms\ImageRegist 
rationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug
 
...is 254 characters long. 


Try a shorter initial directory for your source and build trees. Also: perhaps 
try updating to CMake 2.4.7, it has some

[CMake] Use of MACOSX_BUNDLE??

2006-04-11 Thread Lars Pechan

Hi all,
I have the following problem. I generate my wxWidgets project for  
Xcode on OSX. The result is an app that is not a first-class citizen.  
For example trying to activate the main window of the generated app  
is impossible, as is trying to use any of its menus. As a consequence  
of this I can't debug in Xcode; which is something I'd really like to  
do.


I know OSX needs a $AppName.app folder with some particular contents  
in it and found MACOSX_BUNDLE in the manual. Reading the manual I was  
guessing that all the Info.plist-related stuff, if used, would  
automatically generate an Info.plist and set up the bundle directory  
correctly. After having tried this it seems rather clear that that's  
not the case.


So the question is: How do I use MACOSX_BUNDLE and the associated  
MACOSX_BUNDLE bits to generate a first class , debuggable by  
Xcode citizen? Or do I have to do all of thi by myself using skeleton  
files and writing CMake code to set up directories and copy skeleton  
files across to those?


Thanks for any hints,

/Lars
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Use of -fPIC when linking executables

2006-03-14 Thread Lars Nordlund
On Tue, 14 Mar 2006 09:05:07 -0500
Brad King [EMAIL PROTECTED] wrote:
 If any of the libraries to which the executable links are shared then 
 -fPIC must be used in the link.  It isn't absolutely necessary on all 
 platforms but the same code generates the rules for other platforms too. 
   Is it breaking something for you?

No, no problem seen. I was just curious.


Thanks for the reply,
Lars Nordlund
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake