[CMake] Master-switch options

2012-03-22 Thread Oliver kfsone Smith
I'm looking to have a certain group of variables controlled primarily by one master setting I want the cache value to be ignored when the user explicitly provides the master variable on the command line and whenever the value of the variable changes. Put another way: When the user EXPLICITLY

Re: [CMake] Couple of library/link questions

2012-03-21 Thread Oliver kfsone Smith
Andreas Pakulat said the following on 3/20/2012 5:21 PM: - The makefiles I'm basing this on build libevent_core.lib, libevent_extras.lib and then libevent.lib which is basically the two previous libraries merged. I wanted to do: ADD_LIBRARY(libevent_core ${CoreSrcFiles}) ADD_LIBRARY(libevent_ex

Re: [CMake] Couple of library/link questions

2012-03-21 Thread Oliver kfsone Smith
Jean-Christophe Fillion-Robin said the following on 3/20/2012 5:54 PM: Hi Olivier, Assuming you have not set the flag, BUILD_SHARED_LIBS [1] set to TRUE, I will consider you are building static libraries. If this last statement is valid, it seems your approach is the right one. Ah, I actually

[CMake] How to make package depend on tests?

2012-03-05 Thread Oliver kfsone Smith
I have test and package configurations on my project, I want: cmake . make package to run force injection of the "test" target prior to building the package target. Can it be done? How? :) -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitwar

Re: [CMake] Making a variable a dependency...

2012-02-08 Thread Oliver kfsone Smith
Michael Hertling said the following on 2/6/2012 6:39 PM: On 02/06/2012 10:56 PM, Alexander Neundorf wrote: On Saturday 04 February 2012, Oliver Smith wrote: My CMakeLists uses the Subversion repository information in a couple of places (it configures a file revision.h and it uses it for the CPa

Re: [CMake] Making a variable a dependency...

2012-02-08 Thread Oliver kfsone Smith
Alexander Neundorf said the following on 2/6/2012 3:56 PM: Would it be acceptable if cmake would rerun after every build ? You could enforce that e.g. with a add_custom_command( POST_BUILD ... ) which could e.g. touch CMakeCache.txt or something. Better ideas ? We're working in a client/server

[CMake] CPack / Debian install location

2012-02-02 Thread Oliver kfsone Smith
osmith@luciddev:~/pn/WW2/src$ cmake --version cmake version 2.8.2 I can't see to get "make package" to generate Debian packages that install any place but /usr/bin. (I actually want them in /playnet/ra/bin, /playnet/ra/lib and so on) SET(CPACK_GENERATOR "DEB") SET(CPACK_INSTALL_PREFIX "

Re: [CMake] Portable revision lookup?

2012-02-02 Thread Oliver kfsone Smith
Oliver kfsone Smith said the following on 2/2/2012 4:17 PM: John Drescher said the following on 2/2/2012 3:36 PM: Cmake has support for pulling the svn and I believe git revs using cmake modules. Here is what I do for svn Much appreciated -- I just didn't think to look in the "Fin

Re: [CMake] Portable revision lookup?

2012-02-02 Thread Oliver kfsone Smith
John Drescher said the following on 2/2/2012 3:36 PM: Cmake has support for pulling the svn and I believe git revs using cmake modules. Here is what I do for svn Much appreciated -- I just didn't think to look in the "Find" package, duly noted for future reference. - Oliver -- Powered by ww

[CMake] Portable revision lookup?

2012-02-02 Thread Oliver kfsone Smith
Right now I wrap my Linux-based build process with a script that features the line REVISION=`svn info ${SRC_PATH} | awk '/^Revision/ { print $2 }'` Which is neither OS or VCS portable. I'm trying to put together a CPack configuration to make the builds, and I'd like to name the resulting i

[CMake] Compile multiple-sources at a time?

2012-01-19 Thread Oliver kfsone Smith
I realize not every build environment supports the option, but is there a way to get CMake to generate Makefiles which aggregate source files, e.g. $ g++ -pipe -o library.a lib1.cpp lib2.cpp lib3.cpp $ g++ -pipe -o exeutable file1.cpp file2.cpp file3.cpp library.a - Oliver -- Powered by www.

[CMake] Outputting VS projects under Linux

2011-04-05 Thread Oliver kfsone Smith
Is it possible to create visual studio/msbuild projects under Linux? (It would ease the flow of our automation chain, and it'd be handy for working with MonoDevelop). - Oliver ___ Powered by www.kitware.com Visit other Kitware open-source projects a

Re: [CMake] header files with visual studio

2010-11-16 Thread Oliver kfsone Smith
Michael Jackson said the following on 11/15/2010 11:56 AM: Ahh. It is a bit clearer the tract you are taking. What I am suggesting is that you only have to run the "scanner" once and keep the results in CMake syntax files so that CMake can just simply re-use the list. As you add headers during

Re: [CMake] header files with visual studio

2010-11-15 Thread Oliver kfsone Smith
Michael Jackson said the following on 11/15/2010 9:33 AM: I have been casually following this thread and I understand the OPs hesitation when trying to add thousands of files into a CMake build system but what I think one needs to think about is that you are only going to add the files ONCE f

Re: [CMake] header files with visual studio

2010-11-15 Thread Oliver kfsone Smith
Eric Noulard said the following on 11/14/2010 4:00 AM: I do (may be did?) have mental dichotomy between the "build process" I'm going to take blame there for doing a poor job of posing the original inquiry :) But may be I shall step back and just think differently about it and even if I need to

Re: [CMake] header files with visual studio

2010-11-13 Thread Oliver kfsone Smith
Michael Hertling said the following on 11/11/2010 5:23 AM: Clearly, the downside is the usage of an external dependency scanner. Yep, but radically better than having to try and manually duplicate/recreate/maintain the dependency list :) Thank you for your posts :) - Oliver _

Re: [CMake] header files with visual studio

2010-11-13 Thread Oliver kfsone Smith
Eric Noulard said the following on 11/11/2010 5:53 AM: Having a lot of source code re-use from "source modules" that can be shared between several projects is off course a necessary goal when your source code base grows and the set of projects using those goes along the same curve. My experience

Re: [CMake] header files with visual studio

2010-11-09 Thread Oliver kfsone Smith
Michael Hertling said the following on 11/6/2010 7:39 AM: stored in the ${CMAKE_BINARY_DIR}/filelist.dat script as an assignment to the variable FILELIST. Subsequently, this filelist.dat is read via INCLUDE(), so CMake keeps track of it, i.e. changing the filelist.dat results in a rebuild. Finall

Re: [CMake] header files with visual studio

2010-11-09 Thread Oliver kfsone Smith
Eric Noulard said the following on 11/6/2010 6:20 AM: Initially it may be a pain to list them but after a while its generally better to manually keep track of file (dis)appearing in your source tree. (which is usually what you do when using an IDE without CMake) I.e. if those files are/were adde

Re: [CMake] header files with visual studio

2010-11-05 Thread Oliver kfsone Smith
Michael Jackson said the following on 11/4/2010 12:34 PM: Like, others have stated: You MUST include them in the add_executable or add_library call. The macro I give above can help keep those files organized in the Project/Solution file if you want the organization to mimic the file system for

[CMake] header files with visual studio

2010-11-04 Thread Oliver kfsone Smith
Checked the faq and googled as much as I could but I couldn't find anything describing how to make visual studio include header files in the solution/project files? - Oliver ___ Powered by www.kitware.com Visit other Kitware open-source projects at

Re: [CMake] This has to have been asked before...

2010-03-08 Thread Oliver kfsone Smith
Michael Wild said the following on 3/8/2010 1:35 PM: What I did is define custom functions that wrap add_executable, add_library and target_link_libraries. Works like a charm ;-) *DUH!* Thank you :) - Oliver ___ Powered by www.kitware.com Visit

Re: [CMake] Adding a generated source to all multiple targets

2010-02-24 Thread Oliver kfsone Smith
Tyler Roscoe said the following on 2/24/2010 6:50 PM: I would write a wrapper for add_library() and/or add_executable() that does the normal add_*() stuff and then also sets up the custom command for generating the lua.*.cc files. Ok - I just wanted to make sure there wasn't some built-in way

Re: [CMake] Adding a generated source to all multiple targets

2010-02-24 Thread Oliver kfsone Smith
David Cole said the following on 2/24/2010 1:25 AM: Or this: http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F Bizzare. That's where I started. I rolled out all of my changes, stepped through recreating them based on the faq again, and this time it works.