[CMake] problem with add_custom command

2009-03-24 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

[CMake] aggregate targets and adding a library as resource

2009-03-24 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

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

2009-03-24 Thread Nadir SOUALEM
Christian Ehrlicher wrote: 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

[CMake] Way to use precompilation directive on cmake and conditionnal linking

2009-03-24 Thread Nadir SOUALEM
I would like to use precompilation directive such NO_OPENGL Is there a way to use it with this command line ? cmake -DCMAKE_BUILD_TYPE=Debug or must i use something like: cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_OPENGL=0 with an if statement: if(NOT WITH_OPENGL) ADD_DEFINITIONS(-DNO_OPENGL) endif

Re: [CMake] RUN_TESTS project dependencies

2009-03-24 Thread Marcel Loose
On Mon, 2009-03-23 at 11:25 -0500, Robert Dailey wrote: On Fri, Mar 20, 2009 at 9:33 AM, Marcel Loose lo...@astron.nl wrote: Hi Robert, I am planning to use (but haven't implemented and tried yet): - add_custom_target(check COMMAND

Re: [CMake] Custom Build Type GCC on Linux

2009-03-24 Thread Nadir SOUALEM
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:

[CMake] Win2 NSIS Installer says CMake . Setup instead of Program Name

2009-03-24 Thread Shlomi Fish
Hi all, when trying to build the source in this directory: http://svn.berlios.de/svnroot/repos/fc-solve/trunk/fc-solve/source/ using CMake-2.6.3/CPack/NSIS and make package on Win32, the package is built successfully, but the installed says CMake . Setup as the title and Welcome to CMake .

[CMake] How to adjust LD_LIBRARY_PATH for an exectubale?

2009-03-24 Thread Denis Scherbakov
Dear CMake Community, I have an external executable which requires a library, which is not in LD_LIBRARY_PATH. If I manually set ENV{LD_LIBRARY_PATH} and then execute a command, it works. But the problem is that the executable is inside ADD_CUSTOM_COMMAND and even if I set environment

[CMake] Feature request: generic (config-like) selector on target_link_libraries

2009-03-24 Thread Alexandre Feblot
Hi, I'm facing an issue while trying to port my current build system to cmake, and it seems there is no way to solve it currently. At least, nobody in the mailing list found one. The only suggestion was to totally recode the dependency mechanism with macros instead of relying on the Cmake

Re: [CMake] Feature request: generic (config-like) selector on target_link_libraries

2009-03-24 Thread Denis Scherbakov
I think you don't need a new feature, you just have to use IF-ELSE mechanism and then TARGET_LINK_LIBRARIES(target ${RESULT_OF_IF_ELSE}) Denis * lib3 CMakeLists.txt: add_library(lib3 some source) target_link_libraries(lib3, SELECTOR A_OR_B A lib4-A SELECTOR A_OR_B B lib4-B

Re: [CMake] Feature request: generic (config-like) selector on target_link_libraries

2009-03-24 Thread Adolfo Rodríguez
Just curious, what would be the inconvenience of using an if statement around target_link_libraries to link against one or another target? On Tue, Mar 24, 2009 at 12:30 PM, Alexandre Feblot alexandre.feb...@thomsonreuters.com wrote: Hi, I'm facing an issue while trying to port my current

Re: [CMake] Feature request: generic (config-like) selector on target_link_libraries

2009-03-24 Thread Michael Wild
On 24. Mar, 2009, at 12:30, Alexandre Feblot wrote: Dependency graph example: - means depends on exe1-A - lib1 - lib3 - lib4-A - lib5 - lib7 exe1-B - lib1 - lib3 - lib4-B - lib6 - lib8 exe2-A - lib2 - lib3 - lib4-A - lib5 - lib7 exe2-B - lib2 - lib3 - lib4-B - lib6 - lib8 I'd like

Re: [CMake] Feature request: generic (config-like) selector on target_link_libraries

2009-03-24 Thread Alexandre Feblot
Specifying the lib4 dependency in the exe? But what about dependencies order in the link line? In my example, lib4-A or lib4-B must appear after lib3, if I want lib4 symbols required by lib3 to be added. In your solution, lib4 might as well be added by cmake just after lib1 and before lib3, which

Re: [CMake] CTest passing arguments to test executables?

2009-03-24 Thread David Cole
Try:--test-command testExe myarg1 my arg 2 (double quotes only necessary if there are spaces in the argument...) Multiple args after --test-command are used to construct the proper command line, not just the following arg... On Mon, Mar 23, 2009 at 11:51 PM, Alastair Rankine

Re: [CMake] compare_files and copy_if_different

2009-03-24 Thread David Cole
It should as long as both file names are files (as opposed to directories...) Both use SystemTools::FilesDiffer to determine the difference status. HTH, David On Mon, Mar 23, 2009 at 6:32 PM, James Bigler jamesbig...@gmail.com wrote: Could someone tell me if the logic behind compare_files

Re: [CMake] Feature request: generic (config-like) selector on target_link_libraries

2009-03-24 Thread Denis Scherbakov
Specifying the lib4 dependency in the exe? But what about dependencies order in the link line? In my example, lib4-A or lib4-B must appear after lib3, if I want lib4 symbols required by lib3 to be added. In your solution, lib4 might as well be added by cmake just after lib1 and before

Re: [CMake] Feature request: generic (config-like) selector on target_link_libraries

2009-03-24 Thread Denis Scherbakov
I am not sure, but I think you could also look into ADD_CUSTOM_COMMAND and it's PRE_LINK feature. You could run your own script before linking is done and replace lib4 target with what you want - lib4a version or lib4b. Denis ___ Powered by

[CMake] xcode generator

2009-03-24 Thread Doug Henry
Quick question about the cmake xcode project generator. I can run cmake and build my project just fine using cmake under Leopard from the terminal and from xcode, so there is no build problem. I was wondering if anyone has code completion working for their project? To be more specific, when

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

2009-03-24 Thread Adolfo Rodríguez
Thanks Bill, effectively part of a project was setting a -D flag based on the value of BUILD_TESTING. Refactored some code and everything is behaving as expected now :) Cheers 2009/3/23 Bill Hoffman bill.hoff...@kitware.com Adolfo Rodríguez wrote: I'm not setting any -D flags that depend on

Re: [CMake] xcode generator

2009-03-24 Thread Sean McBride
On 3/24/09 10:20 AM, Doug Henry said: Quick question about the cmake xcode project generator. I can run cmake and build my project just fine using cmake under Leopard from the terminal and from xcode, so there is no build problem. I was wondering if anyone has code completion working for their

Re: [CMake] xcode generator

2009-03-24 Thread David Cole
I do not know about Xcode, but Visual Studio code completion depends on the header files being added to the project files. Are the headers in question included in the project file? Do you have an example non-CMake generated Xcode project that demonstrates code completion working with boost

Re: [CMake] CTest passing arguments to test executables?

2009-03-24 Thread Bill Hoffman
Alastair Rankine wrote: 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. Just put --test-command last

Re: [CMake] Way to use precompilation directive on cmake and conditionnal linking

2009-03-24 Thread Nadir SOUALEM
Nadir SOUALEM wrote: I would like to use precompilation directive such NO_OPENGL Is there a way to use it with this command line ? cmake -DCMAKE_BUILD_TYPE=Debug or must i use something like: cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_OPENGL=0 with an if statement: if(NOT WITH_OPENGL)

Re: [CMake] xcode generator

2009-03-24 Thread Michael Jackson
I just generated an Xcode project for one of my own projects that uses boost and the OP is correct, code completion doesn't seem to work for boost. Odd. Fortunately I use Eclipse CDT for C++ instead of Xcode which seems to work reasonably well on OS X. At least I get boost code

[CMake] 2.6.4 RC 1

2009-03-24 Thread Bill Hoffman
Mostly to fix the issue with Visual Studio and header files that was introduced with CMake 2.6.3, I am working on 2.6.4. I have a release candidate that can be found here: http://www.cmake.org/files/v2.6 Specifically, the windows one with the visual studio fix is here:

Re: [CMake] Way to use precompilation directive on cmake and conditionnal linking

2009-03-24 Thread Tyler Roscoe
On Tue, Mar 24, 2009 at 09:18:01AM +0100, Nadir SOUALEM wrote: I would like to use precompilation directive such NO_OPENGL Is there a way to use it with this command line ? cmake -DCMAKE_BUILD_TYPE=Debug or must i use something like: cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_OPENGL=0 with an

[CMake] Custom command or custom target for jni?

2009-03-24 Thread Jonatan Bijl
I am setting up a jni project (Java Native Interface). A java class is supposed to call native methods, and the native methods are to be compiled into a dll/so. To compile the native part, a c header file is generated from the java class, using the javah -jni command. This header file should only

Re: [CMake] Way to use precompilation directive on cmake and conditionnal linking

2009-03-24 Thread Nadir SOUALEM
Tyler Roscoe wrote: On Tue, Mar 24, 2009 at 09:18:01AM +0100, Nadir SOUALEM wrote: I would like to use precompilation directive such NO_OPENGL Is there a way to use it with this command line ? cmake -DCMAKE_BUILD_TYPE=Debug or must i use something like: cmake -DCMAKE_BUILD_TYPE=Debug

Re: [CMake] Way to use precompilation directive on cmake and conditionnal linking

2009-03-24 Thread Tyler
On Tue, Mar 24, 2009 at 04:55:53PM +0100, Nadir SOUALEM wrote: Thank you Tyler , i use the same method for linking, but i thought there was a better way than: if (WITH_OPENGL) add_definitions (-DOPENGL) else (WITH_OPENGL) add_definitions (-DNO_OPENGL) endif (WITH_OPENGL) for

Re: [CMake] Way to use precompilation directive on cmake and conditionnal linking

2009-03-24 Thread Nadir SOUALEM
Tyler wrote: On Tue, Mar 24, 2009 at 04:55:53PM +0100, Nadir SOUALEM wrote: Thank you Tyler , i use the same method for linking, but i thought there was a better way than: if (WITH_OPENGL) add_definitions (-DOPENGL) else (WITH_OPENGL) add_definitions (-DNO_OPENGL) endif (WITH_OPENGL) for

Re: [CMake] Custom command or custom target for jni?

2009-03-24 Thread Tyler Roscoe
On Tue, Mar 24, 2009 at 04:37:31PM +0100, Jonatan Bijl wrote: To compile the native part, a c header file is generated from the java class, using the javah -jni command. This header file should only be generated if: It does not exist yet The java class changes My first attempt

Re: [CMake] Feature request: generic (config-like) selector on target_link_libraries

2009-03-24 Thread Alexandre Feblot
Specifying the lib4 dependency in the exe? But what about dependencies order in the link line? In my example, lib4-A or lib4-B must appear after lib3, if I want lib4 symbols required by lib3 to be added. In your solution, lib4 might as well be added by cmake just after lib1 and before

Re: [CMake] imported lib properties...

2009-03-24 Thread Asmodehn Shade
Hi, Brad, Yes I think the second call was using the correct target... sorry I cant be sure or provide a test example, it was quite some time ago... I've been a bit busy implementing some cmake script for automated dependencies detection and propagation in a chain of project depending on each

[CMake] Exporting imported target

2009-03-24 Thread Asmodehn Shade
Hi, I am assuming it is at the moment (cmake 2.6.2 ) not possible to export an imported target... When I do : # ${MyProject_EXPORT_CMAKE} contains the file path to a cmake script generated by export, # declaring ADD_LIBRARY(MyProject SHARED IMPORTED) ( among other stuff )

Re: [CMake] Exporting imported target

2009-03-24 Thread Andreas Pakulat
On 25.03.09 00:01:02, Asmodehn Shade wrote: Hi, I am assuming it is at the moment (cmake 2.6.2 ) not possible to export an imported target... No. What about having the imported target and its properties transitively exported again ? Has this been planned for the future or ruled out

[CMake] CMake, XCode, and Fortran support?

2009-03-24 Thread Bartlett, Roscoe A
Hello, Does anyone know if the XCode generator for CMake support Fortran as a compiler? We have a Trilinos developer that tried to use CMake to generate an XCode project but it does not know how to handle the Fortran files. Thanks, - Ross

Re: [CMake] CMake, XCode, and Fortran support?

2009-03-24 Thread Bill Hoffman
Bartlett, Roscoe A wrote: Hello, Does anyone know if the XCode generator for CMake support Fortran as a compiler? We have a Trilinos developer that tried to use CMake to generate an XCode project but it does not know how to handle the Fortran files. Xcode itself does not support

Re: [CMake] 2.6.4 RC 1

2009-03-24 Thread Robert Dailey
What exactly does this mean: - Enforce unique binary directories Does this mean instead of all executables going inside bin/debug, that they go inside of something like bin/project_name/debug (For the debug configuration, it would be likewise for release)?

Re: [CMake] 2.6.4 RC 1

2009-03-24 Thread Bill Hoffman
Robert Dailey wrote: What exactly does this mean: - Enforce unique binary directories Does this mean instead of all executables going inside bin/debug, that they go inside of something like bin/project_name/debug (For the debug configuration, it would be likewise for release)? No, it

Re: [CMake] Exporting imported target

2009-03-24 Thread Brad King
Andreas Pakulat wrote: The easiest way to achieve what you want (having targets of projectB+projectC available to projectA) is by having the FindProjectB.cmake file simply do a find_package(ProjectC REQUIRED) call and then make sure that FindProjectC.cmake (or the ConfigProjectC.cmake) load the

Re: [CMake] set_property on sources causing extra files to be rebuilt

2009-03-24 Thread Alexander Neundorf
On Friday 20 March 2009, Daniel Nelson wrote: It looks like the projects flags.make is updated every time any compile flag or definition changes, and every object file in the project depends on flags.make. In the case of properties set using set_property() the only part of the flags.make that

Re: [CMake] file(READ) issue?

2009-03-24 Thread Alexander Neundorf
On Sunday 22 March 2009, Steven Van Ingelgem wrote: Hi, I'm trying to read in a C-header file with file(READ): file(READ zconf.in.h ZCONF_H) !! But this variable contains no ; whatsoever? How can I ask to read it in completely? Can you please explain what problem you have ? It's not

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

2009-03-24 Thread Alexander Neundorf
On Monday 23 March 2009, Andreas Pakulat wrote: On 23.03.09 16:29:24, Bob Tanner wrote: On 2009-03-23 02:36:37 -0500, Andreas Pakulat ap...@gmx.de 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

Re: [CMake] problem with add_custom command

2009-03-24 Thread Alexander Neundorf
On Tuesday 24 March 2009, ankit jain wrote: 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

[CMake] CMAKE_CURRENT_LIST_FILE in CMake 2.6.3

2009-03-24 Thread KSpam
My build system relies heavily on CMAKE_CURRENT_LIST_FILE. For instance, I typically get a variable for the directory containing the current list file as follows: get_filename_component(scriptDir ${CMAKE_CURRENT_LIST_FILE} PATH) This has worked in prior versions of CMake; however, it does

Re: [CMake] How to adjust LD_LIBRARY_PATH for an exectubale?

2009-03-24 Thread Alexander Neundorf
On Tuesday 24 March 2009, Denis Scherbakov wrote: Dear CMake Community, I have an external executable which requires a library, which is not in LD_LIBRARY_PATH. If I manually set ENV{LD_LIBRARY_PATH} and then execute a command, it works. But the problem is that the executable is inside

Re: [CMake] CMAKE_CURRENT_LIST_FILE in CMake 2.6.3

2009-03-24 Thread Bill Hoffman
KSpam wrote: My build system relies heavily on CMAKE_CURRENT_LIST_FILE. For instance, I typically get a variable for the directory containing the current list file as follows: get_filename_component(scriptDir ${CMAKE_CURRENT_LIST_FILE} PATH) This has worked in prior versions of CMake;

Re: [CMake] How to adjust LD_LIBRARY_PATH for an exectubale?

2009-03-24 Thread Nicolas Desprès
On Tue, Mar 24, 2009 at 2:39 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Tuesday 24 March 2009, Denis Scherbakov wrote: Dear CMake Community, I have an external executable which requires a library, which is not in LD_LIBRARY_PATH. If I manually set ENV{LD_LIBRARY_PATH}  and then

Re: [CMake] set_property on sources causing extra files to be rebuilt

2009-03-24 Thread Alexander Neundorf
On Tuesday 24 March 2009, Alexander Neundorf wrote: On Friday 20 March 2009, Daniel Nelson wrote: It looks like the projects flags.make is updated every time any compile flag or definition changes, and every object file in the project depends on flags.make. In the case of properties set

Re: [CMake] set_property on sources causing extra files to be rebuilt

2009-03-24 Thread Daniel Nelson
On Tuesday 24 March 2009 3:16:27 pm Alexander Neundorf wrote: On Tuesday 24 March 2009, Alexander Neundorf wrote: On Friday 20 March 2009, Daniel Nelson wrote: It looks like the projects flags.make is updated every time any compile flag or definition changes, and every object file in the

Re: [CMake] set_property on sources causing extra files to be rebuilt

2009-03-24 Thread Clinton Stimpson
Daniel Nelson wrote: On Tuesday 24 March 2009 3:16:27 pm Alexander Neundorf wrote: On Tuesday 24 March 2009, Alexander Neundorf wrote: On Friday 20 March 2009, Daniel Nelson wrote: It looks like the projects flags.make is updated every time any compile flag or definition

Re: [CMake] set_property on sources causing extra fi les to be rebuilt

2009-03-24 Thread Daniel Nelson
On Tuesday 24 March 2009 4:46:29 pm Clinton Stimpson wrote: Daniel Nelson wrote: On Tuesday 24 March 2009 3:16:27 pm Alexander Neundorf wrote: On Tuesday 24 March 2009, Alexander Neundorf wrote: On Friday 20 March 2009, Daniel Nelson wrote: It looks like the projects flags.make is updated

[CMake] Windows drive letter capitalization consistency

2009-03-24 Thread James Bigler
I have noticed that CMake can be a little inconsistent with how drive letters are managed. Sometimes I get paths with C:\ sometimes with c:\. When I generate custom build time scripts using configure_file, often the files change with only this letter change? Even the CMakeCache.txt can change

Re: [CMake] set_property on sources causing extra files to be rebuilt

2009-03-24 Thread Bill Hoffman
Daniel Nelson wrote: So it sounds like the only way to fix this would be to write a separate flags.make file for every object file that has compile/define flags set? I opened this as issue 8787 in the bug tracker. We tried that, it was way to slow with all those files. Especially on

Re: [CMake] Exporting imported target

2009-03-24 Thread Asmodehn Shade
Ha, ok I see I was thinking of this the wrong way... Thanks a lot :-) -- Alex 2009/3/25 Brad King brad.k...@kitware.com Andreas Pakulat wrote: The easiest way to achieve what you want (having targets of projectB+projectC available to projectA) is by having the FindProjectB.cmake file

[CMake] cross compiling for QNX

2009-03-24 Thread ross hennessy
I'm having a problem creating a toolchain file for use with cmake 2.6.3. I'd like to generate a UnixMakefile compatible with the QNX Momentics cross platform development tools. The problem is cmake doesn't seem to find the archiver which is named ntox86-ar.exe (as QNX runs on multiple platforms

Re: [CMake] Way to use precompilation directive on cmake and conditionnal linking

2009-03-24 Thread Philip Lowman
On Tue, Mar 24, 2009 at 12:11 PM, Nadir SOUALEM nadir.soua...@irisa.frwrote: Tyler wrote: Not so bad, but it would be very nice to do some things such adding preprocessing on command line calls: cmake -DPREPROCCESSING_VAR You could certainly file a feature request that did something like

[CMake] ifort link with -static-intel

2009-03-24 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