[CMake] aggregate targets and adding a library as resource

2009-03-23 Thread Mattias Holm
Hi, I am trying to use CMake to install resources with the set_source_files_properties and then specifying the MACOSX_PACKAGE_LOCATION. This works fine for files like PNGs and so on, but how do I do this for a dynamic library built with CMake. Simply put, I am trying to do something like:

[CMake] problem with add_custom command

2009-03-23 Thread ankit jain
hi all, Iam doing the following through my cmakelist.txt add_custom_target(mytarget) add_custom_command(TARGET mytarget POST_BUILD COMMAND ${CMAKE_COMMAND} -E tar xvf ${CMAKE_CURRENT_SOURCE_DIR}/t1.tar) this cmakelist is written in subfolder of a mainfolder.. But the problem is that files are no

Re: [CMake] How to link jar files to a library through cmake

2009-03-23 Thread ankit jain
2009/3/20 Robert Haines > I am creating a library through add_library command of java files. >> Now i want to link it with some jar files which contain some classes which >> is needed to build that library. >> >> target_link_libraries is not working in this case. >> > > As far as I can tell you

[CMake] CTest passing arguments to test executables?

2009-03-23 Thread Alastair Rankine
Hi, I must be blind but I can't see a way for CTest to pass a command line argument to a test executable? I've tried using --test-command "testExe myargs" ... but this causes it to not find the executable. Any help appreciated, thanks. ___ Powered b

[CMake] ifort link with -static-intel

2009-03-23 Thread Benne, Kyle
Hello All, I have been experimenting with CMake to compile a large Fortran project with the Intel Fortran compiler ifort. I am having trouble getting the executable to link with the static intel libraries, because CMake is adding the linker flag "i_dynamic" and it is overriding my --static-int

Re: [CMake] CPack rpm (from cmake 2.6.3) and rpm 4.6.0

2009-03-23 Thread Eric Noulard
2009/3/23 Dmitry Gerasimov : > Hi. > > CPack rpm seem to work not correctly on systems with rpm version >=4.6.0 > (like Fedora 10). > Due to rpm changes in 4.6.0 release (http://www.rpm.org/wiki/Releases/4.6.0) > " > %{_topdir} defaults to $(HOME)/rpmbuild/ now, instead of former > usr/src/redhat/.

[CMake] compare_files and copy_if_different

2009-03-23 Thread James Bigler
Could someone tell me if the logic behind compare_files and copy_if_different are the same when using cmake -E? I want to test if the copy_if_different will actually make the copy when issued. Thanks, James ___ Powered by www.kitware.com Visit other Ki

Re: [CMake] Patches with "your name" all over them?

2009-03-23 Thread John Drescher
>> CMake should handle this for you if you use the QT4_WRAP_CPP macro. > > > Project is QT3 and it does not look to be moving to QT4 anytime soon. > Sorry, I can't help with that then. I have only used Qt4 with CMake. John ___ Powered by www.kitware.com

Re: [CMake] Patches with "your name" all over them?

2009-03-23 Thread John Drescher
> Have another question. doing out-of-source build and I have src files that > include QT .moc files, but cannot find them. > > Normally this files .moc files get generated in the src directory, but > out-of-source build put the .moc files into the build/src directory. > > What is the typical strat

Re: [CMake] Patches with "your name" all over them?

2009-03-23 Thread Andreas Pakulat
On 23.03.09 16:29:24, Bob Tanner wrote: > On 2009-03-23 02:36:37 -0500, Andreas Pakulat said: > >>> Looking into cmake files, I do see my name all over :-) >> >> Seems like you did an in-source build. CMake suggests to use out-of-source >> builds at all times so your source directory stays clean.

Re: [CMake] Patches with "your name" all over them?

2009-03-23 Thread Bob Tanner
On 2009-03-23 02:36:37 -0500, Andreas Pakulat said: Looking into cmake files, I do see my name all over :-) Seems like you did an in-source build. CMake suggests to use out-of-source builds at all times so your source directory stays clean. Excellent. Thank you! "My name" is gone. Have an

Re: [CMake] Custom Build Type GCC on Linux

2009-03-23 Thread Clemens Arth
Clemens Arth wrote: Hi, I got a rather simple question. To add some special optimization flags to a custom build for one of our projects, I followed the guide to add a custom build type to my project using the example found here: http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_extend_the_build

Re: [CMake] Change executable target's name on install

2009-03-23 Thread James Bigler
I've created a feature request bug for this: http://www.cmake.org/Bug/view.php?id=8780 James On Sat, Mar 21, 2009 at 6:32 AM, Dieter Rosch wrote: > Bump this - I have the same problem, and exe A must be installed as A and B. > I currently compile it twice, but its ugly, and the exe's don't have

[CMake] Custom Build Type GCC on Linux

2009-03-23 Thread Clemens Arth
Hi, I got a rather simple question. To add some special optimization flags to a custom build for one of our projects, I followed the guide to add a custom build type to my project using the example found here: http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_extend_the_build_modes_with_a_custom_

[CMake] Overriding CFLAGS/CXXFLAGS

2009-03-23 Thread Paolo Zani
I'm trying to set the CFLAGS/CXXFLAGS for a project to values that depend on the compiler (and relative version) in use and the system CPU, detected through the kwsys facilities, like this: cmake_minimum_required (VERSION 2.6) project(Dummy) SET(KWSYS_NAMESPACE sys_info) SET(KWSYS_USE_Fundament

Re: [CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Denis Scherbakov
Steve, To be platform independent use FIND_LIBRARY and its HINTS option. You may want to check CMake/Modules/Find*.cmake files. There are great examples how to be fully platform independent. If BUILD_SHARED_LIBS, then ALL libraries in your project will be built shared. I use for this one separat

[CMake] cmake sun studio generator

2009-03-23 Thread Alin M Elena
Hi, Is there any plan for a cmake generator for sun studio? Is quite decent and did I mention that they give it for free nowadays? regards, Alin -- __ "If the Universities will not study useless subjects, who will?"

Re: [CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Stephen Collyer
2009/3/23 Andreas Pakulat > On 23.03.09 16:53:15, Stephen Collyer wrote: > > 2009/3/23 Stephen Collyer > > > However, I'm not entirely happy as: > > > > a) I've hardcoded the relative path ../plugins/sqldrivers in the > > SQL_LIB_DIRS > > Thats ok, anybody who doesn't have this simply has a brok

Re: [CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Andreas Pakulat
On 23.03.09 16:53:15, Stephen Collyer wrote: > 2009/3/23 Stephen Collyer > > > I'm trying to build a fully static exe on Opensuse 11.1 against a static > > build of Qt 4.5, and > > I'm trying to link against a static QMySQL plugin. > > > > I'm getting a link error when I do so, and I suspect it's

Re: [CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Stephen Collyer
2009/3/23 Stephen Collyer > I'm trying to build a fully static exe on Opensuse 11.1 against a static > build of Qt 4.5, and > I'm trying to link against a static QMySQL plugin. > > I'm getting a link error when I do so, and I suspect it's because I'm not > telling LINK_LIBRARIES how to link again

Re: [CMake] CTest: Toggling BUILD_TESTING triggers a project recompile

2009-03-23 Thread Bill Hoffman
Adolfo Rodríguez wrote: I'm not setting any -D flags that depend on BUILD_TESTING. I only use the variable to guard entering the subdirectories where tests are generated: if(BUILD_TESTING) add_subdirectory(test) endif(BUILD_TESTING) I am working in a project that adds a test subfolder to eac

Re: [CMake] RUN_TESTS project & dependencies

2009-03-23 Thread Robert Dailey
On Fri, Mar 20, 2009 at 9:33 AM, Marcel Loose wrote: > Hi Robert, > > I am planning to use (but haven't implemented and tried yet): > > - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) > to define a custom 'check' target (as with GNU Autotools) > > - add_executable( EXCLUDE_FROM_ALL ...

Re: [CMake] CTest: Toggling BUILD_TESTING triggers a project recompile

2009-03-23 Thread Adolfo Rodríguez
I'm not setting any -D flags that depend on BUILD_TESTING. I only use the variable to guard entering the subdirectories where tests are generated: if(BUILD_TESTING) add_subdirectory(test) endif(BUILD_TESTING) I am working in a project that adds a test subfolder to each folder where a target is

Re: [CMake] cdash docs - broken links

2009-03-23 Thread David Cole
The appear to work now. Do you still have problems seeing them? On Mon, Mar 23, 2009 at 2:20 AM, Darren Weber wrote: > > All document links are broken here: > http://www.cdash.org/cdash/project/publications.html > > Take care, Darren > > > ___ > Powered

Re: [CMake] CTest: Toggling BUILD_TESTING triggers a project recompile

2009-03-23 Thread Bill Hoffman
Adolfo Rodríguez wrote: Hi, I have a project that uses CTest. I'm using the auto-generated BUILD_TESTING variable to enable/disable the test-related parts of my build tree. What strikes me as unusual is that when I build my project with BUILD_TESTING set to ON (hence all test executables are

[CMake] CTest: Toggling BUILD_TESTING triggers a project recompile

2009-03-23 Thread Adolfo Rodríguez
Hi, I have a project that uses CTest. I'm using the auto-generated BUILD_TESTING variable to enable/disable the test-related parts of my build tree. What strikes me as unusual is that when I build my project with BUILD_TESTING set to ON (hence all test executables are built), and then toggle BUIL

Re: [CMake] [Cmake] How to delete cache files? Debug, Release Configuration

2009-03-23 Thread Christian Ehrlicher
> Von: Nadir SOUALEM > In my CMakeLists.txt, i use such things like: > > FIND_LIBRARY(LIB_UMFPACK LIB_UMFPACK > /opt/UMFPACK5.0.3/build/linux_eclipse/LIB_UMFPACK/${CMAKE_BUILD_TYPE}) > > So when i run: > cmake -DCMAKE_BUILD_TYPE=Debug > > in my CMakeCache.txt, i find > > //Path to a library. >

[CMake] CPack rpm (from cmake 2.6.3) and rpm 4.6.0

2009-03-23 Thread Dmitry Gerasimov
Hi. CPack rpm seem to work not correctly on systems with rpm version >=4.6.0 (like Fedora 10). Due to rpm changes in 4.6.0 release (http://www.rpm.org/wiki/Releases/4.6.0) " %{_topdir} defaults to $(HOME)/rpmbuild/ now, instead of former usr/src/redhat/. Rpm enforces BuildRoot for all packag

Re: [CMake] WinCE Support

2009-03-23 Thread Bill Hoffman
Andreas Pokorny wrote: Hello, 2009/3/23 Bill Hoffman : [..] Basically, something that runs the new code. Compile a WinCE project, and somehow verify that it compiled it correctly. So we need a couple of source files that pull in at least some basic API headers.. and a script file to run cmak

Re: [CMake] WinCE Support

2009-03-23 Thread Andreas Pokorny
Hello, 2009/3/23 Bill Hoffman : [..] > > Basically, something that runs the new code.  Compile a WinCE project, and > somehow verify that it compiled it correctly. So we need a couple of source files that pull in at least some basic API headers.. and a script file to run cmake and trigger the bui

Re: [CMake] WinCE Support

2009-03-23 Thread Bill Hoffman
Clemens Arth wrote: Bill Hoffman wrote: Andreas Pokorny wrote: Hi, Any news from the WinCE Support front? There are four patch tickets in mantis: http://cmake.org/Bug/view.php?id=7919 http://cmake.org/Bug/view.php?id=8486 http://cmake.org/Bug/view.php?id=8102 http://cmake.org/Bug/view.php?id=

[CMake] [Cmake] How to delete cache files? Debug, Release Configuration

2009-03-23 Thread Nadir SOUALEM
In my CMakeLists.txt, i use such things like: FIND_LIBRARY(LIB_UMFPACK LIB_UMFPACK /opt/UMFPACK5.0.3/build/linux_eclipse/LIB_UMFPACK/${CMAKE_BUILD_TYPE}) So when i run: cmake -DCMAKE_BUILD_TYPE=Debug in my CMakeCache.txt, i find //Path to a library. LIB_UMFPACK:FILEPATH=/opt/UMFPACK5.0.3/bui

Re: [CMake] How to generate preprocessed file?

2009-03-23 Thread Marcel Loose
Thanks, I didn't know it was that simple. The thing is that I ran 'make help' in the top-level build directory and it didn't show any .i target. However, after I descended into the build directory of the actual source I *did* get to see these .i targets. Wonderful! Best regards, Marcel Loose. O

Re: [CMake] How to generate preprocessed file?

2009-03-23 Thread Marcel Loose
Hi Denis, I think you misunderstood what I mean with preprocessed file. I mean by a preprocessed file a file that is generated by running the C/C++ pre-processor. Here are the values of CMAKE_C_CREATE_PREPROCESSED_SOURCE and CMAKE_CXX_CREATE_PREPROCESSED_SOURCE that I get when running CMake: CMAK

Re: [CMake] WinCE Support

2009-03-23 Thread Clemens Arth
Bill Hoffman wrote: Andreas Pokorny wrote: Hi, Any news from the WinCE Support front? There are four patch tickets in mantis: http://cmake.org/Bug/view.php?id=7919 http://cmake.org/Bug/view.php?id=8486 http://cmake.org/Bug/view.php?id=8102 http://cmake.org/Bug/view.php?id=7434 Are there any

Re: [CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Denis Scherbakov
Steve, Linking statically is always more work. Shared object dependencies are resolved automatically. Static dependencies - not. To link against shared OpenSSL I need only to specify -lopenssl. To link statically I need -lopenssl and -lcrypto, because libopenssl.a depends on libcrypto.a and t

Re: [CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Stephen Collyer
2009/3/23 Andreas Pakulat > > Are you sure yout Qt4.5 has the mysql plugin built in? There's only two > cases for the plugins (AFAIK): > > a) real plugins as shared objects in the plugins dir > b) built directly into the static Qt libs > > So obviously in case a) you don't need to link against th

Re: [CMake] How to generate preprocessed file?

2009-03-23 Thread Bill Hoffman
Marcel Loose wrote: Hi all, I was trying to figure out how to generate a preprocessed file. By browsing the CMake modules and by printing all CMake variables I discovered CMAKE__CREATE_PREPROCESSED_SOURCE variables. That suggests that there is support for generating preprocessed files. Howeve

Re: [CMake] WinCE Support

2009-03-23 Thread Bill Hoffman
Andreas Pokorny wrote: Hi, Any news from the WinCE Support front? There are four patch tickets in mantis: http://cmake.org/Bug/view.php?id=7919 http://cmake.org/Bug/view.php?id=8486 http://cmake.org/Bug/view.php?id=8102 http://cmake.org/Bug/view.php?id=7434 Are there any tests included in th

Re: [CMake] How to generate preprocessed file?

2009-03-23 Thread Denis Scherbakov
Marcel, I am not sure what you need. If you want to convert config.h.in into config.h, then see CONFIGURE_FILE and #cmakedefine. For other files you may want to check ADD_CUSTOM_COMMAND and SET_SOURCE_FILES_PROPERTIES(${FILE} PROPERTIES GENERATED TRUE) Denis > I was trying to figure out how

[CMake] How to generate preprocessed file?

2009-03-23 Thread Marcel Loose
Hi all, I was trying to figure out how to generate a preprocessed file. By browsing the CMake modules and by printing all CMake variables I discovered CMAKE__CREATE_PREPROCESSED_SOURCE variables. That suggests that there is support for generating preprocessed files. However, there's no mention o

Re: [CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Denis Scherbakov
Hi! You need to also link against libqsqlmysql.so library. It must appear after qt libraries (and any other libraries that use qsqlmysql interfaces). Denis > I'm trying to build a fully static exe on Opensuse 11.1 > against a static > build of Qt 4.5, and > I'm trying to link against a static

Re: [CMake] How to declare global variables

2009-03-23 Thread Denis Scherbakov
I also have a very big project with sub-projects lying in different tree leafs. And when I started to learn CMake I also had a question, how to define variables that can be seen on other project in other tree leaf. What I also learned from a newsgroup is that most of the time, when you need va

Re: [CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Andreas Pakulat
On 23.03.09 08:16:35, Stephen Collyer wrote: > I'm trying to build a fully static exe on Opensuse 11.1 against a static > build of Qt 4.5, and > I'm trying to link against a static QMySQL plugin. > > I'm getting a link error when I do so, and I suspect it's because I'm not > telling LINK_LIBRARIES

[CMake] WinCE Support

2009-03-23 Thread Andreas Pokorny
Hi, Any news from the WinCE Support front? There are four patch tickets in mantis: http://cmake.org/Bug/view.php?id=7919 http://cmake.org/Bug/view.php?id=8486 http://cmake.org/Bug/view.php?id=8102 http://cmake.org/Bug/view.php?id=7434 kind regards Andreas Pokorny

Re: [CMake] How to declare global variables

2009-03-23 Thread Marcel Loose
Hi Robert, I ran into this issue a short while ago. You might consider using a global property. I think that's the only option if you need a global 'variable'. Regards, Marcel Loose. On Sat, 2009-03-21 at 18:32 -0500, Robert Dailey wrote: > Currently I'm having a bit of trouble making variables

[CMake] Link error when building static exe against static Qt 4.5 plugin

2009-03-23 Thread Stephen Collyer
I'm trying to build a fully static exe on Opensuse 11.1 against a static build of Qt 4.5, and I'm trying to link against a static QMySQL plugin. I'm getting a link error when I do so, and I suspect it's because I'm not telling LINK_LIBRARIES how to link against the static plugin. /usr/bin/c++ -

Re: [CMake] Patches with "your name" all over them?

2009-03-23 Thread Andreas Pakulat
On 22.03.09 16:15:22, Bob Tanner wrote: > I'm attempting to get cmake build system into "upstream" which currently > uses the autotools. > > The upstream developers do not like "my name" all over the patch. > > Looking into cmake files, I do see my name all over :-) Seems like you did an in-sourc