On 26/08/11 17:54, Marc-André Moreau wrote : > Hi all, > > As 1.0 progresses, people are slowly getting used to cmake. There are still > many things which aren't obvious to newcomers though, and I am still learning > a lot. > > Is there anyone experienced with cmake that would like to work on documenting > its usage on the wiki?
As a happy cmake and freerdp user I'd be glad to give a hand on this, but I'm certainly not experienced enough to know all of the cmake's tricks > Generate makefiles: > cmake . yes or create a separate folder and then cmake /path/to/main/cmakelists/ > Generate Eclipse project files: > cmake -G"Eclipse CDT4 - Unix Makefiles" note that there are also GUIs that propose you with a list of "project type" to do that (but I never used them) > Delete cmake cache: > rm CMakeCache.txt (is there any other way?) not that I know of. But "ccmake .", "make edit_cache", "cmake -DMY_CACHEDVAR=" all edit the cache content There is also "make rebuild_cache", though it does not seem to act exactly the same as "rm CMakeCache.txt + cmake" > configure options: > ccmake . (is there any other way than using ccmake?) command line: cmake -DOPTIONNAME=ON/OFF maybe some cmake-GUI ? > How do we: > Generate Release vs Debug project files (default seems to be release) Several possible ways : 1. Using cmake -DCMAKE_BUILD_TYPE=Release/Debug/... (or setting CMAKE_BUILD_TYPE to "Release", "Debug", ... using "ccmake ."), and then you can use 2. Using one option "BUILD_DEBUG" (OPTION(BUILD_DEBUG "Debug mode" ON) in CmakeLists.txt), set to ON or OFF using "cmake -D" or ccmake, and in an "if(BUILD_DEBUG)" statement set(CMAKE_BUILD_TYPE "Debug") and/or simply add "-g" to the CMAKE_C_FLAGS/CMAKE_CXX_FLAGS in CMakeLists.txt 3. I'm not 100% sure, but I think that when you generate an XCode project (with "cmake -GXcode" ?) you can eventually use XCode IDE to select the build type for the project (as you can do in any usual Xcode project). Don't know whether it's possible in Eclipse or VisualStudio Note that in case CMAKE_BUILD_TYPE is set to "Release" (using 1 or 2), a NDEBUG macro is defined that you can use in your code (i.e. cmake generates a Makefile with "gcc -DNDEBUG blabla"). Alexis ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ Freerdp-devel mailing list Freerdp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freerdp-devel