Re: [CMake] Project sub folders in visual studio solution files.

2008-03-10 Thread Sylvain Benner
Does anyone have a fix for creating a project hierarchy in visual studio solution files? Hello, I filled a feature request with an attached patch here: http://public.kitware.com/Bug/view.php?id=6577 --Sylvain ___ CMake mailing list

Re: [CMake] Re: CMake and Lua

2008-03-03 Thread Sylvain Benner
I don't buy the do it with comments approach. Something changes, then the comments are wrong. It's a fact that the code must be self explanatory as much as possible but it will never be as powerful as good and up to date comments. I don't buy the duplication of code approach. --Sylvain

Re: [CMake] Re: CMake and Lua

2008-02-29 Thread Sylvain Benner
Will Kitware consider making CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS default to on starting with 2.6.0 and doing away with this annoying construct? I think it would be a cool things to do this. Soon I will reformat all our scripts to remove this uneeded stuff, I'm pretty sure that a lot of CMake

Re: [CMake] CMake and Lua

2008-02-26 Thread Sylvain Benner
While the cmake language may not be beautiful, it works, and the users (developers) are not supposed to write programs with it. I do get your point that people should not *have* to program to do common tasks. Some other build systems seem to rely on the user to do far too much. The

Re: [CMake] IF( ${VAR} ) behaviour

2008-02-22 Thread Sylvain Benner
Fernando Cacciola a écrit : Hi people, Consider the following (tested in 2.4.7): set ( VAR whatever ) message( STATUS VAR=${VAR} ) if ( ${VAR} ) message( STATUS VAR evaluates to true ) else ( ${VAR} ) message( STATUS VAR evaluates to false ) endif( ${VAR} ) it prints VAR evaluates to

Re: [CMake] Re: IF( ${VAR} ) behaviour

2008-02-22 Thread Sylvain Benner
Now, why didn't if ( $ENV{SOME_ENV_VAR} ) work? Because $ENV{SOME_ENV_VAR} has the same behavior as ${SOME_ENV_VAR}, it evaluates a variable. The only difference is that ${} is a CMake variable and $ENV{} is an operating system environment variable. I assume that IF statement only

Re: [CMake] Ignore library flags now works in 2.4.8!

2008-02-19 Thread Sylvain Benner
SET(VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS "/NODEFAULTLIB:nafxcwd.lib /NODEFAULTLIB:libcmtd.lib" ) Hello, Why this kind of variable to implement the ignore flag ? In order to handle flags with this template : /flags:"parameters" for Visual Studio projects

Re: [CMake] Ignore library flags now works in 2.4.8!

2008-02-19 Thread Sylvain Benner
I don't see how that SET does anything other than set a variable. It must be how your project uses that variable. VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS is not a variable that CMake looks at... 2.4.8 did fix the problem with multiple /NODEFAULTLIB lines not working. Seems like my

Re: [CMake] CMake Feature list

2008-02-15 Thread Sylvain Benner
Guys, guys, read the list and add it yourselves! It's a wiki. We don't need discussion here. ;-) My mistake, it should have been sent to Bill only. --Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CMake Feature list

2008-02-15 Thread Sylvain Benner
I am sure I have left stuff out. Please edit the wiki or send me an email with any cool features that you think are missing from the list. The script ability of CMake may be worth to be added to the list of cool features. Something like complete scripting language. It's a feature I'm

Re: [CMake] Problem in ADD_CUSTOM_COMMAND

2008-02-13 Thread Sylvain Benner
Malhotra, Anupam a écrit : Also the Post Build setup does not show anything after the dsw is created by cmake. Please suggest? The post build step in Visual Studio 6 is added at the project level (dsp), not at the workspace level (dsw). Can you try to generate for Visual Studio 2003 or

Re: [CMake] Problem in ADD_CUSTOM_COMMAND

2008-02-13 Thread Sylvain Benner
Is there any other way apart from GET_TARGET_PROPERTY by which I can locate the exact path (without ${IntDir} in the path) of my library? Try $(ConfigurationName) to reference the targeted build directory, I'm not sure it is available in Visual Studio 6 but is likely to exist.

Re: [CMake] Problem in ADD_CUSTOM_COMMAND

2008-02-12 Thread Sylvain Benner
Hello, The $(IntDir) variable must be some CMake specific variable. Instead of the path returned from GET_TARGET_PROPERTY, I hardcoded the exact path. But still it's giving no error and the actual copy is still not happeneing. Did you try to do it manually in a command window to be sure it's

Re: [CMake] Problem in ADD_CUSTOM_COMMAND

2008-02-11 Thread Sylvain Benner
What's the value of $(IntDir) ? Have you already tried this : $(IntDir)/vpcl.lib instead of C:/NIGHTLY_BUILD_IMPROVED_TESTING/Visual Studio 6Debug/output/$(IntDir)/vpcl.lib? ? And in your path the directory Visual Studio 6Debug is right ? --Sylvain

Re: [CMake] Problem in ADD_CUSTOM_COMMAND

2008-02-11 Thread Sylvain Benner
And using xcopy instead of copy ? --Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] converting VS projects to CMake

2008-02-11 Thread Sylvain Benner
Brandon Van Every a écrit : CMake's Killer App would be a build conversion evaluator that gives hope to the project, and incrementally leads to a full translation. That is the vision. Do you want to help with that or do you want to leave me to figure it out? If I had time to help, sure I

Re: [CMake] Problem in ADD_CUSTOM_COMMAND

2008-02-11 Thread Sylvain Benner
I missed the additional quotes, the correct command is : ADD_CUSTOM_COMMAND(TARGET vpcl POST_BUILD COMMAND copy \${vpcl_path}\ \${PROJECT_SOURCE_DIR}\ VERBATIM) This is a common rule in CMake script, when you want to pass an argument, always use quotes to be sure it will not be split into

Re: [CMake] converting VS projects to CMake

2008-02-09 Thread Sylvain Benner
First of all I want to clarify some points: I talk only about large scaled development projects and I don't know anything about autoconf. What I had to do is to migrate a large project composed of dozens of Visual Studio projects with no framework to hanlde them and drive them. I decided to

Re: [CMake] converting VS projects to CMake

2008-02-09 Thread Sylvain Benner
Training and mastery is often perceived as taking too long though. I think CMake would be a lot better off if it could say, Hey presto here are some results! Enough to make people realize that their conversion isn't hopeless and imponderable, that all they really have to do is dive in and

Re: [CMake] Specifying Project Dependencies in CMakeLists.xt

2008-02-08 Thread Sylvain Benner
I have a workspace in which there are 7 projects. If we open the Workspace, then we can specify the dependencies using the menu ‘Project’-’Dependencies…’.I want to specify these dependencies among the various projects in CMakeLists.txt. Can that be done? Yes it can be done with command

Re: [CMake] Specifying Post-build step in CMakeLists.txt

2008-02-08 Thread Sylvain Benner
In Visual Studio project properties, we can specify the ‘Post-build step’ in Project settings. Can these settings be made in CMakeLists.txt? Yes it can be achieved with the command ADD_CUSTOM_COMMAND The full documentation of the commands can be found online here:

Re: [CMake] Changing Project Name

2008-02-08 Thread Sylvain Benner
Hello, Hi I have a project workspace helpers.dsw which I create through CMake. The CMakeLists.txt file for helpers contains commands add_subdirectory(vpcl) add_subdirectory(vthread) vpcl and vthread folders contain their respective CMakeLists.txt files.This setting adds the project

Re: [CMake] converting VS projects to CMake

2008-02-08 Thread Sylvain Benner
A convertion tool to CMake is not doable for large projects, because large projects need a framework to be viable. So migrating to CMake implies making or migrating to a new framework. A conversion tool could provide you with working CMakeLists.txt but you will lack a framework around them.

Re: [CMake] Problem in ADD_CUSTOM_COMMAND

2008-02-08 Thread Sylvain Benner
SET(CMAKE_COMMAND copy \${vpcl_path}\ \${PROJECT_SOURCE_DIR}\) ADD_CUSTOM_COMMAND(TARGET vpcl POST_BUILD COMMAND ${CMAKE_COMMAND} VERBATIM) I think you have forgot the ARGS argument Try this instead: ADD_CUSTOM_COMMAND(TARGET vpcl POST_BUILD COMMAND copy ARGS \${vpcl_path}\

Re: [CMake] Fwd: I am writing a for-WINCE new cmGlobalVisualStudio8WinceGenerator()

2008-01-07 Thread Sylvain Benner
Victor Huang a écrit : Hi, Guys, I am designing a new ::cmGlobalVisualStudio8WinceGenerator(), which customizes certain setting from cmGlobalVisualStudio8Generator() { this v8 has hardcored a lot of WinPC stuffs, stopping any WINCE setting from anywhere (cache, CMakeSetup, CMAKE_

Re: [CMake] escaping!

2007-12-11 Thread Sylvain Benner
I'm quite jaded about keeping CMakeLists.txt simple. As far as I'm concerned, it should be as simple as the level of complication of your build. If I want encapsulation, I write a macro. Otherwise I'll just write straight CMake script, because I'd rather read CMake script than the docs of 5

Re: [CMake] escaping!

2007-12-11 Thread Sylvain Benner
I'm quite jaded about keeping CMakeLists.txt simple. As far as I'm concerned, it should be as simple as the level of complication of your build. If I want encapsulation, I write a macro. Otherwise I'll just write straight CMake script, because I'd rather read CMake script than the docs of 5

Re: [CMake] Compilation speed with CMake/NMake combination, making it faster?

2007-12-11 Thread Sylvain Benner
* We're using an NMake build tree, is NMake particularly slow? Do any of the other makes work more efficiently? Be aware that nmake builds are much slower than using devenv, as nmake starts a cl.exe process for every single file, whereas devenv calls cl.exe with several source

Re: [CMake] Multiple configurations in a single target?

2007-12-10 Thread Sylvain Benner
Hi A single VS .vcproj file can have both debug and release configurations. How can I produce that sort of project file with CMake? Would calling CMake twice, setting CMAKE_BUILD_TYPE differently each time, do the magic? Hi, I don't understand your question, by default CMake generates

Re: [CMake] SOURCE_GROUP command

2007-12-05 Thread Sylvain Benner
In my cmake scripts I build a single list of all my cpp and h files for the project. At the end of the script I iterate over this list and add each file to the correct source group based on it's path relative to the source root. This is only for MSVC. I am running into a problem where I end

Re: [CMake] Creating a visual studio project with non .cpp or .h files in it.

2007-12-05 Thread Sylvain Benner
Here is a missing function body added to cmMakeFile. I would be glad to hear from the CMake makers of any issues using this hack, thank you. cmTarget* cmMakefile::AddGlobalTargetMP(const char *targetName, const std::vectorstd::string srcs) { cmTarget

Re: [CMake] Creating a visual studio project with non .cpp or .h files in it.

2007-12-05 Thread Sylvain Benner
Does anyone know the answer to this? We have a solution but it requires to modify CMake source code. We are using a custom ADD_TARGET command, I attached it to this post. The idea is to add a new keyword Documentation as opposed to Executable, Shared and Static. This keyword set the target to

Re: [CMake] Autogenerating CMakeLists.txt

2007-11-09 Thread Sylvain Benner
The generator would glob for files within each project, so it would be necessary to rebuild the CMakeList.txt files if meta-information is changed, or if new files are added to a project. Ideally, the generated build system should issue a warning when the CMakeLists.txt files are out of

Re: [CMake] environment variables and visual studio

2007-10-23 Thread Sylvain Benner
No, I can't. The reason I don't generate them is that they have to be portable since they are shipped to customers as a part of an SDK, and as I understand it the project files CMake generates are not portable/movable (due to absolute paths, etc). You can generate relative paths with the

Re: [CMake] Changing VS2005 Configuration

2007-10-22 Thread Sylvain Benner
When I change the build-configuration using VS2005 the file is modified: [snip] {another_id}.Debug|Win32.ActiveCfg = Release|Win32 {another_id}.Debug|Win32.Build.0 = Release|Win32 [/snip] When I run cmake from scratch and change these two terms manually with a text editor, VS2005 starts in

Re: [CMake] environment variables and visual studio

2007-10-22 Thread Sylvain Benner
Is there any way for CMake to set environment variables which can be picked up in Visual Studio's pre/post-build steps? I'm working on a system where I've got a couple of studio project included via the INCLUDE_EXTERNAL_MSPROJECT(), and I would like to be able to refer to things like

Re: [CMake] Overriding default source groups

2007-10-15 Thread Sylvain Benner
I'm wondering what the best way to override the default 'Header Files' and 'Source Files' SOURCE_GROUPs? I'm creating SOURCE_GROUPs by hand, and I don't want the default ones to be active. Looking at the code, I think it might require a source hack, but I thought I'd better check first. You

Re: [CMake] Changing VS2005 Configuration

2007-10-12 Thread Sylvain Benner
Hello, I am using Visual Studio 8 and cmake 2.4p7 and am trying to set the configuration for a specific project to 'Release'. So I added SET(CMAKE_BUILD_TYPE Release) to CMakeLists.txt and ran cmake. The Visual Studio configuration manager still lists all projects in 'Debug' configuration.

Re: [CMake] Excluding a file from a particular configuration with Visual Studio

2007-10-12 Thread Sylvain Benner
What's the canonical way of marking a file as being excluded from a given Visual Studio configuration? No this is not supported. I think it's better to use preprocessor to do this kind of stuff. --Sylvain ___ CMake mailing list CMake@cmake.org

Re: [CMake] Turning a string into a list.

2007-10-11 Thread Sylvain Benner
Try SEPARATE_ARGUMENTS. SET(Q one;two;three) SEPARATE_ARGUMENTS(Q) FOREACH(I ${Q}) MESSAGE(I = ${I}) ENDFOREACH(I) SEPARATE_ARGUMENTS do the opposite, it converts a string to a list by replacing spaces with ; In the case of Josef, nothing needs to be done since its string has already

Re: [CMake] Removing the first element from a list

2007-10-11 Thread Sylvain Benner
How does one go about removing the first element of a list Have a look to the LIST command, you'll have everything you need. LIST List operations. LIST(LENGTH list output variable) LIST(GET list element index [element index ...] output variable ) LIST(APPEND

Re: [CMake] Removing the first element from a list

2007-10-11 Thread Sylvain Benner
But this doesn't? MACRO(SHIFT RESULT LISTVAR) LIST(GET LISTVAR 1 RESULT) LIST(REMOVE_AT LISTVAR 1) ENDMACRO(SHIFT) MACRO(TEST) SET(Q ${ARGN}) WHILE(${Q}) # Get the command SHIFT(CMD Q)

Re: [CMake] How can I avoid the addition of Debug/Release to the link path?

2007-10-10 Thread Sylvain Benner
If it is something not being built by cmake, then a full path should be used, and cmake should do the right thing. LINK_DIRECTORIES should be used as a last resort. If the library does not exist at cmake run time, because it will be built by the cmake project, then it should work. If the

Re: [CMake] How can I avoid the addition of Debug/Release to the link path?

2007-10-09 Thread Sylvain Benner
I then generate Xcode projects, but they give me a warning that /path/to/Debug (or /path/to/Release) doesn't exist in the linker flag -L/path/to/{Debug,Release} (and fail because there are alongside libraries being pulled it). Apparently, cmake added the linker flag -L/path/to/Debug with the

Re: [CMake] How can I avoid the addition of Debug/Release to the link path?

2007-10-09 Thread Sylvain Benner
This has to be this way, or the cmake generated projects will not be able to find libraries in other projects of the same build type. Can someone explain the issue with this? We are using this for VTK and several other larger projects, and it works fine. -Bill Ok I understand but library

Re: [CMake] Supported configurations with Visual Studio builds

2007-10-08 Thread Sylvain Benner
What about the debug/optimized flags for TARGET_LINK_LIBARIES()? Do these work right now by taking advantage of the fact that Debug, Release, MinSizeRel, and RelWithDebInfo are hardcoded? Also, judging by code in cmLocalVisualStudio7Generator.cxx any custom build solutions that you would

Re: [CMake] Calling cmake from within cmake.

2007-10-08 Thread Sylvain Benner
In the mean time I'm doing, EXEC_PROGRAM(${CMAKE_COMMAND} ${CONFIG_SUBDIR}/${CONFIG} ARGS -G NMake Makefiles -DCMAKE_BUILD_TYPE=${CONFIG} -DBUILD_SUBTREE=1 ${CMAKE_HOME_DIRECTORY} ) However that doesn't work because the double quotes aren't escaped. How do I escape

Re: [CMake] Calling cmake from within cmake.

2007-10-08 Thread Sylvain Benner
BTW you don't need the ARGS keyword in EXEC_PROGRAM, ADD_CUSTOM_COMMAND, or ADD_CUSTOM_TARGET. It's correct but archaic. ARGS is not needed with EXECUTE_PROCESS, not EXEC_PROGRAM ; ) --Sylvain ___ CMake mailing list CMake@cmake.org

Re: [CMake] Supported configurations with Visual Studio builds

2007-10-05 Thread Sylvain Benner
If you rip out this I think you'll have an error with TRY_COMPILE. (be aware to delete your CMakeLists.txt cache each time you test your changes to be sure that the TRY_COMPILE is able to work correctly). I meant CMakeCache.txt not CMakeLists.txt, sorry. --Sylvain

Re: [CMake] Building both make files and visual studio files.

2007-10-01 Thread Sylvain Benner
Josef Karthauser a écrit : Hello again, I'm wondering what the best way to going about producing make files and visual studio files at the same time is. I want to use nmake to build my tree, but want visual studio project files so that the developers can continue to with within the visual

Re: [CMake] Project Grouping in a solution

2007-09-28 Thread Sylvain Benner
Neal Meyer a écrit : Richard, This project organization is much better, Kudos. However, most of our directories include only a single project file so there seems to be a lot of redundant folders in this type of layout, so maybe a little additional feature that if there is only a single

Re: [CMake] Confikgurations and Platforms in Visual Studio 8

2007-09-28 Thread Sylvain Benner
How are you arranging this, would you be able to let me see some of your CMakeList.txt files? It looks to me that I'm hitting a lot of edge cases in cmake, and It's not clear from the documentation, what the right way of doing this is. Can you help me avoid banging my head against the wall?

Re: [CMake] Confikgurations and Platforms in Visual Studio 8

2007-09-28 Thread Sylvain Benner
Answering my own question, after a bit of research, it appears that cmake doesn't natively deal with cross-platform building for Visual Studio Projects. Instead it tests to see whether to generate Win32 or x64 project file configurations. In the environment we've got, we want to build Win32,

Re: [CMake] Visual Studio 8 and warning levels

2007-09-28 Thread Sylvain Benner
I'm having some trouble getting a clean way to set the warning level in my projects with Visual Studio 2005. When I try this SET(CMAKE_C_WARNING_LEVEL 4) SET(CMAKE_CXX_WARNING_LEVEL 4) It seems to be ignored because the project files still have the warning level set to 3. I only want to turn

Re: [CMake] Confikgurations and Platforms in Visual Studio 8

2007-09-28 Thread Sylvain Benner
Answering my own question, after a bit of research, it appears that cmake doesn't natively deal with cross-platform building for Visual Studio Projects. Instead it tests to see whether to generate Win32 or x64 project file configurations. In the environment we've got, we want to build Win32,

Re: [CMake] include directories variable?

2007-09-27 Thread Sylvain Benner
How do I get the INCLUDE_DIRECTORIES path? I need to feed into into the search path for the swig command line. Documentation taken from a man cmake command: GET_DIRECTORY_PROPERTY Get a property of the directory. GET_DIRECTORY_PROPERTY(VAR [DIRECTORY dir] property)

Re: [CMake] Project Grouping in a solution

2007-09-27 Thread Sylvain Benner
Is there a way to group projects in a solution? Something like this would be handy CMakeProject -- ALL_BUILD -- ZERO_CHECK etc lib -- lib1 -- lib2 Possibly something that follows the file system setup. -Neal This topic has been addressed few days ago, a quick

Re: [CMake] when are variables inherited?

2007-09-26 Thread Sylvain Benner
I still don't understand when variables are inherited by subdirectories. I see that if I define the variable using cmake -D then it is the same in all subdirectories. I guess I could use an environment variable. However, if I do something like: SET (FINITO_INSTALL_DIR

Re: [CMake] when are variables inherited?

2007-09-26 Thread Sylvain Benner
hah! I see what happened. Obviously, the variable needs to be set _before_ using ADD_SUBDIRECTORY (oops). For some reason I had it after. Thanks anyway. Javier Yes, ADD_SUBDIRECTORY processes immediatly the subdirectory. Note that inherited variables actually are new variables, so if you

Re: [CMake] Visual SourceSafe and Relative Paths for MSVC

2007-09-10 Thread Sylvain Benner
It seems that although when I add a file to a library with a relative path, the resulting MSVC project contains the file with an absolute path. While it works for compiling, it doesn’t work for the Microsoft visual source safe plug-in in Visual Studio. Does Cmake support Microsoft’s visual

Re: [CMake] Bug in SOURCE_GROUP command?

2007-08-23 Thread Sylvain Benner
The bug is that both files are mapped into the same directory in the MSVS project (bbb/reader). When I change one of the directories into a different name (e.g. reader2) it works fine and the files are mapped into 2 different directories. Is this a bug or am I doing something wrong?

Re: [CMake] MSVC project names

2007-08-03 Thread Sylvain Benner
What results in having two projects in MSVC both with same name (as project names are not case sensitive) and this obviously fails. Is there some workaround for this so that I can produce library and executable of same name in one build tree Hello, I'm not sure but you can try to make 2

Re: [CMake] Visual Studio solutions

2007-07-27 Thread Sylvain Benner
Torsten Martinsen a écrit : Hi, when I use the Visual Studio 7 .NET 2003 generator, CMake generates one .vcproj file for each library/application, and one .sln file that contains all the .vcproj files, with appropriate dependencies. So far so good. What I would like in addition is a .sln

Re: [CMake] Visual Studio folders

2007-07-27 Thread Sylvain Benner
Torsten Martinsen a crit: On a related note, is it possible to use variables as an argument to the SOURCE_GROUP command? I.e. something like SOURCE_GROUP("Generated Header Files" FILES ${UIC_HEADERS} ) Yes of course you can do this, just try it :-) -Sylvain

Re: [CMake] Re: How to exclude CMakeLists.txt from generated projects?

2007-07-20 Thread Sylvain Benner
Try this: SET(CMAKE_SUPPRESS_REGENERATION 1) And the custom build step will not be generated. -Sylvain I correct this by adding that it actually removes the CMakeLists.txt from the vcproj, so it is exactly what you need. -Sylvain ___ CMake

Re: [CMake] Re: How to exclude CMakeLists.txt from generated projects?

2007-07-20 Thread Sylvain Benner
Sebastian Schuberth a écrit : The reason for this is that from time to time I need to Rebuild my solution. This makes CMake run the custom build step for all CMakeLists.txt files although they did not change, which results in VS to prompt me for every project to reload it ... quite

Re: [CMake] Multiple folder depths in VS projects

2007-06-28 Thread Sylvain Benner
Jon W a écrit : Is there a way to have more than one level of folders in Visual Studio projects? Try this : For your foo project SOURCE_GROUP(Source Files/Dir1 FILES source1.h source1.cpp ...) or SOURCE_GROUP(Source Files\\Dir1 FILES source1.h source1.cpp ...) -Sylvain

Re: [CMake] visual studio converter?

2007-06-06 Thread Sylvain Benner
Jon W a écrit : Are there any tools available to convert Visual Studio files to cmakelists.txt? I have hundreds of vcproj files and this would help make the conversion to cmake easier. I don't know if there are some tools to do this. If you don't find any tool and you have some knowledge about

Re: [CMake] Linking Behavior of Static Libraries on Windows

2007-03-22 Thread Sylvain Benner
LINK_DIRECTORIES is deprecated What do you mean by LINK_DIRECTORIES is deprecated ? As far as I know, in the documentation of this command it is not mentioned it is deprecated. Should I use another command instead of LINK_DIRECTORIES ? Thanks. --Sylvain http://www.virtools.com

Re: [CMake] Generate CMake from VisualStudio

2007-01-09 Thread Sylvain Benner
Is it possible to generate CMake files from MS .sln or .vcproj ? I'm pretty sure that there is no tool to do this. Unfortunately, you have to do it by hand by writing the new CMakeLists.txt files. -Sylvain ___ CMake mailing list CMake@cmake.org

Re: [CMake] How to get a variable that is defined in another CMakeLists.txt file

2006-12-21 Thread Sylvain Benner
On Wednesday 20 December 2006 23:38, Mike Jackson wrote: So in Project B's CMakeLists.txt file I have: SUBDIRS(${PROJECT_SOURCE_DIR}/Project_A) ADD_EXECUTABLE( MyProgram ${SOURCES}) TARGET_LINK_LIBRARIES( MyProgram ${A_LIB_OUTPUT_NAME}) As far as I understand it variables

Re: [CMake] How to get a variable that is defined in another CMakeLists.txt file

2006-12-20 Thread Sylvain Benner
You can inherit from the top level CMakelists.txt variables. So if the GET_DIRECTORY_PROPERTY command does not work for your case, you can use the SET command in the top level CMakeLists.txt which calls the command ADD_SUBDIRECTORY of your libraries A and B. Something like: IF(condition)

Re: [CMake] Ignore specific Library on Windows

2006-12-18 Thread Sylvain Benner
Hi, Hi I have a cross-platform project need set the Ignore Specific Library to libc.lib and libcmt.lib in Visual C++ .net. How can I do this in CMakeLists.txt? There are hundred more sub-projects in one solution, I do not want to hand modify this in each project properties. Thanks in

Re: [CMake] linker parameters for VS2005

2006-12-15 Thread Sylvain Benner
by semi-colons. environment: Windows XP, VS2005, CMake 2.4.5 thanks! ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake -- Sylvain Benner

Re: [CMake] linker parameters for VS2005

2006-12-15 Thread Sylvain Benner
Yianis Nikolaou a écrit : thank you very much! I guess there is no other way but to recompile CMake, right? To have this kind of flags listed in the correct row of the project properties panel, there is no other way but to patch the function and to recompile CMake.

Re: [CMake] CMake Build References

2006-11-30 Thread Sylvain Benner
One hack you could do is this Run CMake once on the project. Then grep for GUID in the CMakeCache.txt for the project. You will get a bunch of stuff like this: DumpDocumentation_GUID_CMAKE:INTERNAL=608A20C3-74D8-44BF-AD76-E758979D6DD2 You can do two things with those values. 1.

Re: [CMake] xcode projects missing files

2006-11-27 Thread Sylvain Benner
I am trying to generate an Xcode project with CMake. However, there seem to be a couple of issues with this. Firstly, the CMakeLists.txt files arn't added to the project, so updating the project files is kind of a pain. Hello, You can add this file manually with something like this:

Re: [CMake] Suggestion for CMake platform/compiler detection

2006-11-23 Thread Sylvain Benner
Yep but this is the problem... it cannot be made of small patches, how can you integrate a kind of inheritance system with small patches to CMake? It changes the API... I'm not sure to understand what you call inheritance system. There is already an inheritance system in CMake. For instance,

Re: [CMake] relative paths for visual studio generators?

2006-11-17 Thread Sylvain Benner
I'm far from a CMake expert, so maybe this answer is not optimal. To support relative path for dependencies I have patched the method: cmGlobalVisualStudio71Generator::WriteProject Here is the modified version (sorry I don't know how to do a patch file, fortunately it is a small method):

Re: [CMake] SOURCE_GROUP bug

2006-11-09 Thread Sylvain Benner
It's a known bug (#2331) and it should be fixed in the CVS. For your information, you can find the bug entry here : http://public.kitware.com/Bug/bug.php?op=showbugid=2331pos=2 Sylvain - Original Message - From: Sören Freudiger [EMAIL PROTECTED] To: cmake@cmake.org Sent: Wednesday,

Re: [CMake] generate VC project w/o VS installed.

2006-11-03 Thread Sylvain Benner
 你好! If this feature is not directly supported by CMake, there is a work around. Run CMake in an environment with Visual Studio installed and back up the cache files (folderCMakeFiles and file CMakeCache.txt). Then copy these files on your computer which does not have Visual Studio

Re: [CMake] Removing unused variables from the cache

2006-10-19 Thread Sylvain Benner
Hello, I don't know if this is possible but you can set your variable to an empty string. SET( SOME_OPTION ) Sylvain Hi, Is it possible to remove variables from the cache ? For example: OPTION( BUILD_X Descr OFF ) IF ( BUILD_X ) SET( SOME_OPTION Hello world CACHE) ELSEIF (BUILD_X)

Re: [CMake] Forcing vc guiids to be the same

2006-10-18 Thread Sylvain Benner
Hi Matthew, We had the same problem. The easiest way but not the most comfortable one is to put the CMakeCache.txt file on your server, everybody get this fileand then everybody will use the same GUIDs. Although it's not a cross-platform way to do it, we have decided to set a variable

Re: [CMake] Portable treat warnings as errors?

2006-09-19 Thread Sylvain Benner
If there is no such variable, you can still add the flag by yourself within an IF statement. IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Werror) ENDIF(CMAKE_COMPILER_IS_GNUCXX) Sylvain - Original Message - From: Kedzierski, Artur CIV NAVSURFWARCENDIV

Re: [CMake] Will ${string_${var}_string} work?

2006-09-15 Thread Sylvain Benner
Yes it should work. I encountered no issue using this trick so far. Sylvain Hi all, sorry I'm a cmake newbie and I need to know one thing. Is it safe to do e.g. SET( ABC_VAR_DEF test2 ) ... SET( MYVARIABLE VAR ) IF( ${ABC_${MYVARIABLE}_DEF} STREQUAL test2 ) # will

Re: [CMake] Remove default compiler options

2006-09-01 Thread Sylvain Benner
There is a light list of useful CMake variables here : http://www.cmake.org/Wiki/CMake_Useful_Variables Sylvain The GR option is driven by CMAKE_CXX_USE_RTTI variable. For the GS option I don't know where it is set. Is there a list of options having an influence on the way targets are

[CMake] Debugging ccmake on Xcode 2.3 with GDB

2006-07-27 Thread Sylvain Benner
Hello, I have some difficulties to debug ccmake (last CVS version) on Mac OS X Tiger with Xcode 2.3 and GDB. I setup my executable with the correct cwd and added 3 arguments to the list: -G Xcode Path_to_the_CMakelists.txt_Folder When I launch GDB with run I've got this output: (gdb)

[CMake] Cannot build CMake on MacOS 10.4.7 and XCode 2.3

2006-07-25 Thread Sylvain Benner
Hello, I'm a newbie to MacOS and XCode. I managed to build the XCode project files for CMake with the 2.4.2 binaries for Tiger. When I try to compile CMake project I've got an include error with this file "cmCPackCygwinBinaryGenerator.h" in "cmCPackGenerators.cxx". It exists on WindowsXP

Re: [CMake] Selecting runtime library on Visual Studio projects

2006-07-18 Thread Sylvain Benner
Hi, I think you can't override a flag in the current version of CMake (release or CVS) because the loop that parses the flag string do not provide this. I changed this function in order to override easily the flags in the low level configuration files. I attached the modified flag table for

Re: [CMake] Selecting runtime library on Visual Studio projects

2006-07-18 Thread Sylvain Benner
Do I really need your macro or do I need a development version of CMake to make this work? Do I need to patch and recompile CMake to use this solution? Will these changes be included in future CMake versions? The macro won't work without the modification, actually you have to patch and

Re: [CMake] Relation between .vcproj and .vcproj.cmake

2006-06-23 Thread Sylvain Benner
The .cmake version is an implementation detail of getting VS to re-run CMake at the proper time to regenerate projects. -Brad Hello, We don't use the auto-regeneration feature. Is there a variable in CMake to automatically delete this file ? Sylvain

[CMake] How to get the system date in a CMake Script ?

2006-06-16 Thread Sylvain Benner
Is there a simple way to get the system date in a CMake script ? Thank you, Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

[CMake] EXECUTE_PROCESS and writing output to a file

2006-06-16 Thread Sylvain Benner
Hi, When I specify an outputvariablein the EXECUTE_PROCESS arguments,there is nooutput in the console. Isthere a way to have both the ouput written in a variable anddisplayed on the screen? Thank you. Sylvain ___ CMake mailing list

[CMake] Build Xcode project files on a Win32 platform

2006-06-13 Thread Sylvain Benner
Hi, We want to build automatically the project files for all the platforms. We use a CMake script to launch cmake without the GUI. I was wondering if it is possible to generate any project files (XCode, VS.net, ...) on a Win32 platform with a single cmake executable. Thank you for your

Re: [CMake] Question about Windows support.

2006-06-05 Thread Sylvain Benner
I've posted a way to handle precompiled headers the 1st June. You should find it if you browse for the threads of june 2006, the name of the thread is Precompiled Headers. I don't know if it's a good way to handle it but my main concern was to do a CMakeLists.txt that is friendly to edit,

Re: [CMake] Question about Windows support.

2006-06-05 Thread Sylvain Benner
SET(CMAKE_SUPPRESS_REGENERATION TRUE) will do the same thing but without having to modifiy the source of cmake. I tried it and it works great. It is just needed to add the source file manually if CMAKE_SUPPRESS_REGENERATIONis set. IF(CMAKE_SUPPRESS_REGENERATION) LIST(APPEND TARGET_FILES

Re: [CMake] Question about Windows support.

2006-06-05 Thread Sylvain Benner
What I need is a way to add in a specific attribute in the XML project (namely UsingPrecompiledHeaders = X). This will tell the ide what to do. To write to the XML files additionnal info that it is not supported by CMake, you must write your own generator. Orextend the current generator(or

Re: [CMake] Small nitpick...

2006-05-29 Thread Sylvain Benner
 Hi Phillip, Moreover the compilation time is bigger when it prints all this "compiling..." lines. In our custom generator we don't specify any Object File and it works great. Here isthe replacement we made in our cmLocalVisualStudio7Generator : //if(objectName.size()) // { // fout

Re: [CMake] CMake and it's invocation from MS VC7

2006-05-17 Thread Sylvain Benner
. Sylvain Benner ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Must the main config file be named MakeLists.txt ?

2006-05-17 Thread Sylvain Benner
Thank you Brad, it is a perfect solution. SB - Original Message - From: Brad King [EMAIL PROTECTED] To: Sylvain Benner [EMAIL PROTECTED] Cc: cmake@cmake.org Sent: Friday, May 12, 2006 4:10 PM Subject: Re: [CMake] Must the main config file be named MakeLists.txt ? Sylvain Benner

  1   2   >