Re: [CMake] Visual Studio project layout

2010-12-21 Thread Diablo 666
Search for property SOLUTION_FOLDER, introduced in 2.8.3. Thanks a lot, that was exactly what I was looking for! (It seems actually, that the property is called FOLDER now) ___ Powered by www.kitware.com

[CMake] Visual Studio project layout

2010-12-14 Thread Diablo 666
Hi all, I'm trying to reduce the number of toplevel projects in my CMake generated Visual Studio solution. The idea is to group some targets in solution paths. The layout should look like this: Solution - Target 1 - Foo + Target 2 + Target 3 - Target 4 ... Is there a way to achieve this

[CMake] set CMAKE_INSTALL_PREFIX in CMakeLists

2010-11-26 Thread Diablo 666
And *NEVER EVER* set CMAKE_INSTALL_PREFIX in your CMakeLists.txt file. That is a user-setting and you will make people angry at you if you override their choice in your code. There is actually one single use-case where it might be useful to change this variable once: Say you have a library

[CMake] How to force the configure step to start over

2010-11-14 Thread Diablo 666
Hi, any ideas how to force it directly? for our projects, I use a variable called RESET_CACHE as a standard. Every FOOConfig.cmake, FindFoo.cmake, ... uses this variable to force resetting a lot of cache variables. So it suffices for a project to include this variable. Anyway, this does not

[CMake] Auto re-configuring until cache stops changing

2010-09-08 Thread Diablo 666
Hi, What I meant was that the curses and Qt UI's should behave more like 'cmake'. What does cmake actually do? The following code runs into an infinite loop on ccmake (like intended), but cmake seems to finish after the first pass (it just prints out on once), though there is a newly

Re: [CMake] makefile to CMakeLists.txt, possible?

2010-09-02 Thread Diablo 666
Hi, For example, when you add a C++ source file, you'll need to run cmake and then make. make will automatically re-run cmake, if the cmake files have changed. I guess, there will be some IDEs automatically generating cmake files in the future. generate n Makefiles so that each CPU is

Re: [CMake] makefile to CMakeLists.txt, possible?

2010-09-02 Thread Diablo 666
I think what Andreas meant is that he expects IDE's to use CMake as their native build system and auto-generate the CMake code. Exactly. AFAIK KDevelop 4 is actually building cmake files. But I didn't see a working version of it, yet :(

[CMake] Library postfix

2010-08-24 Thread Diablo 666
Hi, is there a way to use the CMAKE_*_POSTFIX variables for libraries which are not targets of the current project? I'd like to avoid the optimized Foo debug FooD construct. (Actually, linking against other targets of the current project works well with only Foo) Best regards. Andreas

[CMake] Cache loss on warning

2010-08-20 Thread Diablo 666
Hi, there seems to be a little bug in ccmake: When I start cmake like follows: cmake . -DFOO_DIR=/path/to -DVTK_DIR=/other/path/to I get the following warning: Warning: CMake is forcing CMAKE_CXX_COMPILER to /usr/bin/g++ to match that imported from VTK. This is required because C++ projects

Re: [CMake] Cache loss on warning

2010-08-20 Thread Diablo 666
This sounds like a pretty oldish version of CMake to me... What version are you using? cmake version 2.6-patch 4, Compatibility mode is set to 2.6 via the CMakeLists.txt ___ Powered by www.kitware.com

[CMake] Strange behaviour with self link

2010-08-11 Thread Diablo 666
Hi, I'm getting in some trouble with a self linking directory under Linux here. In /home/, there is a sym-link zam, linking to . (please don't ask me, why they created this one...) Now I have a directory Test with a sub-directory Foo and the following CMakeLists.txt:

Re: [CMake] Strange behaviour with self link

2010-08-11 Thread Diablo 666
Hi, OK... I won't ask why? -- the fact that you told us not to ask means you realize this is some flavor of crazy I'm actually sure, that it was useful for them at some point in time... no, I'm not! I would guess it's because of the symlink to . that you mention. Does the same thing

Re: [CMake] Strange behaviour with self link

2010-08-11 Thread Diablo 666
Hi again, even more strange: Now everything runs fine again. But the self link is still there and I have changed nothing. :confused: Thanks for your reply! Andreas ___ Powered by www.kitware.com Visit other

Re: [CMake] CMAKE_DEBUG_POSTFIX

2010-07-08 Thread Diablo 666
You mean in the same project? Just use the target name, CMake will figure things out on its own. The project itself is working fine. But I have to link against the libraries from other projects. Up to now, I'm working

Re: [CMake] CMAKE_DEBUG_POSTFIX

2010-07-08 Thread Diablo 666
Once again. Now to the correct email adress AND with the full text. Sorry for that! You mean in the same project? Just use the target name, CMake will figure things out on its own. The project itself is working fine. But I have to link against the libraries from other projects. Up to now,

Re: [CMake] Recursive list append

2010-07-06 Thread Diablo 666
If I use SET with PARENT_SCOPE, wouldn't this delete old entries? Say I have more than one subdirectory. Can I append entries from both subdirectories this way? _

Re: [CMake] Recursive list append

2010-07-06 Thread Diablo 666
CMakeLists.txt: ### set(some_list val1 val2 val3) add_subdirectory(subdir) message(STATUS some_list = ${some_list}) subdir/CMakeLists.txt: ## # append in local scope list(APPEND some_list val4 val5 val6) # set in parent scope set(some_list ${some_list}

Re: [CMake] Preserve tree structur for IDEs

2010-07-02 Thread Diablo 666
Hi, Date: Thu, 1 Jul 2010 15:03:13 +0200 Subject: Re: [CMake] Preserve tree structur for IDEs From: eric.noul...@gmail.com To: thediablo...@hotmail.de CC: cmake@cmake.org For grouping source in Visual Studio you may use source_group(name [REGULAR_EXPRESSION regex] [FILES src1 src2

[CMake] FindFoobar with non-root installation

2010-07-02 Thread Diablo 666
Hi, the last problem for today :) Assuming I develop a project called Foobar, which consists of some libraries only. To make using these libraries easier, I'd like to create a FindFoobar.cmake file to use with FIND_PACKAGE(). The problem is that I have a lot of clients which can't install

[CMake] Exclude CMakeFiles path from GLOB_RECURSE

2010-07-01 Thread Diablo 666
Hi, I'm currently trying to use the following line to include all source files into my build: file (GLOB_RECURSE Files_CPP *.cpp) add_executable(test ${Files_CPP} ) Everything runs fine while using an out-of-source build, but for in-source builds these lines include .cpp files from the

Re: [CMake] Exclude CMakeFiles path from GLOB_RECURSE

2010-07-01 Thread Diablo 666
Hi, thanks for your reply. 1. Never use GLOB_RECURSE. It's evil. E.g. if you add or remove source files, CMake has no way of knowing that it should be re-run. I have tested rerunning cmake manually and it worked out well. (Testcase: I added a new .cpp file to the build) I either have to

Re: [CMake] Exclude CMakeFiles path from GLOB_RECURSE

2010-07-01 Thread Diablo 666
Thing is: will you never forget? And it prevents stray files from being picked up (as you experienced). Also, you get an immediate response if a file is missing, and not just when the compiler complains about a missing header or you get undefined references during the linking stage. Ok,

[CMake] Preserve tree structur for IDEs

2010-07-01 Thread Diablo 666
Hi, I need CMake to create a Visual Studio solution for a project with several subdirectories but only one single library. How can I achieve project files that preserve this tree structure? Best regards, Andreas