Re: [CMake] Visual Studio project layout
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 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] Visual Studio project layout
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 with CMake? Best regards, Andreas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] set CMAKE_INSTALL_PREFIX in CMakeLists
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 libFoo installed in /path/to/libfoo. Now you like to have an add-on library. You might want to normally install this library to the same location where the base library is. The CMake file here can set the CMAKE_INSTALL_PREFIX to /path/to/libfoo _once_. (I actually hope that there will never be a real libFoo in the world... I like to use the name in my mails) ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to force the configure step to start over
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 help resetting variables from outside projects. In this case I call my old friend rm -rf to the build directory :-) Best regards, Andreas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Auto re-configuring until cache stops changing
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 introduced cache variable on every run. SET (FOOBAR OFF CACHE BOOL bla) IF (NOT FOOBAR) SET (FOOBAR ON CACHE BOOL bla FORCE) SET (BLA ON CACHE BOOL foobar) UNSET (FOO CACHE) MESSAGE (STATUS on) ELSE() SET (FOOBAR OFF CACHE BOOL bla FORCE) UNSET (BLA CACHE) SET (FOO ON CACHE BOOL barfoo) MESSAGE (STATUS off) ENDIF(NOT FOOBAR) Andreas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] makefile to CMakeLists.txt, possible?
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 responsible for just their parts you might want to try make -j. I guess, this is exactly what you are searching for. Best regards, Andreas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] makefile to CMakeLists.txt, possible?
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 :( ___ 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] Library postfix
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 ___ 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] Cache loss on warning
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 must use the same compiler. If this message appears for more than one imported project, you have conflicting C++ compilers and will have to re-build one of those projects. Was set to /usr/bin/c++ Anyway, I get my makefiles and everything is fine. If I start ccmake with the same parameters, it prints the same warning and forgets about the FOO_DIR and VTK_DIR. The next time I try to configure the project, it resets the CXX_COMPILER to /usr/bin/c++, because it finds an older version of VTK. So there seems to be no way to configure my project while using VTK 5.6 but to delete all older versions of VTK? Best regards, Andreas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Cache loss on warning
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 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] Strange behaviour with self link
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: cmake_minimum_required(VERSION 2.6) PROJECT (TEST) ADD_SUBDIRECTORY(Foo) ccmake now creates the following message: CMake Error at CMakeLists.txt:4 (ADD_SUBDIRECTORY): add_subdirectory not given a binary directory but the given source directory /home/zam/zam/zam/diablo/Test/Foo is not a subdirectory of /home/zam/zam/diablo/Test. When specifying an out-of-tree source a binary directory must be explicitly specified. Any idea, why this is happening? Best regards, Andreas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Strange behaviour with self link
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 happen if you build in a non-zam based directory? Fortunately not. In any other directory I have access to I can do everything as normal. How did you invoke cmake? What are the actual source and build directories? Source directory: /home/diablo/Test with subdirectory Foo. Build directory: /home/diablo/Test/BUILD The Test directory contains a CMakeLists.txt - this is actually the only file. In the BUILD directory, I have started ccmake .., but I got the same errors by parsing the full directory name. Best regards, Andreas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Strange behaviour with self link
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 Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_DEBUG_POSTFIX
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 _ http://redirect.gimas.net/?n=M1007xIMFreunde4 Echte Freunde sagen's per Messenger!___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_DEBUG_POSTFIX
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, I'm working with one check to see if we are running on Windows or Linux. The Windows-version then has to include every library once with the debug keyword and once with the optimized keyword. This seems a little bit too difficult for me. Andreas _ http://redirect.gimas.net/?n=M1007xHMTL4 Künftig E-Mails über Hotmail ohne Werbung versenden!___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Recursive list append
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? _ http://redirect.gimas.net/?n=M1007xHMTL4 Künftig E-Mails über Hotmail ohne Werbung versenden!___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Recursive list append
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} PARENT_SCOPE) this is ugly. Really ugly. I like it :-D Thanks a lot! _ http://redirect.gimas.net/?n=M1007xHMTL4 Künftig E-Mails über Hotmail ohne Werbung versenden!___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Preserve tree structur for IDEs
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 ...]) thanks a lot! Works very fine after a few tries. I discovered one little problem: CMake automatically generates the folders Source files and Header files for source/header files that are not explicitly put into another folder. If one creates a folder Source files explicitly via source_group, one gets a broken Visual Studio solution file. Best regards, Andreas _ http://redirect.gimas.net/?n=M1007xHMTL4 Künftig E-Mails über Hotmail ohne Werbung versenden!___ 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] FindFoobar with non-root installation
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 the libraries as root, so have to support non-root installations. How can I use my FindFoobar.cmake file from other projects without having it installed as root? It should be as easy to use as possible. Best regards, Andreas _ http://redirect.gimas.net/?n=M1007xIMFreunde4 Echte Freunde sagen's per Messenger!___ 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] Exclude CMakeFiles path from GLOB_RECURSE
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 CMakeFiles directory. Is there any way to exclude this directory within the file command? Best regards, Andreas _ http://redirect.gimas.net/?n=M1007xHM2 Räumen Sie Ihr Postfach auf - ganz einfach mit Hotmail!___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Exclude CMakeFiles path from GLOB_RECURSE
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 change the CMakeLists.txt or to rerun cmake manually. Seems to be the same effort for me. 2. Never do in-source builds. CMake creates many, many files, and you don't want to delete them all individually for a clean build. And there's no way to implement a safe make clean (e.g. your build system might be running a custom utility which generates files CMake knows nothing about). I know these problems. I will never do an in-source-build again :-) But unfortunately, I have to support in-source builds, too. Best regards, Andreas _ http://redirect.gimas.net/?n=M1007xHMTL4 Künftig E-Mails über Hotmail ohne Werbung versenden!___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Exclude CMakeFiles path from GLOB_RECURSE
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, that sounds reasoble. (This should especially convince some lazy people :-D ) Thanks a lot! _ http://redirect.gimas.net/?n=M1007xHM2 Räumen Sie Ihr Postfach auf - ganz einfach mit Hotmail!___ 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] Preserve tree structur for IDEs
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 _ http://redirect.gimas.net/?n=M1007xIMFreunde3 Echte Freunde sagen's per Messenger!___ 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