[CMake] build vcproj no mac
Hello I try to use cmake, and could generate a project for gcc on my mac, and for visual studio on my pc. But is it possible to generate both from the map ccmake command ? I tried -G option and it did not work... Thanks for any information. -- Très cordialement, Riccardo Cohen --- Articque http://www.articque.com 149 av Général de Gaulle 37230 Fondettes - France tel : 02-47-49-90-49 fax : 02-47-49-91-49 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Marking a library dependency from within a library.
I have a library (libA), which depends upon another library (libB) for its implementation.I also have an executable (execC) which uses LibA. Is there an easy way of getting LibB added to the list of dependencies, so what when I do Add_Executable(exeC) Target_Link_Libraries(exeC libA) it knows (because of definitions in the CMakeLists.txt for libA) that it should also link libB? Joe ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Getting a list of all the variables.
How do I get a list of all variables currently defined within a run of CMake? Is there any easy way of dumping all the variables and their values, at the end of a CMakeLists.txt file for instance? Joe ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMAKE_PROJECT_NAME
Isn't the value of CMAKE_PROJECT_NAME supposed to contain the name given to the last PROJECT() call? It appears with the current version of CMAKE that it gets the value of the first call to PROJECT, and isn't subsequently updated. For example: CMakeLists.txt: Project(foo) MESSAGE(${CMAKE_PROJECT_NAME}) Project(bar) MESSAGE(${CMAKE_PROJECT_NAME}) Outputs: foo foo when run. Joe ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Getting a list of all the variables.
GET_CMAKE_PROPERTY(v VARIABLES) will fill the variable "v" with a list of the currently defined variables... "cmake --help-command GET_CMAKE_PROPERTY" yields: cmake version 2.4-patch 6 GET_CMAKE_PROPERTY Get a property of the CMake instance. GET_CMAKE_PROPERTY(VAR property) Get a property from the CMake instance. The value of the property is stored in the variable VAR. If the property is not found, CMake will report an error. Some supported properties include: VARIABLES, CACHE_VARIABLES, COMMANDS, and MACROS. On 10/18/07, Josef Karthauser <[EMAIL PROTECTED]> wrote: > > How do I get a list of all variables currently defined within a run of > CMake? Is there any easy way of dumping all the variables and their > values, at the end of a CMakeLists.txt file for instance? > > Joe > ___ > CMake mailing list > CMake@cmake.org > http://www.cmake.org/mailman/listinfo/cmake > ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE_PROJECT_NAME
Try "PROJECT_NAME" ... Where did you see it as "CMAKE_PROJECT_NAME"? On 10/18/07, Josef Karthauser <[EMAIL PROTECTED]> wrote: > > Isn't the value of CMAKE_PROJECT_NAME supposed to contain the name given > to the last PROJECT() call? It appears with the current version of > CMAKE that it gets the value of the first call to PROJECT, and isn't > subsequently updated. > > For example: > > CMakeLists.txt: > Project(foo) > MESSAGE(${CMAKE_PROJECT_NAME}) > > Project(bar) > MESSAGE(${CMAKE_PROJECT_NAME}) > > Outputs: > > foo > foo > > when run. > > Joe > ___ > CMake mailing list > CMake@cmake.org > http://www.cmake.org/mailman/listinfo/cmake > ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] build vcproj no mac
Riccardo Cohen wrote: Hello I try to use cmake, and could generate a project for gcc on my mac, and for visual studio on my pc. But is it possible to generate both from the map ccmake command ? I tried -G option and it did not work... Thanks for any information. No, CMake can only generate project files for a compiler it can run, so the compiler has to be installed and working on the machine that you are working with. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Marking a library dependency from within a library.
Josef Karthauser wrote: I have a library (libA), which depends upon another library (libB) for its implementation.I also have an executable (execC) which uses LibA. Is there an easy way of getting LibB added to the list of dependencies, so what when I do Add_Executable(exeC) Target_Link_Libraries(exeC libA) Yes, where you create libA, you add this: target_link_libraries(libA libB) CMake will automatically chain. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] build vcproj no mac
Thanks for your answer. On mac I cannot install visual studio, but I would like to generate (not compile) the vcproj file. Gau wrote: Riccardo Cohen wrote: Hello I try to use cmake, and could generate a project for gcc on my mac, and for visual studio on my pc. But is it possible to generate both from the map ccmake command ? I tried -G option and it did not work... Thanks for any information. I think cmake needs you install visual studio to generate your projects. -- Très cordialement, Riccardo Cohen --- Articque http://www.articque.com 149 av Général de Gaulle 37230 Fondettes - France tel : 02-47-49-90-49 fax : 02-47-49-91-49 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Marking a library dependency from within a library.
On Thursday 18 October 2007 13:47, Bill Hoffman wrote: > Josef Karthauser wrote: > > I have a library (libA), which depends upon another library (libB) for > > its implementation.I also have an executable (execC) which uses > > LibA. Is there an easy way of getting LibB added to the list of > > dependencies, so what when I do > > > > > > > > Add_Executable(exeC) > > > > Target_Link_Libraries(exeC libA) > > Yes, where you create libA, you add this: > > target_link_libraries(libA libB) > > CMake will automatically chain. Hi, this is the obvious answer if both library a built within your own project. However, it is unclear to me how to set such link dependencies between libs NOT being part of the project. In that case, your proposed solution would lead to CMake Error: Attempt to add link library "libB" to target "libA" which is not built by this project. I am not sure if Josef Karthauser was referring to such a situation. This case occurs quite often in my projects and so far I found no way how to fomulate these dependencies in an elegant way. Anyone who can help me (and probably Josef Karthauser)? Best regards -- Dipl. Phys. Christian Hoffmann Simulation and Optimization Group Interdisciplinary Center for Scientific Computing (IWR) Im Neuenheimer Feld (INF) 368, Room 414 University of Heidelberg www.iwr.uni-heidelberg.de/groups/agbock/ Office: +49 6221 54 88 95 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] build vcproj no mac
Riccardo Cohen wrote: Thanks for your answer. On mac I cannot install visual studio, but I would like to generate (not compile) the vcproj file. CMake build files are not transferable from machine to machine. Users must have CMake installed, and run it on each machine that the project is built on. There are many reasons for this, and it will not change. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] build vcproj no mac
Thanks a lot for your answers Bill Hoffman wrote: Riccardo Cohen wrote: Thanks for your answer. On mac I cannot install visual studio, but I would like to generate (not compile) the vcproj file. CMake build files are not transferable from machine to machine. Users must have CMake installed, and run it on each machine that the project is built on. There are many reasons for this, and it will not change. -Bill -- Très cordialement, Riccardo Cohen --- Articque http://www.articque.com 149 av Général de Gaulle 37230 Fondettes - France tel : 02-47-49-90-49 fax : 02-47-49-91-49 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Trouble with CMake + Eclipse + SVN/CVS
Quoting Pau Garcia i Quiles <[EMAIL PROTECTED]>: Quoting Eric Noulard <[EMAIL PROTECTED]>: 2007/10/17, Pau Garcia i Quiles <[EMAIL PROTECTED]>: [...] Is it possible to use CVS or SVN from Eclipse in a CMake-generated project in scenarios A or B? This is an Eclipse Team platform issue. You may read more information about it here http://www.cmake.org/pipermail/cmake/2007-August/015510.html and here http://dev.eclipse.org/mhonarc/lists/platform-cvs-dev/msg00452.html read those threads then you'll that A or B are not possible yet. You may create 2 Eclipse project the first being a "simple" checkout of your sources done with eclipse the second being the CMake generated project. Thank you. After reading those threads, I have been able to make scenario A (out-of-tree build) work with a bit of manual work. I am trying to modify the Eclipse generator to perform the changes automatically and will provide a patch. In case anybody is interesting, it is quite easy to get it to work. [...] I have improved the process a bit, there are no warnings or errors now. Assuming you have got a 'myapp' directory: 1. Create a 'myapp-build' directory at the same level 'myapp' is 2. From 'myapp-build', run 'cmake -G "Eclipse CDT4 - Unix Makefiles ../myapp' 3. Move .cproject and .project from 'myapp-build' to 'myapp' (I know, I know: not a pure out-of-tree build anymore, but this is the only "pollution" your tree will get) 4. Edit .project and: * At the top of the file, change myapp-build to myapp * At the end of the file, *only for the first entry* of -> change myapp to myapp-build and yourpath/myapp to yourpath/myapp-build * Remove subsequent entries of in 5. Edit .cproject and: * In '', remove the first entry ('') (this removes the warning about a missing myapp/myapp folder that was shown with my original "recipe") Now you have out-of-tree builds with CMake in Eclipse and CVS and SVN work fine (more than fine, actually: when you try to import your source into CVS or SVN, no generated file shows in the file selector). Remember to add myapp/.cproject and myapp/.project to the .cvsignore or to svn:ignore for them not to be in the repository. -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] compare ctest to dejagnu?
Someone in my group is investigating dejagnu. I was wondering if anyone with experience in ctest and dejagnu has any thoughts on these two testing systems? Thanks, Juan ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] including paths - basic
Hi, I'm new to cmake, it looks great. Is it possible to include different paths conditionally, like: include_directories (${MY_PROJECT_SOURCE_DIR}/my_lib) IF (WIN32) include_directories (C:/my_stuff/lib/something) ELSE (WIN32) include_directories (/usr/lib/something) ENDIF (WIN32) Can you keep added the include_directories statement? Thanks, Mark ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Project, dependendies and Dart2 questions
Hi, I have a program A depending on two internal libraries, B and C. A, B and C are build by CMake script and can be built independantly (A that also build B and C, B only and C only). When generating VS8 solutions, A, B and C are separated into project in the IDE, which is good. If I can, I can only build B or C. I guess its the same thing with my NMake generation and etc. But when submitting A results to the Dart server, it also contains B and C results. Is it possible to separate these when doing submission to Dart ? I would like to do one submission (of the entire A project) but have separated A, B and C results in Dart so the navigation would be easier. Also, I don't want A to contain B and C results in Dart. I want the result to be completly separated. Something like: A (5err, 6warn) B(10err, 9warn) C(0err, 10warn) If this is not possible, what other alternatives exist ? Regards, Félix C. Morency ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Marking a library dependency from within a library.
Bill, > Yes, where you create libA, you add this: > > target_link_libraries(libA libB) > > CMake will automatically chain. Has this feature recently changed? I thought that adding "target_link_libraries(libA libB)" would explicitly link libB to libA. Often when I am static linking, I do not want to link any libraries to each other. I just want to be able to link all of the libraries to the final executable(s). Ideally, I would like the linking of libA to automatically pull in the linking of libB when building exeC. From your example, this is what I think happens: 1) libB is linked to libA 2) libA is linked to exeC This is what I want to do: 1) libA and libB are linked to exeC Am I misunderstanding the target_link_libraries command? Thanks, Justin ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Marking a library dependency from within a library.
KSpam wrote: Bill, Yes, where you create libA, you add this: target_link_libraries(libA libB) CMake will automatically chain. Has this feature recently changed? I thought that adding "target_link_libraries(libA libB)" would explicitly link libB to libA. Often when I am static linking, I do not want to link any libraries to each other. I just want to be able to link all of the libraries to the final executable(s). Ideally, I would like the linking of libA to automatically pull in the linking of libB when building exeC. For static libraries the target_link_libraries will be ignored. So, it is safe to do in all cases. In fact for static links it makes things work much better, because it can keep the order of the static libraries correct. There is not a cross platform way to suck a static library into another static library. From your example, this is what I think happens: 1) libB is linked to libA 2) libA is linked to exeC This is what I want to do: 1) libA and libB are linked to exeC The example is this: add_library(libB) add_library(libA) target_link_libraries(libA libB) add_executable(excC) target_link_librareis(excC libA) This will result in this link: excC -> libA and libB -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindImageMagick: Rewrite to support all utilities.
On 10/14/07, Alex Neundorf wrote: > On Saturday 13 October 2007 07:17, Miguel A. Figueroa-Villanueva wrote: > > Hello, > > > > I've been assigned the task of maintaining the ImageMagick find > > module. As such, I made a rewrite to support the complete toolchain > > (i.e., all command line executables) and would like to ask for user > > feedback before committing the changes. The new module is attached for > > reference. > > > > The pattern that I'm using for this find module comes up a few times, > > for example FindLATEX could use it. Instead of hard-coding the tools > > to search for I use the COMPONENTS argument in of the FIND_PACKAGE > > command. For example, if I need ImageMagick's convert I would do: > > > > FIND_PACKAGE(ImageMagick COMPONENTS convert) > > > > If found the following variables will be set: > > > > # ImageMagick_FOUND - TRUE if all components are found. > > # ImageMagick_EXECUTABLE_DIR - Full path to executables directory. > > # ImageMagick__FOUND - TRUE if is found. > > # ImageMagick__EXECUTABLE - Full path to > > executable. > > Why do you use FIND_PATH() instead of FIND_PROGRAM() ? > Then you wouldn't have to care for the different suffixes. Something like this should work: FIND_PROGRAM(ImageMagick_mogrify_EXECUTABLE mogrify ...) GET_FILENAME_COMPONENT(ImageMagick_EXECUTABLE_DIR ImageMagick_mogrify_EXECUTABLE PATH ) ... Then the only variable in the CACHE would be ImageMagick_mogrify_EXECUTABLE instead of ImageMagick_EXECUTABLE_DIR. Should I change ImageMagick_EXECUTABLE_DIR to ImageMagick_ROOT_DIR ?? Since I haven't had any objections I'll go ahead and commit with the previous change (i.e., find_program thing above). Note also that I would like to make the following additions: - add XXX_EXECUTABLE_DIR to the variables in the readme.txt in the Modules directory, unless it is recommended to use the XXX_ROOT_DIR naming. - create a macro in the same line of FIND_PACKAGE_HANDLE_STANDARD_ARGS(...), and possibly in the same file, that checks if all components are found to set the main variable: FIND_PACKAGE_HANDLE_STANDARD_COMPONENTS(ImageMagick) would basically do a: # check if all components are found to set XXX_FOUND SET(XXX_FOUND TRUE) FOREACH (component ${XXX_FIND_COMPONENTS}) IF (NOT XXX_${component}_FOUND) SET(XXX_FOUND FALSE) ENDIF (NOT XXX_${component}_FOUND) ENDFOREACH (component) # handle standard args FIND_PACKAGE_HANDLE_STANDARD_ARGS(XXX DEFAULT_MSG XXX_FOUND) - Create a list of clean, standard compliant, non-patched cmake modules that can be used as example references for module developers. This could be added in the Module maintainer wiki page and/or the readme.txt and would add context to the specs in the readme.txt file. --Miguel ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] win32 rc files - or any other files besides cpp/cxx
Hi, I'm using cmake for a large project that has some win32 gui apps in it. In the main project folder I only include those sub projects if compiling for WIN32. That works fine. The win32 gui apps have a .rc file in a sub-folder named 'res'. How do you ask CMake to include those files in the resulting vc++ project? Thanks, Mark ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Windows make VERBOSE=1?
I'm using cmake2.5 HEAD. I'm trying to get a verbose build out of it on Windows using NMake Makefiles, with: make VERBOSE=1 but all I get with that are lines like: C:\ARCHIV~1\MICROS~1.NET\Vc7\bin\cl.exe @C:/DOCUME~1/gga/CONFIG~1/Temp\nmFF.tmp I'm wondering if VERBOSE=1 can be made to work properly. Those .tmp files contain all the compiler settings, but they are created and removed right away after a file is compiled or linked. At the very least, I'd like to know what file in the source code is responsible for creating the compile/link lines like the above, so I can add a printing of that tmp file first. -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] INCLUDE_DIRECTORIES and $(VCInstallDir)
Hi all, I'm trying to build a project that uses DirectX 9. To compile correctly, the include path order must be adjusted so that the Platform SDK is prefered over the DirectX include directories. This is done by setting the include directories to: $(VCInstallDir)PlatformSDK/include external/win32/dx_9/Include/ So I tried to do this in cmake: INCLUDE_DIRECTORIES( $(VCInstallDir)/PlatformSDK/include external/win32/dx_9/Include ) But as cmake thinks this is a relative path, this is extended to ${CMAKE_CURRENT_SOURCE_DIR}\$(VCInstallDir) (e.g. "C:\Project\$(VCInstallDir)"). Is there a way to prevent the string from being extended, although it is not an absolute path? Another solution would be to find the path to the VC installation directory at cmake-time and use that instead of "$(VCInstallDir)". But I could not find any cmake-variable that contains the path to the VC installation directory (CMakeCache.txt contains only "cl.exe", but without any path information). Thanks, Stefan ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Windows make VERBOSE=1?
Gonzalo Garramuño wrote: I'm using cmake2.5 HEAD. I'm trying to get a verbose build out of it on Windows using NMake Makefiles, with: make VERBOSE=1 but all I get with that are lines like: C:\ARCHIV~1\MICROS~1.NET\Vc7\bin\cl.exe @C:/DOCUME~1/gga/CONFIG~1/Temp\nmFF.tmp I'm wondering if VERBOSE=1 can be made to work properly. Those .tmp files contain all the compiler settings, but they are created and removed right away after a file is compiled or linked. At the very least, I'd like to know what file in the source code is responsible for creating the compile/link lines like the above, so I can add a printing of that tmp file first. See Modules/Windows.cmake, because of the temp file stuff the output of verbose is not that useful, you can disable the temp file stuff in that file. However, for projects with large link lines things may or may not actually link. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] win32 rc files - or any other files besides cpp/cxx
Mark Wyszomierski schrieb: Hi, I'm using cmake for a large project that has some win32 gui apps in it. In the main project folder I only include those sub projects if compiling for WIN32. That works fine. The win32 gui apps have a .rc file in a sub-folder named 'res'. How do you ask CMake to include those files in the resulting vc++ project? Just add them to your source files. Christian signature.asc Description: OpenPGP digital signature ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake 2.5 - MinGW fails with NMake Mafiles
MinGW CMake also says it supports NMake Makefiles (actually, tons of formats which sounds super cool). After compiling a MinGW CMake, I tried using it to compile cmake again with "NMake Makefiles" and it also worked. But trying a 'NMake Makefiles' build on my project resulted in > cmake ../../../.. -DCMAKE_SYSTEM=Windows-5.1 -DEXECUTABLE_OUTPUT_PATH=/z/code/Maya/mrLiquid/BUILD/Windows-5.1-32/Release/bin -DLIBRARY_OUTPUT_PATH=/z/code/Maya/mrLiquid/BUILD/Windows-5.1-32/Release/lib -DCMAKE_LIBRARY_PATH=/z/code/Maya/mrLiquid/BUILD/Windows-5.1-32/Release/lib -DCMAKE_NATIVE_ARCH=32 -DCMAKE_BUILD_ARCH=32 -DCMAKE_BUILD_TYPE=Release -G 'NMake Makefiles' -- The C compiler identification is MSVC -- The CXX compiler identification is MSVC System is unknown to cmake, create: Platform/ to use this system, please send your config file to [EMAIL PROTECTED] so it can be added to cmake -- Check for working C compiler: C:/Archivos de programa/Microsoft Visual Studio .NET 2003/Vc7/bin/cl.exe CMake Error: This should not have happen. If you see this message, you are probably using a broken CMakeLists.txt file or a problematic release of CMake CMake Error: Could not find cmake module file:Z:/code/Maya/mrLiquid/BUILD/Windows-5.1-32/Release/tmp/CMakeFiles/CMakeRCCompiler.cmake CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Check for working C compiler: C:/Archivos de programa/Microsoft Visual Studio .NET 2003/Vc7/bin/cl.exe -- broken CMake Error: The C compiler "C:/Archivos de programa/Microsoft Visual Studio .NET 2003/Vc7/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 The generated CMakeCache.txt is attached. -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy # This is the CMakeCache file. # For build in directory: z:/code/Maya/mrLiquid/BUILD/Windows-5.1-32/Release/tmp # It was generated by CMake: C:/Archivos de programa/CMake/bin/cmake.exe # You can edit this file to change values found and used by cmake. # If you do not want to change any of the values, simply exit the editor. # If you do want to change a value, simply edit, save, and exit the editor. # The syntax for the file is as follows: # KEY:TYPE=VALUE # KEY is the name of a variable in the cache. # TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!. # VALUE is the current value for the KEY. # EXTERNAL cache entries //For backwards compatibility, what version of CMake commands and // syntax should this version of CMake allow. CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.5 //No help, variable specified on the command line. CMAKE_BUILD_ARCH:UNINITIALIZED=32 //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. CMAKE_BUILD_TYPE:STRING=Release //Enable/Disable color output during build. CMAKE_COLOR_MAKEFILE:BOOL=ON //CXX compiler. CMAKE_CXX_COMPILER:FILEPATH=C:/Archivos de programa/Microsoft Visual Studio .NET 2003/Vc7/bin/cl.exe //C compiler. CMAKE_C_COMPILER:FILEPATH=C:/Archivos de programa/Microsoft Visual Studio .NET 2003/Vc7/bin/cl.exe //Flags for C compiler. CMAKE_C_FLAGS:STRING=' ' //Flags used by the compiler during debug builds. CMAKE_C_FLAGS_DEBUG:STRING= //Flags used by the compiler during release minsize builds. CMAKE_C_FLAGS_MINSIZEREL:STRING= //Flags used by the compiler during release builds (/MD /Ob1 /Oi // /Ot /Oy /Gs will produce slightly less optimized but smaller // files). CMAKE_C_FLAGS_RELEASE:STRING= //Flags used by the compiler during Release with Debug Info builds. CMAKE_C_FLAGS_RELWITHDEBINFO:STRING= //Flags used by the linker. CMAKE_EXE_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= //Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=C:/Archivos de programa/mrLiquid //No help, variable specified on the command line. CMAKE_LIBRARY_PATH:UNINITIALIZED=z:/code/Maya/mrLiquid/BUILD/Windows-5.1-32/Release/lib //Path to a program. CMAKE_LINKER:FILEPATH=C:/Archivos de programa/Microsoft Visual Studio .NET 2003/Vc7/bin/link.exe //Program used to build from makefiles. CMAKE_MAKE_PROGRAM:STRING=nmake //Flags used by the linker during the creation of modules. CMAKE_MODULE_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= /
[CMake] CMake2.5 - wrong default install location for mingw
Compiling CMake HEAD with mingw. After install, it defaulted to installing in $PROGRAMFILES/CMake, instead of /usr/local/ (ie. C:/msys/1.0/usr/local) incorrectly overwriting my MSVC version. -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMAKE 2.5 MinGW returns bad WIN32
I'm running FindOpenGL and FindGLUT on a mingw based compile, with MSYS Makefiles and CMAKE_CXX_COMPILER=g++. That is, a standard GNU build. FindOpenGL and FindGLUT fail to find the microsoft opengl32.lib and dll and the corresponding glut lib. The problem is that WIN32 returns false. It is unclear whether to me whether this is correct behavior. It seems like it shouldn't be being that CYGWIN returns true. -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] make file for win32 MDI application
Hi, When the application you're building the makefile for is an MDI application, how do you; 1) Set the sub system to be: Windows (/SUBSYSTEM:WINDOWS) in visual studio, this option is found under Project -> Linker -> System -> Sub System if not set, the MDI (or any other GUI interface app) will have an identity crisis and become a console application. 2) Some default libs seem to be added to the linker settings even though not specified in the make file: kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib linking to these libs in my MDI projects give produce a lot of linking errors. Is there any way to omit them? Thanks, Mark ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Patch for Eclipse generator
Quoting Pau Garcia i Quiles <[EMAIL PROTECTED]>: I forgot to say packages for Ubuntu Feisty and Gutsy for the latest CMake CVS with my patch already applied will be available in my PPA in a few hours: https://edge.launchpad.net/~pgquiles/+archive Hello, As I told yesterday, here comes a patch for the Eclipse CDT4 generator available in the current CVS version of CMake. Although I have not extensively tested it, the works fine. In addition to the in-tree build which has always worked, this patch allows you to have 'myapp' and 'myapp/build' or 'myapp' and 'myapp-build' at the same level: mydir/myapp mydir/myapp/build or mydir/myapp mydir/myapp-build The patch breaks the CMake way of doing thing, as it writes the Eclipse project files (.project and .cproject) in the source directory even in an out-of-tree build. Tomorrow I'll try to implement a new property, or look at the value of a variable, to make it possible to use the pure-CMake style (.project and .cproject in the generated-files directory) or the Eclipse-required style (.project and .cproject in the source directory). Please try it and send your comments to the list or to me. -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Patch for Eclipse generator
Hello, As I told yesterday, here comes a patch for the Eclipse CDT4 generator available in the current CVS version of CMake. Although I have not extensively tested it, the works fine. In addition to the in-tree build which has always worked, this patch allows you to have 'myapp' and 'myapp/build' or 'myapp' and 'myapp-build' at the same level: mydir/myapp mydir/myapp/build or mydir/myapp mydir/myapp-build The patch breaks the CMake way of doing thing, as it writes the Eclipse project files (.project and .cproject) in the source directory even in an out-of-tree build. Tomorrow I'll try to implement a new property, or look at the value of a variable, to make it possible to use the pure-CMake style (.project and .cproject in the generated-files directory) or the Eclipse-required style (.project and .cproject in the source directory). Please try it and send your comments to the list or to me. -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) --- CMake.orig/Source/cmExtraEclipseCDT4Generator.cxx 2007-10-17 17:17:45.0 +0200 +++ CMake/Source/cmExtraEclipseCDT4Generator.cxx 2007-10-19 00:36:12.0 +0200 @@ -9,6 +9,7 @@ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. Copyright (c) 2004 Alexander Neundorf [EMAIL PROTECTED], All rights reserved. Copyright (c) 2007 Miguel A. Figueroa-Villanueva. All rights reserved. + Copyright (c) 2007 Pau Garcia i Quiles, [EMAIL PROTECTED] All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even @@ -86,7 +87,7 @@ const std::string homeDirectory(mf->GetHomeDirectory()); const std::string homeOutputDirectory(mf->GetHomeOutputDirectory()); - const std::string filename = homeOutputDirectory + "/.project"; + const std::string filename = homeDirectory + "/.project"; cmGeneratedFileStream fout(filename.c_str()); if (!fout) @@ -94,10 +95,10 @@ return; } - fout << + fout << "\n" "\n" -"\t" << this->GetPathBasename(homeOutputDirectory) << "\n" +"\t" << this->GetPathBasename(homeDirectory) << "\n" "\t\n" "\t\n" "\t\n" @@ -109,7 +110,7 @@ ; // use clean target - fout << + fout << "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.cleanBuildTarget\n" "\t\t\t\t\tclean\n" @@ -130,7 +131,7 @@ // set the make command std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); - fout << + fout << "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.enabledIncrementalBuild\n" "\t\t\t\t\ttrue\n" @@ -275,25 +276,22 @@ // create linked resources if (homeDirectory != homeOutputDirectory) { + +std::map > projectMap = this->GlobalGenerator->GetProjectMap(); + fout << "\t\n"; // for each sub project create a linked resource to the source dir // - only if it is an out-of-source build -for (std::map >::const_iterator - it = this->GlobalGenerator->GetProjectMap().begin(); - it != this->GlobalGenerator->GetProjectMap().end(); - ++it) - { fout << "\t\t\n" -"\t\t\t" << it->first << "\n" +"\t\t\t" << this->GetPathBasename(homeOutputDirectory)<< "\n" "\t\t\t2\n" "\t\t\t" -<< this->GetEclipsePath( - it->second[0]->GetMakefile()->GetStartDirectory()) +<< +this->GetEclipsePath(projectMap[this->GetPathBasename(homeDirectory)][0]->GetMakefile()->GetStartOutputDirectory()) << "\n" "\t\t\n" ; - } // for EXECUTABLE_OUTPUT_PATH when not in binary dir std::string output_path = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH"); if (!cmSystemTools::IsSubDirectory(output_path.c_str(), @@ -349,12 +347,13 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const { std::set emmited; - + const cmMakefile* mf = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); const std::string homeOutputDirectory(mf->GetHomeOutputDirectory()); - const std::string filename = homeOutputDirectory + "/.cproject"; + const std::string homeDirectory(mf->GetHomeDirectory()); + const std::string filename = homeDirectory + "/.cproject"; cmGeneratedFileStream fout(filename.c_str()); if (!fout) @@ -363,7 +362,7 @@ } // add header - fout << + fout << "\n" "\n\n" "\n" @@ -373,7 +372,7 @@ fout << "\n"; // Configuration settings... - fout << + fout << "\n" "\n" ; - + // ??? - fout << + fout << "\n" "\n" "\n" @@ -456,10 +455,9 @@ // - make it type 'src' // - and exclude it from type 'out' std::string exclude_from_out; - for (std::map >::const_iterator -it = this->GlobalGenerator->GetProjectMap().begin(); - it != this->GlobalGenerator->GetProjectMap().end();
Re: [CMake] make file for win32 MDI application
Mark Wyszomierski wrote: Hi, When the application you're building the makefile for is an MDI application, how do you; 1) Set the sub system to be: Windows (/SUBSYSTEM:WINDOWS) ADD_EXECUTABLE( myexe WIN32 ) linking to these libs in my MDI projects give produce a lot of linking errors. Is there any way to omit them? In principle they shouldn't as that's the standard stuff used by windows itself when you create a gui project. If you do want to omit them, change the value of CMAKE_C_STANDARD_LIBRARIES_INIT (see Modules/Platform/Windows-cl.cmake ) -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Marking a library dependency from within a library.
Bill, Thanks for the clarification. This will simplify my build system a great deal! Justin On Thursday 18 October 2007 12:23:49 Bill Hoffman wrote: > The example is this: > add_library(libB) > add_library(libA) > target_link_libraries(libA libB) > add_executable(excC) > target_link_librareis(excC libA) > > This will result in this link: > excC -> libA and libB ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake