Re: [CMake] Output of ADD_CUSTOM_COMMAND generated multiple times

2008-10-08 Thread Brad King
Martin Apel wrote: Alan W. Irwin wrote: On 2008-10-07 16:09-0400 Brad King wrote: Now targets b and c and build in parallel, but neither will build until 'a' is generated. Thanks, Brad, for your further explanation and example. My method (which I started to use as a result

Re: [CMake] MSVC71 problems when upgrading to CMake 2.6.2

2008-10-09 Thread Brad King
Luke Kucalaba wrote: the strategy we have used to set the compiler definitions for each build configuration CMake 2.6 provides an explicit feature for this: http://www.cmake.org/Wiki/CMake_2.6_Notes#Preprocessor_Definitions

Re: [CMake] MSVC71 problems when upgrading to CMake 2.6.2

2008-10-09 Thread Brad King
Luke Kucalaba wrote: First problem is that you will still have build configurations in your MSVC project regardless. There is no way that I know of to disable generation of build configurations in MSVC. This is just the way the VS IDE works. A basic CMake design principle is to follow the

Re: [CMake] Command line too long under Windows

2008-10-15 Thread Brad King
Brad King wrote: CMake once just listed the object files on the command line in the makefile, but users hit command line length limits with several hundred object files. We solved the problem by listing the objects in a response file. Now it looks like you've hit another limit of the MSVC

Re: [CMake] Command line too long under Windows

2008-10-15 Thread Brad King
Martin Apel wrote: I am currently in the process of trying to convert the build system of our software to CMake. Unfortunately there is one static library consisting of lots of objects (about 5700), which has lots of cyclic references, so I cannot easily split it up. I can generate this

Re: [CMake] Command line too long under Windows

2008-10-16 Thread Brad King
Martin Apel wrote: Please try building from CVS HEAD to make sure it fixes your problem. thanks for your quick fix. I tried it out with both generators and it works fine! Will this fix make it into 2.6.3? Yes, I think so. -Brad ___ CMake

Re: [CMake] CTest/CDash and git

2008-11-08 Thread Brad King
Ioan Calin Borcoman wrote: Hi, Are there any plans to support git in CTest/CDash? Yes: http://www.cmake.org/Bug/view.php?id=6994 I've been working on it on and off for a while. I'll update the above entry when something is ready. -Brad ___

Re: [CMake] GetLibraryNamesInternal called on imported target

2008-11-25 Thread Brad King
Boudewijn Rempt wrote: Hi, When I run (cvs head) cmake on my kde sources on OSX, I get lots of these errors: CMake Internal Error (please report a bug) in CMakeLists.txt: GetLibraryNamesInternal called on imported target: kparts What is going on? We're tracking it down. This is under

Re: [CMake] Preserving library order in target_link_libraries(...) command

2008-11-26 Thread Brad King
Bartlett, Roscoe A wrote: Does CMake guarantee that the order of the libraries passed into target_link_libraries(...) is preserved on the actual link line? For example, If I have: target_link_libraries(sometarget lib1 lib2 lib3 ...) does CMake guarantee that the link line will have the

Re: [CMake] IMPORTED_LOCATION

2008-12-01 Thread Brad King
Micha Renner wrote: I have two questions for the listening below. 1. Out-commenting the line #4 results in a linker error LINK : fatal error LNK1104: File _sLib-NOTFOUND.obj can't be opened What is the purpose of this command (line #4)? When one adds a shared library that is built in the

Re: [CMake] Getting rid of unwanted quotes that CMake inserts into commands

2008-12-01 Thread Brad King
Alan W. Irwin wrote: I have defined the following custom command: add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/grid_EOS1_2.out COMMAND ${free_eos_test_LOCATION} ${CMAKE_CURRENT_BINARY_DIR}/grid_EOS1_2.in ${CMAKE_CURRENT_BINARY_DIR}/grid_EOS1_2.out DEPENDS

Re: [CMake] global variable vs propagation of include_directories

2008-12-02 Thread Brad King
Sowa, Bartlomiej (NSN - PL/Wroclaw) wrote: It would be ideal, to have a way to propagate and aggregate include_directories up the add_subdirectory hierarchy. Can you help me to find a way to do this? You can use global properties as global variables. See the set_property()/get_property()

Re: [CMake] Getting rid of unwanted quotes that CMake inserts into commands

2008-12-02 Thread Brad King
Alan W. Irwin wrote: Shouldn't that be up to the user to insert quotes where needed in the command rather than CMake anticipating their needs (incorrectly in this case)? Every make's shell requires different escapes. The VERBATIM option was *added* to help users get the same custom command

Re: [CMake] cmake 2.6.3 RC 5

2008-12-08 Thread Brad King
Alexander Neundorf wrote: Just a small thing: I'm slowly converting a few of the FindFoo-modules from kdelibs to the new Config-style. E.g. for automoc4 our FindAutomoc4.cmake looks (basically) like: set(_FIND_QUIETLY ${Automoc4_FIND_QUIETLY}) find_package(Automoc4 QUIET NO_MODULE)

Re: [CMake] cmake 2.6.3 RC 5

2008-12-09 Thread Brad King
Brad King wrote: Alexander Neundorf wrote: So, I think it would be nice if find_package(NO_MODULE) would restore the FIND_QUIETLY variable to the state it was before (as I'm doing here manually). Good idea. I don't think we make any guarantee either way about the value of this variable

Re: [CMake] Search paths for FooConfig.cmake files

2008-12-09 Thread Brad King
Jose Luis Blanco wrote: Hello CMake developers! I've been thinking it would be interesting that CMake could look for FooConfig.cmake package files in some likely paths such as C:\Program Files\Foo-XXX\ . This is for Windows, of course, but perhaps could be extended to /opt/foo-XXX/ in Unix

Re: [CMake] LOCATION in VS

2008-12-11 Thread Brad King
Brad Aisa wrote: I am trying to use the LOCATION property of a library target in VS. VS is a bit complicated, because a single generate creates all 4 targets (Debug, Release, etc.) I want to add a custom target command. Here is what is in the file: _targ is a variable that contains a

Re: [CMake] Symlink problem under linux for runtime search path generation

2008-12-26 Thread Brad King
Nicolas Desprès wrote: Hi Brad, Sorry for the delayed answer. It was Christmas break :-) I've tried your patch and it works :-) Thank you very much. I think the next step is to open an issue in the bug tracker (I could do it). Or maybe you can directly commit the patch if you have access.

Re: [CMake] Strange problem creating and linking against a static lib

2009-01-07 Thread Brad King
Joachim Ziegler wrote: Joachim Ziegler wrote: I suppose the problem is in the link line, which says: /usr/bin/X11/c++ -fPIC -static CMakeFiles/startCompletionServer.dir/StartCompletionServer.o -o startCompletionServer -rdynamic -L/KM/home-0/ziegler/tmp/build -Wl,-Bstatic -lbaselib

Re: [CMake] File modification detection based on content (not timestamp)

2009-01-08 Thread Brad King
Robin Vobruba wrote: We also recently moved from SVN to GIT with our main repository. Because of the way GIT works, we would like CMake to check for file modification based on file contents, rather then timestamps. This would let us use the advantages of GIT to its fullest, save us from

Re: [CMake] CMake, Visual studio 2005 and long relative path

2009-01-08 Thread Brad King
Eric Noulard wrote: 2009/1/8 Julien Michel julien.mic...@c-s.fr: Dear CMake users and developpers, My project is using cmake and I am trying to build it on Visual Studio 2005. The configuration process is successful, but when trying to compile, I have a long bunch of fatal C1083 error :

Re: [CMake] History and ideas behind FindMPI.cmake?

2009-01-13 Thread Brad King
Alin M Elena wrote: Do you really need an module for MPI? All you need is to set the normal shell variables for compilers to the MPI wrappers. You need both mpi and non-mpi binaries just use different build folders. Alin is correct. If the project works with an all-MPI build you can just

Re: [CMake] test executable failing only when run in ctest

2009-01-26 Thread Brad King
Matthew Leotta wrote: I've come across a test on the VXL dashboard that seems to segfault only on some test machines. http://www.cdash.org/CDash/testSummary.php?project=12name=bvxm_test_apm_processorsdate=2009-01-26 One of the failing machines is mine (Mac_OS_X-10.5.6_unix_make). When I

Re: [CMake] test executable failing only when run in ctest

2009-01-26 Thread Brad King
Matthew Leotta wrote: Brad, Thanks, but I'm not sure if I completely understand your suggestion. Let me clarify. If I run the test executable ./bvxm_test_all I get no errors and no segfault. I know how to debug this, but there is nothing to debug. If in the same directory I run

Re: [CMake] Will CMP0003 OLD become deprecated?

2009-01-26 Thread Brad King
Adolfo Rodríguez wrote: I am currently migrating a project to CMake, and have been linking targets to project libraries using full paths (i.e., embracing the NEW CMP0003 policy of CMake = 2.6). However, my co-workers are reluctant to embrace this because the old CMP0003 policy has not yet

Re: [CMake] test executable failing only when run in ctest

2009-01-26 Thread Brad King
Matthew Leotta wrote: On Jan 26, 2009, at 3:04 PM, Brad King wrote: add_test(run_xterm xterm) $ ctest -R run_xterm Then run gdb and the test inside the xterm to see if it fails. It could be an environment difference. -Brad It runs fine from within xterm when xterm is launched

Re: [CMake] Regression between 2.4.8 and 2.6.2 for the macada version of the gcc compiler

2009-01-28 Thread Brad King
Alan W. Irwin wrote: The issue can be illustrated by a simple hello-world shared library build test project with SOVERSION and VERSION specified for the library. From make.out_gcc_macada_2.6.2: --

Re: [CMake] Regression between 2.4.8 and 2.6.2 for the macada version of the gcc compiler

2009-01-28 Thread Brad King
Alexander Neundorf wrote: On Wednesday 28 January 2009, Alan W. Irwin wrote: One of the PLplot developers has been using the macada version of the gcc compiler on Mac OS X for a long time because that version gives him an integrated Ada compiler as well. That compiler worked well for

Re: [CMake] Regression between 2.4.8 and 2.6.2 for the macada version of the gcc compiler

2009-01-29 Thread Brad King
Hendrik Sattler wrote: Martin Costabel schrieb: Alan W. Irwin wrote: [] Is there a better gcc option then -v to find out the _actual_ linker being used? Use -Wl,-v :-) On 10.4, if you run gcc -dynamiclib, the linking is managed by /usr/bin/libtool which in turn calls /usr/bin/ld, and

Re: [CMake] How to append arbitrary linker options?

2009-01-30 Thread Brad King
Bartlett, Roscoe A wrote: Hello, I would like to be able to append arbitrary linker options to the end of my link lines on Unix/Linux systems. However, the options set in the CMAKE_EXE_LINKER_FLAGS variable are listed *before* all of the libraries that CMake knows about. I need to be

Re: [CMake] How to append arbitrary linker options?

2009-02-02 Thread Brad King
Bartlett, Roscoe A wrote: The hack: set(CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_CXX_LINK_EXECUTABLE} ${NASTY_FLAGS}) does not work because my libraries still come after these flags. Read my suggestion more carefully. I'm not setting CMAKE_EXE_LINKER_FLAGS. I'm setting the variable from

Re: [CMake] cmake 2.6.3 RC 11

2009-02-06 Thread Brad King
Alexander Neundorf wrote: On Thursday 05 February 2009, Bill Hoffman wrote: I have a release candidate (RC 11) for 2.6.3 ready for CMake. This should be about the last one. At this point I am only going to fix regressions from previous releases of CMake into 2.6.3, so please try this release.

Re: [CMake] CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) and cmake_policy(VERSION 2.6.0) not working correctly for 2.6.2

2009-02-06 Thread Brad King
Alan W. Irwin wrote: On 2009-02-01 09:03-0800 Alan W. Irwin wrote: According to the documentation of 2.6.2, policies CMP0008 and CMP0009 were introduced after 2.6.0. Also, according to that documentation, cmake_policy(VERSION 2.6.0) should set those policies to OLD and warn about that. I

Re: [CMake] MSVC7.1 static link question

2009-02-10 Thread Brad King
Luigi Calori wrote: Bill Hoffman ha scritto: Philip Lowman wrote: On Mon, Feb 9, 2009 at 12:39 PM, Luigi Calori l.cal...@cineca.it mailto:l.cal...@cineca.it wrote: I' m quite a newbie in static linking, I would like to combine two lib into one: say libtiff needs libjpeg and

Re: [CMake] MSVC7.1 static link question

2009-02-11 Thread Brad King
Philip Lowman wrote: On Tue, Feb 10, 2009 at 1:01 PM, Brad King brad.k...@kitware.com CMake 2.6 makes it easy to export targets from one project (either its build tree or install tree) for use by another project. Is this the easiest way to register dependencies of IMPORTED static

Re: [CMake] warning safe linker search path

2009-02-18 Thread Brad King
John Biddiscombe wrote: I get a lot of these warnings (example below), because in /usr/lib64 there are symlinks to the libGL files in /usr/X11R6/lib64 Is there a correct (but still safe) way to make these warnings go away. There are a lot of them (a couple per plugin - so on screen we get tens

Re: [CMake] creating custom make targets

2009-02-19 Thread Brad King
Aaron Turner wrote: Whoops, my bad. Typed add_custom_target not add_custom_command. Thanks everyone, this makes sense now. To answer the original question, the best way to generate a bunch of things only when the users asks is to use add_custom_command to create the rules and then associate

Re: [CMake] EXECUTABLE_OUTPUT_PATH is not just deprecated, it's harmful!

2009-02-19 Thread Brad King
kent williams wrote: So we have a big program (well a couple of them Brains2 and Brains3), and a bunch of 'unbundled' programs (BRAINSFit, BRAINSDemonWarp, BRAINSTracer etc..). We use SVN to add the 'unbundled' programs as subdirectories of our BRAINS svn checkout. So our CMakeLists.txt files

Re: [CMake] EXECUTABLE_OUTPUT_PATH is not just deprecated, it's harmful!

2009-02-20 Thread Brad King
Philip Lowman wrote: On Thu, Feb 19, 2009 at 5:25 PM, Brad King brad.k...@kitware.com mailto:brad.k...@kitware.com wrote: AFAIK the word 'deprecated' does not appear in the documentation for EXECUTABLE_OUTPUT_PATH. It will be around for a long time. We just recommend using

Re: [CMake] problem with add_custom_command / add_custom_target in different directories

2009-02-25 Thread Brad King
Michael Wild wrote: On 25. Feb, 2009, at 7:25, Philip Lowman wrote: When I invoke add_custom_target() in the parent directory it causes an error in the makefiles. To me this appears to be a bug in the Makefile generator. I also tried to make a untarFoo custom target in test/CMakeLists.txt,

Re: [CMake] Help with cmake_policy

2009-02-25 Thread Brad King
eblo...@free.fr wrote: I'm having trouble to understand how to use the cmake_policy the easy way: My CMakeLists.txt files are written for CMake 2.6.2 I've upgraded to CMake 2.6.3, and I got some warnings about CMP0011. How can I tell CMake 2.6.3 to work the way CMake 2.6.2 used to work,

Re: [CMake] problem with add_custom_command / add_custom_target in different directories

2009-02-26 Thread Brad King
Philip Lowman wrote: Brad King wrote: I suggest making the extraction rule generate a stamp file with cmake -E touch Thanks for pointing out those two problems. Not too worried about either of them at the moment given what this is intended for. Another thing did concern me which

Re: [CMake] Help with cmake_policy

2009-02-26 Thread Brad King
Alexander Neundorf wrote: On Wednesday 25 February 2009, eblo...@free.fr wrote: The customer may not need to know about CMake internals, and get weird warning messages. I'd also like to have them somewhat less scary looking... Manu, are you actually cutting release snapshots for the

Re: [CMake] install(EXPORT ..) and multiple projects

2009-02-27 Thread Brad King
Clinton Stimpson wrote: I've got two projects with one depending on the other. I include the one project as a subdirectory and build it along with my project. Its similar to how ParaView includes VTK. I'm trying to use the install(EXPORT ...) to export my project from an installation tree,

Re: [CMake] Avoiding a relink

2009-02-27 Thread Brad King
Philip Lowman wrote: I wasn't thinking of it in that context when I said that. Yes, I think you're correct and I've noticed that behavior before. I usually work around it with make foo/fast assuming foo is the shared library I'm patching. Not sure why CMake does what it does. For the

Re: [CMake] Avoiding a relink

2009-03-02 Thread Brad King
Philip Lowman wrote: On Fri, Feb 27, 2009 at 5:24 PM, Brad King brad.k...@kitware.com Try removing an object file from a shared library, rebuild just that library, and then run the executable (which still exists). It will break at runtime, but if you try relinking

Re: [CMake] Git support status in CMake/CTest/CDash

2009-03-02 Thread Brad King
Félix C. Morency wrote: I want to know if there are any progress on git support for CMake/CTest/CDash. Is this planned to be released soon? You can track progress here: http://www.cmake.org/Bug/view.php?id=7541 I have an implementation mostly done, but not quite ready for publishing to the

Re: [CMake] add_dependencies with an imported target

2009-03-06 Thread Brad King
Joachim de Vries wrote: CMake version 2.6 Mac OSX 10.5 XCode 3.0 My problem is that I have the situation I described in the bottom. I have one app and one lib in one project. If I change something in my lib everything is compiled and the app starts but the app didn't link the lib again.

Re: [CMake] Joining multiple directories into one

2009-03-09 Thread Brad King
Jussi Pakkanen wrote: Hi all I'm looking into compiling OpenOffice.org with CMake. Currently it uses dmake and a custom build tool. The basic structure is that every logical component (Writer, widget toolkit etc) has its own subdirectory. These are well separated. The problem comes from the

Re: [CMake] warning safe linker search path

2009-03-09 Thread Brad King
John Biddiscombe wrote: John Biddiscombe wrote: OK. I'm using 2.6.2 I'll let you know if the problem continues with 2.6.3 or later so I've been using 2.6.3-rc 14 for a while now /apps-vis/cmake-2.6.3-RC-14/bin/ccmake --version ccmake version 2.6-patch 3 RC-14 and the warnings still appear,

Re: [CMake] warning safe linker search path

2009-03-10 Thread Brad King
John Biddiscombe wrote: Brad BTW, the only reason CMake needs to order the directories is because of compatibility with how CMake 2.4 ordered them. You must be setting CMP0003 to OLD. If you set it to NEW you should never see this warning. That seems to have solved the problem. On second

Re: [CMake] Joining multiple directories into one

2009-03-10 Thread Brad King
Jussi Pakkanen wrote: On Mon, Mar 9, 2009 at 4:03 PM, Brad King brad.k...@kitware.com wrote: do not perform very well in the VS IDE (this is not CMake, but the VS IDE implementation). The definitions will work, but they cause the IDE to use a separate invocation of the compiler for every

Re: [CMake] 1 tricky question, 1 bug report

2009-03-13 Thread Brad King
Bill Hoffman wrote: The following Fortran code cannot be compiled with CMake, because CMake looks for module called name, which of course, does not exist. Actually it thinks the source is defining a module called name. If I replace Module with _Module_ the code compiles.

Re: [CMake] 1 tricky question, 1 bug report

2009-03-16 Thread Brad King
Maik Beckmann wrote: The _second_ option proposed in the book is to have two distinct fortran lexers (and probably two parsers). This is the cleanest solution, but would be engineered for this special problem, IMHO. Fixed and free format are practically two different languages from the

Re: [CMake] imported lib properties...

2009-03-16 Thread Brad King
Asmodehn Shade wrote: I am currently converting my old cmake 2.4 scripts to cmake 2.6.3, as I am enjoying the new possibilities offered by the export / import system I previously implemented my self a little dirty workaround this limitation... so I am pretty happy to see this coming along ;-)

Re: [CMake] 1 tricky question, 1 bug report

2009-03-16 Thread Brad King
Maik Beckmann wrote: Brad King schrieb am Montag 16 März 2009 um 14:24: Maik Beckmann wrote: The _third_ option is to make the lexer format agnostic and handle formats at the parser code. This should work well, since we just have to make sure that the valid MODULE und USE statements

Re: [CMake] 1 tricky question, 1 bug report

2009-03-16 Thread Brad King
Maik Beckmann wrote: I still didn't test whether fixed format file can include a free format file, or vise versa. In this case having distinct lexers(and parsers?) is the only reliable approach. I just tried these cases and gcc chokes on both cases: ! main-free.f90 include 'fixed.f' !

Re: [CMake] automatically re-generating makefiles

2009-03-17 Thread Brad King
Matthew Woehlke wrote: Bill Hoffman wrote: I still don't get the original problem??? We used to have Makefile: build system files. It was removed when that work was pushed into cmake_check_build_system. Ah. Maybe it should come back? The problem with Makefile: input-foo.txt

Re: [CMake] automatically re-generating makefiles

2009-03-17 Thread Brad King
Brad King wrote: AFAIK there is no way to implement the make my-new-target interface reliably. FYI, you can write the above like this: make rebuild_cache make my-new-target if you know that it is a new target. -Brad ___ Powered

Re: [CMake] CMake shared libraries, install, and rpath

2009-03-19 Thread Brad King
Alexander Neundorf wrote: On Wednesday 18 March 2009, Bartlett, Roscoe A wrote: Hello, How can we get CMake to deal with installed shared libraries and set the rpath correctly in a portable way? The issue is that we have is that we need to enable client applications to link to installed

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] CMAKE_CURRENT_LIST_FILE in CMake 2.6.3

2009-03-25 Thread Brad King
KSpam wrote: I attached a small example with the problem. The problem is actually a bit more complicated than my original explanation. I have a macro in my top-level CMakeLists.txt file: macro (getScriptDir _scriptDir) get_filename_component(${_scriptDir} ${CMAKE_CURRENT_LIST_FILE}

Re: [CMake] problem with add_custom_command / add_custom_target in different directories

2009-03-30 Thread Brad King
James Bigler wrote: I filed a documentation bug: http://public.kitware.com/Bug/view.php?id=8815 I've committed documentation and updated the bug entry. BTW, is there a particular reason why custom commands are only registered in the directory where they appear? They seem kind of like the

Re: [CMake] link_libraries() deprecated. Why?

2009-04-02 Thread Brad King
Alex, Looking at history I see this was deprecated by a patch you sent me. Originally we called the command 'discouraged'. Why did we change to 'deprecated'? Marcel Loose wrote: Thanks for your reply. Your solution is ok, but it looks a bit like a workaround for a feature that is missing, but

Re: [CMake] Where to put own FindXXX.cmake files?

2009-04-03 Thread Brad King
Dominique Belhachemi wrote: i would like to add a FindXXX.cmake to each of my library packages. Let's compare CMake with pkgconfig. A package containing a library is responsible to put a .pc file into /usr/lib/pkgconfig/ [snip] A package knows best where to find its own include and library

Re: [CMake] Where to put own FindXXX.cmake files?

2009-04-03 Thread Brad King
Modestas Vainius wrote: On 2009 m. April 3 d., Friday 21:37:20 Brad King wrote: If your package is CMake-aware then it should install a CMake package file: http://www.cmake.org/Wiki/CMake_2.6_Notes#Packages [snip=from the wiki page] It may also provide a CMake package configuration file

Re: [CMake] managing lists with space separated elements

2009-04-13 Thread Brad King
Piotr Dobrogost wrote: Bill Hoffman wrote: It was a mistake to have CMAKE_CXX_FLAGS and CMAKE_C_STANDARD_LIBRARIES be strings they should have been lists. I'm glad you said this. It's something I've been trying to show in my posts. Certainly CMAKE_C_STANDARD_LIBRARIES should have been a

Re: [CMake] managing lists with space separated elements

2009-04-15 Thread Brad King
Piotr Dobrogost wrote: Brad King wrote: Last year I started working on new features to allow projects to specify flags with modern semicolon-separated lists. See my comment from 2008-10-09 here: http://www.cmake.org/Bug/view.php?id=6493 It looks like that is the 3rd solution I suggested

Re: [CMake] Getting the compiler version?

2009-04-15 Thread Brad King
Philip Lowman wrote: On Tue, Apr 14, 2009 at 11:17 AM, Bartlett, Roscoe A raba...@sandia.gov mailto:raba...@sandia.gov wrote: Thanks for the pointer. We will look into this and try to create a module that other people could use also. However, it would be good if we could get this

Re: [CMake] Linking to a library with a -

2009-04-15 Thread Brad King
David Doria wrote: When I add a line like this: TARGET_LINK_LIBRARIES(MyProject boost_program_options-mt) in my link.txt file, -lboost_program_options gets produced instead (without the -mt), and therefore the library cannot be found. I've been creating a symlink with the name without the

Re: [CMake] Imported libraries lookup

2009-04-15 Thread Brad King
Sergey Rudchenko wrote: Hi all, My global generator adds some imported libraries in EnableLanguage method, but the TARGET_LINK_LIBRARIES command doesn't obey that fact the libraries are imported. Here is the code which adds an imported library: void cmGlobalSymbianMmpGenerator

Re: [CMake] msvc linking problem k3b on windows

2009-04-21 Thread Brad King
Ralf Habacker wrote: For my opinion the problem here is caused by the fact that cmake uses the value of the OUPUT_NAME property for creating the import library name and not the target name which is expected. Why is it expected that the target name be used for the import library name and not

Re: [CMake] msvc linking problem k3b on windows

2009-04-22 Thread Brad King
Ralf Habacker wrote: May be the following (new) properties OUTPUT_RUNTIME_NAME OUTPUT_ARCHIVE_NAME OUTPUT_LIBRARY_NAME which enforce the developer to change individual types of generated files would solve this problem in a generic way Good idea. We already do this for the output directory,

Re: [CMake] msvc linking problem k3b on windows

2009-04-22 Thread Brad King
Ralf Habacker wrote: Brad King schrieb: We do support the image version fields in dll binaries. What do you mean by real versioned DLLs? Are you talking about side-by-side stuff? I mean integrating api versions in the runtime target filename to be able to have different versions of a library

Re: [CMake] Imported libraries lookup

2009-04-22 Thread Brad King
Sergey Rudchenko wrote: On Wed, 2009-04-22 at 10:41 -0400, Brad King wrote: In general the generators should never have to see any imported targets. If you have a cmTarget* you can always ask its IsImported() method. Thanks, Brad. Now it's clean for we how things should be implemented. So

Re: [CMake] Problem with NMake generator after upgrade from 2.4.6 to 2.6.3

2009-04-27 Thread Brad King
Dieter Oberkofler wrote: That should be: D:\MyDev\ljs_app\trunk\tools\..\xvt\win\lib\tls12dvc71.lib You are absolutely right but it seems to have worked in CMake 2.4.6... http://www.cmake.org/cmake/help/cmake2.6docs.html#policy:CMP0008

Re: [CMake] Problem with NMake generator after upgrade from 2.4.6 to 2.6.3

2009-04-27 Thread Brad King
Dieter Oberkofler wrote: I have been digging into this issue and found out that the problem might be cause by the following command that might have changed it's behaviour in CMake 2.6.4 == SET(CMAKE_CXX_LINK_EXECUTABLE link.exe /OUT:TARGET TARGET.ler ${CMAKE_START_TEMP_FILE}

Re: [CMake] 2.6.4 add_subdirectory with same argument broken?

2009-05-05 Thread Brad King
Carsten Neumann wrote: It does so by performing multiple passes over the source tree [snip] This all works fine with cmake 2.6.x (x 4), but the latest version complains in the OSGSETUP pass on the first call to ADD_SUBDIRECTORY in that pass (see attachment for more details): [snip] Is this

Re: [CMake] Static linking and find_library

2009-05-11 Thread Brad King
Bill Hoffman wrote: Marcel Loose wrote: 2) How can I persuade find_library() to only search for static libraries? You can't. Yes, you can: find_library(MATH_LIB NAMES libm.a) If you specify a valid library name then CMake will look for it directly instead of prepending 'lib' and

Re: [CMake] Problems building statically linked executable

2009-05-11 Thread Brad King
Marcel Loose wrote: I'm really struggling to build statically linked executables with CMake (also see my previous post with subject: Static linking and find_library). I've answered in that thread. Furthermore I added the '-static' flag to the linker with SET(CMAKE_EXE_LINKER_FLAGS -static).

Re: [CMake] [PATCH] slightly modify cache variable behaviour, Was: Re: option() behavior

2009-05-11 Thread Brad King
Bill Hoffman wrote: So, CMake has done what it does now from the start. There was a short period of time when it did not, and that was when a re-write was done, and it quickly broke some existing projects. Here is the thread: http://www.cmake.org/pipermail/cmake/2007-March/013204.html I

Re: [CMake] using IMPORTED targets in multiple projects within one CMake tree

2009-05-11 Thread Brad King
Alexander Neundorf wrote: On Tuesday 05 May 2009, alexandre.feb...@thomsonreuters.com wrote: I saw this too. IMHO, it's a bug. If it's a feature, I don't see the point. I think it's a feature that imported targets are not global. Brad explained this in a mail not too long ago, but I don't

Re: [CMake] Implicity CMAKE_CURRENT_BINARY_DIR include_directories

2009-05-11 Thread Brad King
Denis Scherbakov wrote: On Monday 11 May 2009, Denis Scherbakov wrote: CMAKE_LINK_DEPENDS_DEBUG_MODE is also not documented. Is this one an official public variable or may it go away again ? If you ask me - I don't know, I am not a CMake developer. But there is a lot functionality built

Re: [CMake] Static linking and find_library

2009-05-12 Thread Brad King
Marcel Loose wrote: On Mon, 2009-05-11 at 13:39 -0400, Brad King wrote: find_library(MATH_LIB NAMES libm.a) Does that also mean that I could change the default search order by using: find_library(MATH_LIB NAMES libm.a libm.so) The search looks for all the names in each directory before

Re: [CMake] Static linking and find_library

2009-05-13 Thread Brad King
S. Levent Yilmaz wrote: How can one enforce static linkage on a per platform basis (not the whole project)? In other words, what setting can we insert into a toolchain file http://www.vtk.org/Wiki/CMake_Cross_Compiling to make this possible? Let me identify a problem here with find_library().

Re: [CMake] Deriving version number from a header (safely)

2009-05-14 Thread Brad King
Doug Gregor wrote: However, we'd also like to force CMake to reconfigure when boost/version.hpp changes. Is there some top-level target that we can attach such a dependency to? This has come up several times recently. We need to add a feature to let projects specify their own files on which

Re: [CMake] Install problems

2009-05-20 Thread Brad King
Gheorghe Iancu wrote: compiler: VisualAge C++ Professional / C for AIX Compiler, Version 6 I don't think anyone has ever built CMake with that compiler before. The only testing we have on AIX is with VisualAge 9.0. See here: http://www.cdash.org/CDash/index.php?project=CMake for tested

Re: [CMake] Copy target from different configurations

2009-05-30 Thread Brad King
Jacob Repp wrote: I found that the VS7 local generator doesn't honor the *_OUTPUT_DIRECTORY properties so here's a modification that I added to our local version: I think your patch just updates the intermediate files output location, which includes all the object files. CMake 2.6.4 does

Re: [CMake] Using relative paths with INSTALL

2009-06-01 Thread Brad King
Timothy M. Shead wrote: Folks: On a couple of occasions now I've recommended the use of relative paths with the OSX bundle installer - this to install files within the bundle in nonstandard locations. It would be good to hear from the CMake gurus on whether relative paths are supported or

Re: [CMake] How to append arbitrary linker options?

2009-06-04 Thread Brad King
Bartlett, Roscoe A wrote: I would like to be able to append arbitrary linker options to the end of my link lines on Unix/Linux systems. However, the options set in the CMAKE_EXE_LINKER_FLAGS variable are listed *before* all of the libraries that CMake knows about. I need to be able to append

Re: [CMake] Precompiled Headers

2009-06-08 Thread Brad King
John Drescher wrote: Thanks for your help. Do you (or anyone else) know if there are any plans to make a dedicated function for this so it is cleaner and portable? http://www.vtk.org/Bug/view.php?id=1260 I just added a FAQ entry:

Re: [CMake] Precompiled Headers

2009-06-08 Thread Brad King
Pau Garcia i Quiles wrote: Apart from every compiler making this different (i. e. different parameters for each compilers), what are the difficulties you see for making this a first-class feature? It's not the different flags for each compiler that makes it hard. We already do that for other

Re: [CMake] Using relative paths with INSTALL

2009-06-08 Thread Brad King
Timothy M. Shead wrote: Brad King wrote: Timothy M. Shead wrote: INSTALL(FILES foo DESTINATION ../MacOS) [snip] The current behavior works fine, my question was whether relative paths outside the install prefix (i.e. paths starting with one or more ..) were officially sanctioned

Re: [CMake] import library

2009-06-12 Thread Brad King
Tyler Roscoe wrote: On Fri, Jun 12, 2009 at 05:46:39PM +0200, Leon Aronson (DT) wrote: I'm not generating dll's (at least I intend to); it should all be static linking. Static libraries are also controlled by ARCHIVE_OUTPUT_DIRECTORY. If you are using static libraries then you don't get (or

Re: [CMake] import library

2009-06-12 Thread Brad King
Brad King wrote: VS is not complaining that it cannot *find* the .lib file...it's complaining that it cannot *create* it. The reason is that the directory does not exist. If I make the directory by hand before building then it works. I'm investigating CMake internals to find the cause. Okay

Re: [CMake] import library

2009-06-15 Thread Brad King
Brad King wrote: We'll have to teach CMake to work around the problem. Please submit a bug report here: Nevermind, I've fixed it already. I'll schedule the fix for release 2.6.5. If you really did mean to dllexport something, then you need to let VS put the import library somewhere. One

Re: [CMake] One target being built several times during parallel build

2009-06-16 Thread Brad King
Denis Scherbakov wrote: I have a project with three executables: E1 depends on lib A E2 depends on lib A E3 depends on lib A First A must be built, then E1, E2 and E3. I do gmake -j9 E1 E2 E3 and I see that target A is being built 3? times instead of just one. I also notice that progress

Re: [CMake] Copy target from different configurations

2009-06-16 Thread Brad King
alexandre.feb...@thomsonreuters.com wrote: Hi, yes, this is definitely what I would like, there is no other way to get rid of these Debug/Release directories. I even would like to have the corresponding variables: - CMAKE_LIBRARY_OUTPUT_DIRECTORY_CONFIG -

Re: [CMake] Multiple COMMANDs in EXECUTE_PROCESS

2009-06-16 Thread Brad King
David Cole wrote: sequentially... On Tue, Jun 16, 2009 at 3:19 AM, Denis Scherbakov denis_scherba...@yahoo.com mailto:denis_scherba...@yahoo.com wrote: I have multiple commands specified in one EXECUTE_PROCESS call like: EXECUTE_PROCESS(COMMAND cmd1 ... COMMAND cmd2 ... COMMAND

Re: [CMake] One target being built several times during parallel build

2009-06-16 Thread Brad King
Denis Scherbakov wrote: 6. gmake -j5 mytest printf 7. I observe target PUTS being built 2 times and Building CXX object puts/CMakeFiles/puts.dir/puts.cpp.o 2 times. Also counter goes to 150%. Your project looks fine. I missed in your earlier post that you ran gmake -j9 E1 E2 E3. The problem

<    1   2   3   4   5   6   7   8   9   10   >