Re: [CMake] INCLUDE command within a toolchain file is stripping file path if filename is a variable?

2012-05-09 Thread Terrence Meiczinger
Yes, I can confirm it does work under 2.8.7. Ok, I'll have to figure out the best way to use 2.8.x. Thanks for your help. [thunderpig:/src/cmake_foo]$ cmake -P includeTest.cmake -- INC_COMMON=include_me.cmake -- I = /src/cmake_foo/include_me.cmake have been included by -- I = /src/cmake_foo/incl

Re: [CMake] INCLUDE command within a toolchain file is stripping file path if filename is a variable?

2012-05-09 Thread Eric Noulard
2012/5/9 Terrence Meiczinger : > First, thanks for the responses. Ok, so I am running cmake 2.6patch4 on RH > 5.5. OK then you should really consider giving 2.8.x a try. 2.6.4 is more than 3 years old and there won't be any new 2.6.x release. Moreover I wasn't able to reproduce the error with 2.

Re: [CMake] INCLUDE command within a toolchain file is stripping file path if filename is a variable?

2012-05-09 Thread Terrence Meiczinger
First, thanks for the responses. Ok, so I am running cmake 2.6patch4 on RH 5.5. I download the code you attached and ran as suggested... -> cmake -P includeTest.cmake -- INC_COMMON=include_me.cmake -- I = /h/tmeiczin/CMAKE/include_me.cmake have been included by -- I = /h/tmeiczin/CMAKE/include_m

Re: [CMake] configure_file as a build step?

2012-05-09 Thread Eric Noulard
2012/5/9 Jensen, Erik A : > That worked, although a little roundabout. Thank you. > > Would there be any interest in having an easier way to do this? It seems like > it could be usefully in a fair number of situations. > > Maybe an additional -E command: > cmake -E configure_file -D var1=value1 -D

Re: [CMake] Package installation conundrum

2012-05-09 Thread David Cole
On Wed, May 9, 2012 at 4:01 PM, Alexander Neundorf wrote: > On Wednesday 09 May 2012, Michael Wild wrote: > >> On 09.05.2012, at 21:03, Alexander Neundorf >> wrote: > > ... > >> > > # configure the headers into the build tree so the package can be used > >> > > # without installing it and not har

Re: [CMake] INCLUDE command within a toolchain file is stripping file path if filename is a variable?

2012-05-09 Thread Eric Noulard
2012/5/9 Terrence Meiczinger : > I have a top level cmake toolchain file and I want it to include another > file. If I give the include a string filename it works. However, if I try to > make the filename a variable, it can no longer find the included file. It > appears cmake is stripping the pa

Re: [CMake] Package installation conundrum

2012-05-09 Thread Alexander Neundorf
On Wednesday 09 May 2012, Michael Wild wrote: > On 09.05.2012, at 21:03, Alexander Neundorf wrote: ... > > > # configure the headers into the build tree so the package can be used > > > # without installing it and not hard-coding the source/build directory > > > # information into FooConfig.cmake

Re: [CMake] INCLUDE command within a toolchain file is stripping file path if filename is a variable?

2012-05-09 Thread Alexander Neundorf
On Wednesday 09 May 2012, Terrence Meiczinger wrote: > I have a top level cmake toolchain file and I want it to include another > file. If I give the include a string filename it works. However, if I try > to make the filename a variable, it can no longer find the included file. > It appears cmake

Re: [CMake] Package installation conundrum

2012-05-09 Thread Michael Wild
On 09.05.2012, at 21:03, Alexander Neundorf wrote: > On Wednesday 09 May 2012, Michael Wild wrote: > > On 05/08/2012 11:13 PM, Dave Abrahams wrote: > > > on Tue May 08 2012, Alexander Neundorf > > > wrote: > > >> On Tuesday 08 May 2012, Dave Abrahams wrote: > > >>> Here's another one! > > >>> >

Re: [CMake] configure_file as a build step?

2012-05-09 Thread Jensen, Erik A
That worked, although a little roundabout. Thank you. Would there be any interest in having an easier way to do this? It seems like it could be usefully in a fair number of situations. Maybe an additional -E command: cmake -E configure_file -D var1=value1 -D var2=value2 --at-only infile outfile

[CMake] Problem with Visual Studio, custom commands, and dependencies. Bug?

2012-05-09 Thread Jensen, Erik A
Part of my build involves generating an archive of several files. To do this, I have custom commands for copying each file into a directory (some from the source tree, some from the build tree), a custom command for generating the archive, and a custom target that depends on the latter custom co

Re: [CMake] Package installation conundrum

2012-05-09 Thread Alexander Neundorf
On Wednesday 09 May 2012, Michael Wild wrote: > On 05/08/2012 11:13 PM, Dave Abrahams wrote: > > on Tue May 08 2012, Alexander Neundorf wrote: > >> On Tuesday 08 May 2012, Dave Abrahams wrote: > >>> Here's another one! > >>> > >>> Scenario: > >>> > >>> * I am running CMake under 0install to buil

[CMake] INCLUDE command within a toolchain file is stripping file path if filename is a variable?

2012-05-09 Thread Terrence Meiczinger
I have a top level cmake toolchain file and I want it to include another file. If I give the include a string filename it works. However, if I try to make the filename a variable, it can no longer find the included file. It appears cmake is stripping the path. The following works fine... linu

Re: [CMake] CPack doesn't recognize custom templates

2012-05-09 Thread NoRulez
>> By the way could you try 2.8.8 instead of 2.8.7 ?Yes, I will try it tomorrow (I read the changelog http://www.cmake.org/files/v2.8/CMakeChangeLog-2.8.8 but I can't find any details where this behavior may be fixed)Because on our Buildserver CMake 2.8.7 is installed and if no relevant changes are

Re: [CMake] ExternalProject danger- source directory is deleted

2012-05-09 Thread Jean-Christophe Fillion-Robin
Hi Pat, In some extent, I think the problem has been addressed in CMake master. See http://public.kitware.com/gitweb?p=cmake.git;a=commitdiff;h=987c017f6b1b49ab832c244166e30e07260432da http://public.kitware.com/gitweb?p=cmake.git;a=commitdiff;h=987c017f6b1b49ab832c244166e30e07260432da and htt

[CMake] ExternalProject danger- source directory is deleted

2012-05-09 Thread Pat Marion
When using ExternalProject, sometimes the build rules decide that an existing source directory needs to be deleted and re{downloaded,cloned}. In my experience, this is pretty dangerous and I have lost work due to it. Would it be possible to throw an error and ask the user to perform the delete, or

[CMake] Secret precompiled header support?

2012-05-09 Thread Robert Dailey
To my knowledge there are no dedicated target properties or commands that allow one to easily add precompiled headers support to a target. In my case, I'm generating for visual studio and I have the following that I can use to enable precompiled headers: macro( _precompiled_headers PrecompiledHead

Re: [CMake] CPack doesn't recognize custom templates

2012-05-09 Thread Eric Noulard
2012/5/9 : >>> Is it the case? Is there any file in _CPack_Packages\win32\NSIS\MyProject >>> ? > No, there aren't any files > > >>> Could you copy/paste the exact message you get and may be running cpack >>> on the command line with ---verbose and --debug. > Sure, but I can only do so tomorrow > >

Re: [CMake] CPack doesn't recognize custom templates

2012-05-09 Thread norulez
>> Is it the case? Is there any file in _CPack_Packages\win32\NSIS\MyProject ?No, there aren't any files>> Could you copy/paste the exact message you get and may be running cpack on the command line with ---verbose and --debug.Sure, but I can only do so tomorrow>> Nope normally you don't but what a

Re: [CMake] CPack doesn't recognize custom templates

2012-05-09 Thread Eric Noulard
2012/5/9 : [...] > > If I run the INSTALL target under VS then the files are correctly copied to > C:\Program Files\MyProject > But only the PACKAGE target under VS doesn't work, and I get the message > from the last email I sent. >> So, my custom CPackConfig.cmake.in and my NSIS.template.in see

Re: [CMake] C#/.NET

2012-05-09 Thread Pau Garcia i Quiles
Hi, >From what I can see, those custom commands do not generate .sln and MSBuild .csproj files, which means debugging will be difficult. This is a huge project with hundreds of subprojects and lots of .NET stuff: WPF, WCF, MEF, third-party dependencies, some C++ and C++/CLI, etc. It may be possib

Re: [CMake] CPack doesn't recognize custom templates

2012-05-09 Thread Eric Noulard
2012/5/9 David Cole : > What do your install commands look like? > > You're not trying to install files into absolute paths on Windows, are you? This can be checked easily by running: cpack --debug -G NSIS then you should get message like: Got some ABSOLUTE DESTINATION FILES: ... This can be f

Re: [CMake] CPack doesn't recognize custom templates

2012-05-09 Thread norulez
The install command looks something likemacro(InstallTarget TARGET)    INSTALL(TARGETS ${TARGET} BUNDLE DESTINATION . RUNTIME DESTINATION .ARCHIVE DESTINATION .LIBRARY DESTINATION . )endmacro(InstallTarget)...InstallTarget(MyApp)..InstallTarget(MyLib)Other files

Re: [CMake] CPack doesn't recognize custom templates

2012-05-09 Thread David Cole
What do your install commands look like? You're not trying to install files into absolute paths on Windows, are you? (i.e. -- all things should be installed underneath CMAKE_INSTALL_PREFIX in a normal 'make install' tree in order to work well on Windows with the NSIS generator.) On Wed, May 9,

Re: [CMake] C#/.NET

2012-05-09 Thread David Cole
As you can see from Mathieu's response, and the links he provided, building C# stuff from CMake is certainly possible with lots of custom command mojo. As the guy who wrote that mojo for mummy and activizdotnet, and the guy who closed the bug in our issue tracker until a funder/volunteer comes alo

Re: [CMake] CPack doesn't recognize custom templates

2012-05-09 Thread NoRulez
Hello Eric,I've found the problem, it was my mistake. A few lines later i overwrote the CPACK_MODULE_PATH setting. [RESOLVED] But what I didn't understand was the fact that it would work on Windows 7 with the same settings.So, my custom CPackConfig.cmake.in and my NSIS.template.in seems to work, b

Re: [CMake] Volunteering to become maintainer of FindLibLZMA.cmake

2012-05-09 Thread David Cole
Also, rather than adding yet-another-find-module to CMake, would it instead be possible to add a LZMAConfig.cmake file to the LZMA installation itself? (i.e. -- are you an LZMA maintainer, and could you put that file into the LZMA install tree...? If so, you should prefer that route, because it wi

Re: [CMake] Copying a cmake generated VisualStudio project file to another directory

2012-05-09 Thread Antje Kühn
OK. Thank you very much for your help. I think I'm now on the right way. Antje -Ursprüngliche Nachricht- Von: Petr Kmoch [mailto:petr.km...@gmail.com] Gesendet: Mittwoch, 9. Mai 2012 17:45 An: Antje Kühn Cc: cmake@cmake.org Betreff: Re: [CMake] Copying a cmake generated VisualStudio proj

Re: [CMake] Copying a cmake generated VisualStudio project file to another directory

2012-05-09 Thread Petr Kmoch
In that case, cmake should already be generating this for you, from your toplevel CMakeLists.txt file. On Wed, May 9, 2012 at 5:23 PM, Antje Kühn wrote: > No, I need one "main" solution that bundles all the other "subprojects". > > -Ursprüngliche Nachricht- > Von: Petr Kmoch [mailto:petr.

Re: [CMake] Copying a cmake generated VisualStudio project file to another directory

2012-05-09 Thread Antje Kühn
No, I need one "main" solution that bundles all the other "subprojects". -Ursprüngliche Nachricht- Von: Petr Kmoch [mailto:petr.km...@gmail.com] Gesendet: Mittwoch, 9. Mai 2012 17:19 An: Antje Kühn Cc: cmake@cmake.org Betreff: Re: [CMake] Copying a cmake generated VisualStudio project fil

Re: [CMake] Copying a cmake generated VisualStudio project file to another directory

2012-05-09 Thread Antje Kühn
Thank you for your answer! Up to now I used qmake for building the Visual Studio project environment. For every subprojct a *.vcxproj was built and in the end a Visual Studio solution of all the vcxproj files was created. As I know there is no way in cmake to generate a VS "Solution", so my idea w

Re: [CMake] Copying a cmake generated VisualStudio project file to another directory

2012-05-09 Thread Petr Kmoch
For every "project()" command in CMakeLists, cmake generates one .sln file (in addition to one .vcproj for each target added). Do you need any extra solutions? Petr On Wed, May 9, 2012 at 5:15 PM, Antje Kühn wrote: > Thank you for your answer! > Up to now I used qmake for building the Visual Stu

Re: [CMake] C#/.NET

2012-05-09 Thread Mathieu Malaterre
Hi, On Wed, May 9, 2012 at 11:19 AM, Pau Garcia i Quiles wrote: > Is anyone using CMake for C#/.NET projects? We are looking to moving > from Visual Studio solutions/projects to a proper build system and > CMake would be my preferred choice. Here is my two cents. Until CMake actually do support

Re: [CMake] building and running tests with one command

2012-05-09 Thread Leif Walsh
Yeah, I tried it and I couldn't really figure out what it's doing. I could give it a binary name that it would build and I could give it a command to use to test, but the goal here is to only require the test name (since that may be different from the binary name) and to build all dependencies o

Re: [CMake] building and running tests with one command

2012-05-09 Thread Bill Hoffman
I assume you have looked at ctest --build-and-test? -Bill -- 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 li

Re: [CMake] Copying a cmake generated VisualStudio project file to another directory

2012-05-09 Thread Petr Kmoch
Hi. Custom commands are executed at build time (that is, when you do a build in Visual Studio), not at generation time (when cmake is running). There is no way to hook something to the end of the generation process itself (see http://public.kitware.com/Bug/view.php?id=13020 ). BTW, it's generally

Re: [CMake] building and running tests with one command

2012-05-09 Thread Petr Kmoch
Actuall, I haven't tried this using ctest directly, just via make test (or its Visual Studio equivalent). I believe that to make it work as one test, you'd have to provide a trivial launcher which does the two build - run steps in sequence. Petr On Wed, May 9, 2012 at 3:16 PM, Leif Walsh wrote:

[CMake] Copying a cmake generated VisualStudio project file to another directory

2012-05-09 Thread Antje Kühn
Hi, I'm using CMake 2.8.7 to generate VC++ 2010 project files on Windows 7. At my CMakeLists.txt files I defined the following: add_executable(VSData ${SRC} ${INC}) Target_link_libraries(VSData ${SOME_LIBS}) Now I start cmake from my build directory with: >cmake -G "Visual Studio

Re: [CMake] building and running tests with one command

2012-05-09 Thread Leif Walsh
So you run 'ctest -R testTarget' and it picks up the build test too? Hmm. Thanks. On Wed, 9 May 2012, Petr Kmoch wrote: > The closest I've come to solving this problem is that for each test > ${testTarget}, I add two cmake tests: > > add_test(NAME build_${testTarget} COMMAND ${CMAKE_COMMAND} --

Re: [CMake] Checking if git submodules have been initialized

2012-05-09 Thread Arnaud Gelas
if( NOT EXISTS "${MY_SOURCE_DIR}/project/.git" ) message( SEND_ERROR "The git submodules are not available. Please run git submodule update --init --recursive" ) endif() HTH On 05/09/2012 02:52 PM, David Doria wrote: I have recently started using git submodules in my projects. I have had multi

[CMake] Checking if git submodules have been initialized

2012-05-09 Thread David Doria
I have recently started using git submodules in my projects. I have had multiple complains from my users "It gives me a "missing xyz.h" type of error when I try to compile." The reason is that they haven't initialized the submodules (like it says to do in the readme :) ). Is there a CMake way to ch

Re: [CMake] building and running tests with one command

2012-05-09 Thread Petr Kmoch
The closest I've come to solving this problem is that for each test ${testTarget}, I add two cmake tests: add_test(NAME build_${testTarget} COMMAND ${CMAKE_COMMAND} --build "${CMAKE_BINARY_DIR}" --target ${testTarget} --config $) add_test(NAME someName COMMAND ${testTarget} ...) It might even be

[CMake] C#/.NET

2012-05-09 Thread Pau Garcia i Quiles
Hi, Is anyone using CMake for C#/.NET projects? We are looking to moving from Visual Studio solutions/projects to a proper build system and CMake would be my preferred choice. -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) -- Powered by www.kitw

Re: [CMake] Volunteering to become maintainer of FindLibLZMA.cmake

2012-05-09 Thread Rolf Eike Beer
> Hi Eike, > > here a new version with the version support Looks good. Just a small nitpicks: -you should document also the LIBLZMA_VERSION_{MAJOR,MINOR,PATCH} variables -I would move setting LIBLZMA_LIBRARIES and LIBLZMA_INCLUDE_DIRS below the call to FPHSA and wrap it in an "if (LIBLZMA_FOUND)

Re: [CMake] Volunteering to become maintainer of FindLibLZMA.cmake

2012-05-09 Thread Mario Bensi
Hi Eike, here a new version with the version support Mario On Sunday, May 06, 2012 05:59:34 PM Rolf Eike Beer wrote: > > Hi > > > > In attachment a patch and the file FindLibLZMA.cmake > > > > If you think this module can be integrate in cmake and if you can give me > > the > > write access in