Re: [CMake] Configuration environment variable for VS

2009-05-14 Thread Dmitry Bely
On Fri, May 15, 2009 at 1:59 AM, James Bigler wrote: > Is there a configuration environment variable for VS that I could use to > change the behavior of an add_custom_command based on whether I'm building a > debug or release build? > > I want something like this: > > add_custom_command(${OUTPUT_F

[CMake] unable to include a source file for all sub directories

2009-05-14 Thread ankit jain
Hi all, My problem is like this... My source tree structure is: Main_folder .. Ident.c ..folder1 f11.c f12.c ..folder2 ..f21.c ..f22.c ..folder3 f31.c f32.c Now iam building a library for main_folder as: foreach(fname ${folder1_srcs} list(APPEND main_folder_srcs f

Re: [CMake] [cmake] Not reading CMakelists.txt in Subdirectory

2009-05-14 Thread Henry Johnson
There weren't any errors generated, but the sln built for VC was missing most of the modules that I wanted to build because they were in subdirectories. The IF (EXISTS ..) statement found the directory, but the ADD_SUBDIRECTORY(...) statement did not. Hope that helps. David Cole wrote: It'

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

2009-05-14 Thread Doug Gregor
On Thu, May 14, 2009 at 8:25 AM, Brad King wrote: > 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

Re: [CMake] [cmake] Not reading CMakelists.txt in Subdirectory

2009-05-14 Thread David Cole
It's usually a good idea to use full path names with functions that take file names as arguments. I'd still be curious to know what the error/confusing output was, though. Maybe the error text could use some improvement...? Glad you got it working, David On Thu, May 14, 2009 at 8:50 PM, Henry

Re: [CMake] [cmake] Not reading CMakelists.txt in Subdirectory

2009-05-14 Thread Henry Johnson
Hi, The link to the sourceforge project is: http://glt.cvs.sourceforge.net/viewvc/glt/glt/src/csg/ I think I know what the problem is, or at least what fixed it for me. Original CMakeLists.txt contained: IF (EXISTS src/program/raster) ADD_SUBDIRECTORY(src/program/raster) ENDIF (EXISTS src/prog

Re: [CMake] [cmake] Not reading CMakelists.txt in Subdirectory

2009-05-14 Thread David Cole
If it's an open source project, point us to the source tree. If not, give us some example CMakeLists.txt files and dir structure that reproduces your problem. When you say CMake doesn't catch it, what exactly do you mean? (Post copy/pasted error output, perhaps.) We need more details to help you

Re: [CMake] LOCATION_ and Visual Studio

2009-05-14 Thread Clinton Stimpson
Can't you just set CMAKE_RUNTIME_OUTPUT_DIRECTORY in your top level CMakeLists.txt? For example: set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIRECTORY}/bin) Then any project from there and under (from add_subdirectory()/subdirs()), will build their .exe and .dll directly into t

[CMake] [cmake] Not reading CMakelists.txt in Subdirectory

2009-05-14 Thread Henry Johnson
Hi, Newbie here, trying to CMake a sourceforge project. Project is structured normally with main CMakeLists.txt at main directory and source for various executables in several subdirectories each with accompanying CMakeLists.txt. Problem is that none of the sub programs are included in the b

Re: [CMake] Different output files based on build_type

2009-05-14 Thread Clinton Stimpson
James Bigler wrote: I need to specify different output files for an add_custom_command for different build types in VS. The output file also needs to be added to an add_executable command. I'm not sure how to go about this. Any pointers would be helpful. How about something like this. set

Re: [CMake] Different output files based on build_type

2009-05-14 Thread Tyler Roscoe
On Thu, May 14, 2009 at 04:09:43PM -0600, James Bigler wrote: > I need to specify different output files for an add_custom_command for > different build types in VS. The output file also needs to be added to an > add_executable command. Take a look at this thread: http://www.cmake.org/pipermail/

[CMake] Different output files based on build_type

2009-05-14 Thread James Bigler
I need to specify different output files for an add_custom_command for different build types in VS. The output file also needs to be added to an add_executable command. I'm not sure how to go about this. Any pointers would be helpful. Thanks, James __

[CMake] Configuration environment variable for VS

2009-05-14 Thread James Bigler
Is there a configuration environment variable for VS that I could use to change the behavior of an add_custom_command based on whether I'm building a debug or release build? I want something like this: add_custom_command(${OUTPUT_FILE} COMMAND ${CMAKE_COMMAND} ARGS "$(Config)" -P "${my_custom_s

Re: [CMake] Masm support for Visual Studio generator

2009-05-14 Thread Alexander Neundorf
On Thursday 14 May 2009, Dmitry Bely wrote: > Is it expected to work in Cmake 2.6.4? There is no problem with nmake > generator but in Visual Studio all .asm files have an empty custom > build command line. I think nobody has tried this yet. I guess we need your help, ideally patches for the Visua

Re: [CMake] howto not remove an output in make clean

2009-05-14 Thread felix schwitzer
> Is there a way to tell "make clean" to *not* remove the output from > the custom command "foo.cpp" ? for this I use the directory-property CLEAN_NO_CUSTOM from the docu: If this is true then the outputs of custom commands for this directory will not be removed during the "make clean" stage.

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 th

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

2009-05-14 Thread Doug Gregor
Hello, I'm hacking on a CMake build system for Boost, and we'd like to extract the Boost version number from our version header (boost/version.hpp) so that we can use the version number within CMake. Actually doing this is trivial: file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/boost/version.hpp BOOST_

Re: [CMake] add_custom_target / add_definitions cache issues

2009-05-14 Thread Tyler Roscoe
On Thu, May 14, 2009 at 11:59:53AM +0200, Reto Glauser wrote: > add_definitions( -DVERSION="${PROJECT_VERSION}" ) > > Now, I'd like to rerun and redefine -DVERSION each time I commit a change > to the SCM or change the branch but fail to see how to achieve that. > > I tried to add a add_custom_t

[CMake] Settings different compile options for diff. files in same folder

2009-05-14 Thread David . Karr
ankit jain wrote: > I have a folder in which there are 5 files > folder > a1.c > a2.c > a3.c > a4.c > a5.c > > Out of these from 4th and 5th iam making a library if iam working on windows > else with the rest three iam building one library for the folder. > Even on windows also iam makin

Re: [CMake] add_test and locating dependent DLL's on Windows

2009-05-14 Thread Scott Gray
Werner Smekal wrote: Hi Scott, There is actually a possibility to tell Visual C++ directly where the DLL is located (by changing the PATH variable for one configuration inside VS), but I don't remember right now how and I'm just on the wrong OS right now to have a look. Obviously I w

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Ok, thanks Denis. Marcel. On Thu, 2009-05-14 at 05:29 -0700, Denis Scherbakov wrote: > > What's the best way to proceed. Should I collect the names > > of variables > > used in the find_library() calls in a separate list > > variable and use > > that for find_package_handle_standard_args(), or sh

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Denis Scherbakov
> What's the best way to proceed. Should I collect the names > of variables > used in the find_library() calls in a separate list > variable and use > that for find_package_handle_standard_args(), or should I > just handle > the REQUIRED and QUIET stuff myself in this case. Any > recommendations?

[CMake] Masm support for Visual Studio generator

2009-05-14 Thread Dmitry Bely
Is it expected to work in Cmake 2.6.4? There is no problem with nmake generator but in Visual Studio all .asm files have an empty custom build command line. - Dmitry Bely ___ Powered by www.kitware.com Visit other Kitware open-source projects at http:/

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Hi Denis, I think I understand what's going wrong. I collect the *values* from the variables returned by find_library() in XXX_LIBRARIES, not the names of these variables. So, instead of passing LIB1 LIB2 LIB3 to find_package_handle_standard_args() I'm actually passing ${LIB1} ${LIB2} ${LIB3}, wh

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Denis Scherbakov
> Yes, that's right. But... > > The number of libraries I need to find depends on the > COMPONENTS that > were specified by the user in his CMakeLists.txt file. So I > cannot hard > code these variables as arguments to > find_package_handle_standard_args(). That's why I chose to > collect them >

Re: [CMake] add_test and locating dependent DLL's on Windows

2009-05-14 Thread Werner Smekal
Hi Scott, There is actually a possibility to tell Visual C++ directly where the DLL is located (by changing the PATH variable for one configuration inside VS), but I don't remember right now how and I'm just on the wrong OS right now to have a look. Obviously I want to avoid having the devel

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Yes, that's right. But... The number of libraries I need to find depends on the COMPONENTS that were specified by the user in his CMakeLists.txt file. So I cannot hard code these variables as arguments to find_package_handle_standard_args(). That's why I chose to collect them in XXX-LIBRARIES firs

[CMake] add_custom_target / add_definitions cache issues

2009-05-14 Thread Reto Glauser
Hello I have a macro to get SCM information (in this case git) from the ${CMAKE_SOURCE_DIR}. I use the branch and SHA1 information to define the ${PROJECT_VERSION} which in turn defines a compiler definition: add_definitions( -DVERSION="${PROJECT_VERSION}" ) Example: -DVERSION="master:cef2dc74e

Re: [CMake] Settings different compile options for diff. files in same folder..

2009-05-14 Thread Denis Scherbakov
> I have a folder in which there are 5 files > folder > ... > Out of these from 4th and 5th iam making a library if iam > working on windows else with the rest three iam building one > library for the folder. Does the follwoing work? SET (MAIN_SRCS   a1.c   a2.c   a3.c ) SET (ADD_SRC

[CMake] Settings different compile options for diff. files in same folder

2009-05-14 Thread ankit jain
-- Forwarded message -- From: ankit jain Date: 2009/5/14 Subject: Settings different compile options for diff. files in same folder.. To: cmake@cmake.org Hi all, I have a folder in which there are 5 files folder a1.c a2.c a3.c a4.c a5.c Out of these from 4th and 5th i

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Denis Scherbakov
> That's my case as well. I need to find more than one > library, and it's > an all or nothing situation. I mean, if any of the > libraries I'm > searching for is missing, the package as such cannot be > used. So, my > original question still stands: > How should I pass a list of libraries to >

[CMake] Settings different compile options for diff. files in same folder..

2009-05-14 Thread ankit jain
Hi all, I have a folder in which there are 5 files folder a1.c a2.c a3.c a4.c a5.c Out of these from 4th and 5th iam making a library if iam working on windows else with the rest three iam building one library for the folder. Even on windows also iam making this library but making one m

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Hi Denis, That's my case as well. I need to find more than one library, and it's an all or nothing situation. I mean, if any of the libraries I'm searching for is missing, the package as such cannot be used. So, my original question still stands: How should I pass a list of libraries to find_pack

Re: [CMake] CPack - Beta or Alpha version?

2009-05-14 Thread Andreas Schneider
On Wednesday 13 May 2009 15:39:34 Brandon Olivares wrote: > Hi, Hi, > I was looking at the list of CPack variables. There are variables to set > the major, minor, and patch version numbers. But isn't there anything to > set a beta or alpha number? > > For instance, what if I wanted a 1.0B1 versio

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Denis Scherbakov
> I stumbled on a problem with FindPackageHandleStandardArgs, > which > probably arises from my misunderstanding of how to properly > use it. In FIND_PACKAGE_HANDLE_STANDARD_ARGS I inlude only variables that must always be defined in order for a package to function. If some variable can be omit

[CMake] CMake on Ohloh

2009-05-14 Thread Andreas Schneider
Hi, CMake is now a language on Ohloh. It started to scan today. I think we will get interesting results in the next days. https://www.ohloh.net/languages/74 Cheers, -- andreas signature.asc Description: This is a digitally signed message part.

[CMake] How to use FindPackageHandleStandardArgs

2009-05-14 Thread Marcel Loose
Hi all, I stumbled on a problem with FindPackageHandleStandardArgs, which probably arises from my misunderstanding of how to properly use it. The case is the following. I check for the presence of a number of libraries, using find_library(). I collect the values, returned by find_library() in a X