[CMake] Fwd: --as-needed
-- Forwarded message -- From: Evgeny Ratnikov [EMAIL PROTECTED] Date: 03.02.2008 11:00 Subject: --as-needed To: cmake@cmake.org Hi When linking with option --as-needed the order of linkage is very important. At first there must be object files and then libraries. When linking with CMake's SET_TARGET_PROPERTIES/LINK_FLAGS I have libraries first and then object files. When using TARGET_LINK_LIBRARIES the order is reverse (and it is what I need). Here is the question. Is the linkage order a special feature of TARGET_LINK_LIBRARIES (There is nothing about it in documentation)? Are there any ways to specify linkage order? (Or may be are they in plans?) (I'm using CMake-2.4-patch 6) best regards, Evgeny Ratnikov -- best regards, Evgeny Ratnikov ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake and eclipse
I gave that plugin a try out and while it is nice to graphically see the structure of a CMake file there did not seem to be any actual project management or any other features that I could figure out. I work with CMake and Eclipse (On OS X and Linux 64) all day long. You have already heard from one individual on his project setup so I will throw mine in. http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial Basically I primarily use the terminal with cmake/ccmake to generate the makefiles for my system, then use Eclipse in Makefile Project mode to do the actual development of code and compilation. As long as you are using a compiler that Eclipse understands, Eclipse will parse the compiler output and display errors and warnings for you. I find this works very well for my needs. I do second the idea of using http://www.cthing.com/CMakeEd.asp for a nice CMake editor. Within eclipse there are ways to create External Tools that could possibly bootstrap the whole process if needed. When working with Eclipse I _strongly_ recommend you put your build directory inside the top level of your project. Eclipse seems to work better that way. In the latest CMake CVS there are eclipse project generators. You are welcome to give those a try to see if they gel with your project layout needs. My basic Project setup is: -Project -src // All source files -Resources // All extra files the project needs -Build // Run cmake from in here (cmake ../) This works for _me_ in my situation. My projects can be viewed here: http://titanium.imts.us/. Also, a small bit of advice for those new to CMake: Watch how you name files and folders that might be at the top level of your project. Sometimes it is tempting to do something like: -Project -src // All source files -Resources // All extra files the project needs -cmake // Cmake related files in here -Build // Run cmake from in here (cmake ../) Problem with that is at some point you _will_ accidentally run cmake from within the project directory. CMake creates _lots_ of its own files. All with Cmake somewhere in the name. If you also have a top level folder with CMake in the name it can be difficult to figure out which files/folders need to be trashed. This is why is use Resources and then put some of my special cmake files in that folder. Just FYI. Welcome to the cmake community. --- Mike Jackson On Feb 2, 2008, at 6:52 PM, Giualian Sander wrote: Hi gents, I'm new to cmake, and I've found a project called CMakeBuilder (www.cmakebuilder.com) across the internet. I'm a C++/Autohell developer from years (let's says decades !) And I found interesting the visual approach of this tool, especially for understanding CMake structure and syntax. Even if it's beta right now, I think it brings some easy to learn- capability to CMake Do anyone of you know about the upcoming features as described on eclipseplugincentral.com ? I'm currently in charge of a from scratch project, working with a lot of eclipse/C++ developers, and I'm not willing to maintain a AutoHell configuration on such a scale. Thought I'm conviced that CMake is the right choice for me, is such a plugin a good choice for me ? Thanks for your advices BRgds Giualian Sander ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] [Help] Build Qt Plugin with CMake
Hi All, when I try to build a plugin with my qt application on windows, I found that the dll build successfully, but when I launch my application it failed with a message that myplugin.dll is not a valid Qt plugin. The following file is my CMakeLists.txt. Is there anything wrong? ** project(myplugin) set(myplugin_SRCS myplugin.cpp ) set(myplugin_MOC_HDRS myplugin.h ) include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../core) add_definitions(${QT_DEFINITIONS}) add_definitions(-DQT_PLUGIN) add_definitions(-DQT_SHARED) add_definitions(-DQT_NO_DEBUG) qt4_wrap_cpp(myplugin_MOC_SRCS ${myplugin_MOC_HDRS}) add_library(myplugin SHARED ${myplugin_SRCS} ${myplugin_MOC_SRCS}) target_link_libraries(myplugin ${QT_LIBRARIES} ${QT_QTXML_LIBRARY} mycore) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Visual Studio generator and cross-compilation
Hi all, Does cmake (2.5 pre) support generation of build files for Visual Studio (2008 if that matters) projects for cross-compiling to a different OS/CPU (needs: eCos/ARM). It seems that when such a generator is selected, CMake simply ignores the force compiler directives and select CL as the compiler, whereas the CMake file project does specify an alternate compiler (arm-elf-gcc in my example). Is there any method to tell CMake to generate the IDE files for use with Visual Studio, but to create regular makefiles such as with the Unix Makefiles target, so that Visual Studio can launch a cross- compilation session ? Thanks, Emmanuel. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake and eclipse
Hi Mike, Thanks a lot for your advices, I perfectly understand your point of view but in my case I'm willing to bring some capabilities to a population of developers (not necessarily hackers), that can enables us to abstract from the lowest layers of computing (usually autohell-handled). Your contribution, unfortunately, do'nt help me... Using CMake the way your example suggest, seems to me irrelevant for a 3 lines Makefile just do the trick. I need CMake for much more complex purposes... BRgds 2008/2/3, Mike Jackson [EMAIL PROTECTED]: I gave that plugin a try out and while it is nice to graphically see the structure of a CMake file there did not seem to be any actual project management or any other features that I could figure out. I work with CMake and Eclipse (On OS X and Linux 64) all day long. You have already heard from one individual on his project setup so I will throw mine in. http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial Basically I primarily use the terminal with cmake/ccmake to generate the makefiles for my system, then use Eclipse in Makefile Project mode to do the actual development of code and compilation. As long as you are using a compiler that Eclipse understands, Eclipse will parse the compiler output and display errors and warnings for you. I find this works very well for my needs. I do second the idea of using http://www.cthing.com/CMakeEd.asp for a nice CMake editor. Within eclipse there are ways to create External Tools that could possibly bootstrap the whole process if needed. When working with Eclipse I _strongly_ recommend you put your build directory inside the top level of your project. Eclipse seems to work better that way. In the latest CMake CVS there are eclipse project generators. You are welcome to give those a try to see if they gel with your project layout needs. My basic Project setup is: -Project -src // All source files -Resources // All extra files the project needs -Build // Run cmake from in here (cmake ../) This works for _me_ in my situation. My projects can be viewed here: http://titanium.imts.us/. Also, a small bit of advice for those new to CMake: Watch how you name files and folders that might be at the top level of your project. Sometimes it is tempting to do something like: -Project -src // All source files -Resources // All extra files the project needs -cmake // Cmake related files in here -Build // Run cmake from in here (cmake ../) Problem with that is at some point you _will_ accidentally run cmake from within the project directory. CMake creates _lots_ of its own files. All with Cmake somewhere in the name. If you also have a top level folder with CMake in the name it can be difficult to figure out which files/folders need to be trashed. This is why is use Resources and then put some of my special cmake files in that folder. Just FYI. Welcome to the cmake community. --- Mike Jackson On Feb 2, 2008, at 6:52 PM, Giualian Sander wrote: Hi gents, I'm new to cmake, and I've found a project called CMakeBuilder ( www.cmakebuilder.com) across the internet. I'm a C++/Autohell developer from years (let's says decades !) And I found interesting the visual approach of this tool, especially for understanding CMake structure and syntax. Even if it's beta right now, I think it brings some easy to learn-capability to CMake Do anyone of you know about the upcoming features as described on eclipseplugincentral.com ? I'm currently in charge of a from scratch project, working with a lot of eclipse/C++ developers, and I'm not willing to maintain a AutoHell configuration on such a scale. Thought I'm conviced that CMake is the right choice for me, is such a plugin a good choice for me ? Thanks for your advices BRgds Giualian Sander ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Running shell scripts...
I wrote a bash shell script to get the SVN global revision information (e-mail me privately if you want a copy) to put into a header file under POSIX systems. The script is located at ${CMAKE_ROOT}; however, I am having difficulty getting it to appear in the Makefile. Below is the syntax from top-most CMakeLists.txt: IF (WIN32) # Execute Win32 Specific commands - none yet. ELSE (WIN32) # Execute commands for other platforms ADD_CUSTOM_COMMAND( OUTPUT SVN_REVISION COMMAND ${CMAKE_ROOT}/getSVNversion.sh WORKING_DIRECTORY ${CMAKE_ROOT} COMMENT Creates/updates header SVN Revision Header ) ENDIF (WIN32) I'd prefer to run it as a pre-build step, but I do not have any targets specified at the top-most level - which primarily specifies sub-directories for the tools being built. The script (getSVNversion.h) does work if I run it from the command-line. What am I doing wrong above? When I run cmake it doesn't complain about the line, yet I don't have a target in the top-most Makefile for it either... or am I mis-understanding something? TIA, Ben ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake and eclipse
So here are the problems you are going to run into with Eclipse and CMake. There is no proper integration between CMake and Eclipse. There is no plugin that can manage the CMake file and the C++ project together. In other words, Eclipse has 2 types of Projects: Managed C+ + and Makefile. If you let Eclipse manage your project it will produce makefiles. This is NOT what you want. If you tell Eclipse you want a Makefile project, then _you_ have to generate the makefile for Eclipse. You can also tell Eclipse which makefile to use when Eclipse runs make to build the project. This is done as a custom build command. I usually use make -C ${project_loc}/Build for mine. If you have true out of source builds your build command might be make -C ${project_loc}/.../ProjectBuild. Eclipse CDT indexing can be tricky to get right. Make sure you understand how Eclipse defines its Paths and Symbols entries. Also, if you could elaborate on your Complex purposes the cmake community will be eager to help you solve those issues and come up the cmake learning curve quickly as possible. If you are cross-compiling there are some entries on the wiki about that. Respectfully Mike Jackson On Feb 3, 2008, at 5:38 PM, Giualian Sander wrote: Hi Mike, Thanks a lot for your advices, I perfectly understand your point of view but in my case I'm willing to bring some capabilities to a population of developers (not necessarily hackers), that can enables us to abstract from the lowest layers of computing (usually autohell-handled). Your contribution, unfortunately, do'nt help me... Using CMake the way your example suggest, seems to me irrelevant for a 3 lines Makefile just do the trick. I need CMake for much more complex purposes... BRgds 2008/2/3, Mike Jackson [EMAIL PROTECTED]: I gave that plugin a try out and while it is nice to graphically see the structure of a CMake file there did not seem to be any actual project management or any other features that I could figure out. I work with CMake and Eclipse (On OS X and Linux 64) all day long. You have already heard from one individual on his project setup so I will throw mine in. http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial Basically I primarily use the terminal with cmake/ccmake to generate the makefiles for my system, then use Eclipse in Makefile Project mode to do the actual development of code and compilation. As long as you are using a compiler that Eclipse understands, Eclipse will parse the compiler output and display errors and warnings for you. I find this works very well for my needs. I do second the idea of using http://www.cthing.com/CMakeEd.asp for a nice CMake editor. Within eclipse there are ways to create External Tools that could possibly bootstrap the whole process if needed. When working with Eclipse I _strongly_ recommend you put your build directory inside the top level of your project. Eclipse seems to work better that way. In the latest CMake CVS there are eclipse project generators. You are welcome to give those a try to see if they gel with your project layout needs. My basic Project setup is: -Project -src // All source files -Resources // All extra files the project needs -Build // Run cmake from in here (cmake ../) This works for _me_ in my situation. My projects can be viewed here: http://titanium.imts.us/. Also, a small bit of advice for those new to CMake: Watch how you name files and folders that might be at the top level of your project. Sometimes it is tempting to do something like: -Project -src // All source files -Resources // All extra files the project needs -cmake // Cmake related files in here -Build // Run cmake from in here (cmake ../) Problem with that is at some point you _will_ accidentally run cmake from within the project directory. CMake creates _lots_ of its own files. All with Cmake somewhere in the name. If you also have a top level folder with CMake in the name it can be difficult to figure out which files/folders need to be trashed. This is why is use Resources and then put some of my special cmake files in that folder. Just FYI. Welcome to the cmake community. --- Mike Jackson On Feb 2, 2008, at 6:52 PM, Giualian Sander wrote: Hi gents, I'm new to cmake, and I've found a project called CMakeBuilder (www.cmakebuilder.com) across the internet. I'm a C++/Autohell developer from years (let's says decades !) And I found interesting the visual approach of this tool, especially for understanding CMake structure and syntax. Even if it's beta right now, I think it brings some easy to learn-capability to CMake Do anyone of you know about the upcoming features as described on eclipseplugincentral.com ? I'm currently in charge of a from scratch project, working with a lot of eclipse/C++ developers, and I'm not willing to maintain a AutoHell configuration on such a
Re: [CMake] Running shell scripts...
On Feb 3, 2008 7:16 PM, Benjamen R. Meyer [EMAIL PROTECTED] wrote: I wrote a bash shell script to get the SVN global revision information (e-mail me privately if you want a copy) to put into a header file under POSIX systems. The script is located at ${CMAKE_ROOT}; however, I am having difficulty getting it to appear in the Makefile. Below is the syntax from top-most CMakeLists.txt: IF (WIN32) # Execute Win32 Specific commands - none yet. ELSE (WIN32) # Execute commands for other platforms ADD_CUSTOM_COMMAND( OUTPUT SVN_REVISION COMMAND ${CMAKE_ROOT}/getSVNversion.sh WORKING_DIRECTORY ${CMAKE_ROOT} COMMENT Creates/updates header SVN Revision Header ) ENDIF (WIN32) OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SVN_REVISION Otherwise an out of source build fails. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] ADD_LIBRARY Issue
Hi I have a project in which I am creating a static library using cmake. The source files to be used for the library are spread over two subfolders. I have a main folder say TLV and within TLV I have two subfolders EXT and STD. The C source files are present in both STD and EXT. Now in CMakeLists.txt file present in TLV folder, the following ADD_LIBRARY command is given: ADD_LIBRARY(vtlv EXT\\ext1.c EXT\\ext2.c STD\\std1.c STD\\std2.c) But this gives an error saying invalid escape sequence \v. Can someone please tell me how we can create this library using source files in two different subfolders? Thanks and Regards Anupam Malhotra The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake