Re: [CMake] Setting environment variables prebuild

2009-03-09 Thread Alexander Neundorf
On Tuesday 03 March 2009, Kito Berg-Taylor wrote: > Hello all, > > I'm very new to cmake, so excuse me if I'm missing some obvious > functionality that cmake already has. > > I am building a project using a QNX cross-compile toolchain that I > setup. For those not familiar with the QNX toolchain, t

Re: [CMake] Joining multiple directories into one

2009-03-09 Thread Jussi Pakkanen
On Mon, Mar 9, 2009 at 4:03 PM, Brad King wrote: > By "compiler switches" do you mean real compiler flags or just preprocessor > symbol definitions?  The COMPILE_DEFINITIONS property is only for > preprocessor symbols. I actually don't know. I haven't dug that deep into the build system yet. >

Re: [CMake] Resetting include and link directories

2009-03-09 Thread Alexander Neundorf
On Thursday 05 March 2009, Steven Wilson wrote: > Is there a way to reset the directory lists created by include_directories > and link_directories? You can use set_directory_properties() with INCLUDE_DIRECTORIES or LINK_DIRECTORIES as arguments to set/reset them. Alex __

Re: [CMake] Finding packagaes build with CMake

2009-03-09 Thread Alexander Neundorf
On Thursday 05 March 2009, Klaus wrote: > Hi, > > after looking through the documentation of CMake, I am a litte confused, > how to help CMake to find packages bulit by CMake. > > The "find_package" command supports both xxx-config.cmake and > FindXXX.cmake. What is the prefered method for an pack

Re: [CMake] Joining multiple directories into one

2009-03-09 Thread Jussi Pakkanen
On Mon, Mar 9, 2009 at 4:18 PM, Mathieu Malaterre wrote: > This is the easiest way indeed. If you are still very picky (style, > convention, user mood) on where to list src file you can always list > file within subdirectory and from the toplevel directory request the > src for each directory: >

Re: [CMake] Build failure alerts

2009-03-09 Thread Alexander Neundorf
On Wednesday 04 March 2009, Iwan Aucamp wrote: > Hi > > Would it be possible to have CMAKE run a custom command with following > paramters if the build fails to compile: In general cmake is not running when something is compiled. What do you want to do ? > > * source file > * line number

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Pau Garcia i Quiles
On Mon, Mar 9, 2009 at 5:31 PM, Bill Hoffman wrote: >> By the way, is there any way to set an internal global variable in a >> VC++ project? Currently, CMake-generated Qt projects may show a wrong >> version in the property browser if the default (in the registry) Qt >> version is not the same as

Re: [CMake] How to set CPACK_SOURCE_IGNORE_FILES to remove all source code?

2009-03-09 Thread Eric Noulard
2009/3/9 David Fitzpatrick : > Thanks for the reply Eric, > > Let me clarify a few things. By binary distro I was implying an installer > package without the source code. It is true that my install commands do pull > in directories that have source code (with INSTALL( DIRECTORY bar/) ) and > header

Re: [CMake] Fwd: setting environment variable through cmake

2009-03-09 Thread Philip Lowman
On Fri, Mar 6, 2009 at 9:35 AM, ankit jain wrote: > > > 2009/2/17 Philip Lowman > >> On Mon, Feb 16, 2009 at 11:03 PM, ankit jain wrote: >> >>> Iam using cmake 2.6 >>> >> >> This should work on the latest CMake 2.6.3 RC, provided you use "make >> test". >> >> set_tests_properties(foo PROPERT

Re: [CMake] How to set CPACK_SOURCE_IGNORE_FILES to remove all source code?

2009-03-09 Thread David Fitzpatrick
Thanks for the reply Eric, Let me clarify a few things. By binary distro I was implying an installer package without the source code. It is true that my install commands do pull in directories that have source code (with INSTALL( DIRECTORY bar/) ) and header files (with INSTALL(FILE foo.h)) ex

Re: [CMake] HOW TO: build development versions, plus proper INSTALL setup?

2009-03-09 Thread kent williams
Thanks for the suggestions. I believe that if you force all your test programs to get thrown into ${XXX_BINARY_DIR}, you could do the ADD_TEST without specifying ${XXX_BINARY_DIR}/testname -- just testname would suffice. Oh and when someone says "If you can wade through the boost sources" I draw

Re: [CMake] HOW TO: build development versions, plus proper INSTALL setup?

2009-03-09 Thread Michael Jackson
The other items in your list looks like you have figured out so I'll just make a suggestion for #3: I tried the following and it does work: # All the following in its own CMakeLists.txt file that # will be called with add_subdirectory() from the top level # CMakeLists.txt file. project(UnitTe

Re: [CMake] How to set CPACK_SOURCE_IGNORE_FILES to remove all source code?

2009-03-09 Thread Eric Noulard
2009/3/9 David Fitzpatrick : > I have been working with CMake/CPack (2.6.2 and 2.6.3) for a few weeks now > and have run into a problem with creating a binary distro using Cpack and > NSIS. I would like to set a flag to remove all source code from the > installer and have no success using the CPACK

[CMake] How to set CPACK_SOURCE_IGNORE_FILES to remove all source code?

2009-03-09 Thread David Fitzpatrick
I have been working with CMake/CPack (2.6.2 and 2.6.3) for a few weeks now and have run into a problem with creating a binary distro using Cpack and NSIS. I would like to set a flag to remove all source code from the installer and have no success using the CPACK_SOURCE_IGNORE_FILES variable.

[CMake] HOW TO: build development versions, plus proper INSTALL setup?

2009-03-09 Thread kent williams
I think I've gotten myself needlessly tied into knots over EXECUTABLE_OUTPUT_PATH vs RUNTIME_OUTPUT_DIRECTORY vs INSTALL command. So maybe someone wants to talk me down about it. We have a suite of programs that are built by a nested set of directories. We'd like 2 things to happen (and a third

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Bill Hoffman
Pau Garcia i Quiles wrote: What does not work is what I am doing: I'm listing the .h files as source files so that they show in the VC++ project. Now, given that header files are marked as "excluded from build", VC++ disables right-click-and-compile for those header files. The .h file is not com

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Pau Garcia i Quiles
>> What does not work is what I am doing: I'm listing the .h files as >> source files so that they show in the VC++ project. Now, given that >> header files are marked as "excluded from build", VC++ disables >> right-click-and-compile for those header files. > > The .h file is not compiled, so that

Re: [CMake] How to use generated cmake files?

2009-03-09 Thread Stephan Springer
Am Mo, 9.03.2009, 18:43, schrieb Tyler Roscoe: > You want a custom_command (and probably a custom_target). Check out the > pattern for how to use these here: > http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_generate_an_executable.2C_then_use_the_executable_to_generate_a_file.3F > and in the next coup

Re: [CMake] How to use generated cmake files?

2009-03-09 Thread Steve Huston
Hi Stephan, > I'd like to compile a lot of generated C++ source files > which are all > generated at once with a single command. Since there are issues with > using file( GLOB_RECURSE ...) to get a list of these > generated files, I > tried to additionally generate a file called "sourcelist

Re: [CMake] How to use generated cmake files?

2009-03-09 Thread Tyler Roscoe
On Mon, Mar 09, 2009 at 06:33:19PM +0100, Stephan Springer wrote: > Now I include() this file from my CMakeLists.txt and it works as expected > - as long as that sourcelist.cmake file is already there. If it's not, > I'm getting an error "include could not find load file". > > How could I

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,

[CMake] How to use generated cmake files?

2009-03-09 Thread Stephan Springer
Hi, I'd like to compile a lot of generated C++ source files which are all generated at once with a single command. Since there are issues with using file( GLOB_RECURSE ...) to get a list of these generated files, I tried to additionally generate a file called "sourcelist.cmake" which contains

Re: [CMake] warning "safe linker search path"

2009-03-09 Thread John Biddiscombe
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, link library [libGLU.

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Bill Hoffman
Pau Garcia i Quiles wrote: On Mon, Mar 9, 2009 at 4:24 PM, Bill Hoffman wrote: Pau Garcia i Quiles wrote: Yes, I'm using QT4_WRAP_CPP (with plans to move to automoc), but that "right-click, compile to run moc" is useful (no need to close the solution or reload projects) and it's what VC++ de

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Pau Garcia i Quiles
On Mon, Mar 9, 2009 at 4:24 PM, Bill Hoffman wrote: > Pau Garcia i Quiles wrote: > >> Yes, I'm using QT4_WRAP_CPP (with plans to move to automoc), but that >> "right-click, compile to run moc" is useful  (no need to close the >> solution or reload projects) and it's what VC++ developers are used >

Re: [CMake] CPack source package path

2009-03-09 Thread Adolfo Rodríguez
OK, I get it now! I still have another question, which is somewhat unrelated. Currently, when I configure CPack from CMake, I do a set(CPACK_INSTALL_COMMANDS "some command"), which ends up setting the variable in _both_ CPackConfig.cmake CPackSourceConfig.cmake. How can I set this variable (from

[CMake] Install target problems with visual studio

2009-03-09 Thread Alexander Zimmermann
Hello, I have some problems while executing the INSTALL-target created from cmake in my visual studio project (VS 2008). Configuration looks like this: ... IF(MSVC) INSTALL(TARGETS "MY-lib_shared" "MY-lib_static" LIBRARY DESTINATION release/lib/ RUNTIME DESTINATION release/bin

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Bill Hoffman
Pau Garcia i Quiles wrote: Yes, I'm using QT4_WRAP_CPP (with plans to move to automoc), but that "right-click, compile to run moc" is useful (no need to close the solution or reload projects) and it's what VC++ developers are used to. With CMake, you can still right click and compile, it will

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Pau Garcia i Quiles
On Mon, Mar 9, 2009 at 2:58 PM, Michael Jackson wrote: > On Mar 9, 2009, at 8:57 AM, Pau Garcia i Quiles wrote: > >> On Wed, Mar 4, 2009 at 3:01 PM, Bill Hoffman >> wrote: >>> >>> Robert Dailey wrote: Hi, I noticed after switching to version 2.6.3 that header files (with HPP >

Re: [CMake] Joining multiple directories into one

2009-03-09 Thread Mathieu Malaterre
On Mon, Mar 9, 2009 at 3:03 PM, Brad King wrote: > 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 >> s

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 int

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Michael Jackson
On Mar 9, 2009, at 8:57 AM, Pau Garcia i Quiles wrote: On Wed, Mar 4, 2009 at 3:01 PM, Bill Hoffman wrote: Robert Dailey wrote: Hi, I noticed after switching to version 2.6.3 that header files (with HPP extension) are marked as "Exclude from build" in Visual Studio 2008. Is this behav

Re: [CMake] CPack source package path

2009-03-09 Thread Eric Noulard
2009/3/9 Adolfo Rodríguez : > On Mon, Mar 9, 2009 at 11:47 AM, Eric Noulard >> >> I'm not sure but >> if I remember well it should be  CPACK_TOPLEVEL_DIRECTORY. > > Hmm, I tried querying the names of all active variables and their values > (after including CPack, of course) by doing > > get_cmake_

Re: [CMake] CPack source package path

2009-03-09 Thread Adolfo Rodríguez
On Mon, Mar 9, 2009 at 11:47 AM, Eric Noulard wrote: > 2009/3/9 Adolfo Rodríguez : > > Hi, > > > > I have set up CPack to generate source and binary packages with the TGZ > > generator. As I understand, the compressed tar consists of the files > located > > in: > > ${CMAKE_BINARY_DIR}/_CPack_Packa

Re: [CMake] Concern with 2.6.3

2009-03-09 Thread Pau Garcia i Quiles
On Wed, Mar 4, 2009 at 3:01 PM, Bill Hoffman wrote: > Robert Dailey wrote: >> >> Hi, >> >> I noticed after switching to version 2.6.3 that header files (with HPP >> extension) are marked as "Exclude from build" in Visual Studio 2008. Is this >> behavior by design? If so, why? >> > You don't want t

Re: [CMake] CMake and VPATH

2009-03-09 Thread Bill Hoffman
laur...@marzu.org wrote: Hello all, I've just began trying to port my project from autoconf to CMake and I've got a question. My project use 'vpath' variable in order to locate source file from different directory according to argument pass to autoconf. Typically, my C++ source file may

[CMake] ctest --build-and-test merges all output to stdout?

2009-03-09 Thread Hugo Heden
Good day all, I am running $ ctest --build-and-test ... [etc] and it seems that ctest *merges* all output from subprocess on to *stdout* and writes nothing on *stderr*. Is this expected behaviour? Can I change it? What I would prefer would be for ctest to just "pass along" whatever the subpro

Re: [CMake] Cross Compilang and NSIS

2009-03-09 Thread Hendrik Sattler
Andreas Schneider schrieb: > My problem is that cmake thinks that it is a windows version... No, it still knows that it runs on Linux and can use the native tools if you tell it so in the toolchain file. > So you successfully *cross compile* with mingw for windows under linux and > successfully

[CMake] CMake and VPATH

2009-03-09 Thread laurent
Hello all, I've just began trying to port my project from autoconf to CMake and I've got a question. My project use 'vpath' variable in order to locate source file from different directory according to argument pass to autoconf. Typically, my C++ source file may be from src/libxml2 or src/x

Re: [CMake] CPack source package path

2009-03-09 Thread Eric Noulard
2009/3/9 Adolfo Rodríguez : > Hi, > > I have set up CPack to generate source and binary packages with the TGZ > generator. As I understand, the compressed tar consists of the files located > in: > ${CMAKE_BINARY_DIR}/_CPack_Packages/Linux-Source/TGZ/ > > I want to exclude some files from the packag

Re: [CMake] Cross Compilang and NSIS

2009-03-09 Thread Andreas Schneider
On Sunday 08 March 2009 17:22:48 Andreas Schneider wrote: > Hi, > Hi, > Now I get the error. > > File: Returning to: > "/usr/src/packages/BUILD/libssh-0.2.99.svn251/build/_CPack_Packages/win32/N >SIS/libssh-0.2.90- win32" > File: > "/usr/src/packages/BUILD/libssh-0.2.99.svn251/build/_CPack_Packag

Re: [CMake] problem with cmake script.

2009-03-09 Thread Adolfo Rodríguez
I was also fooled by that sentence some time ago, but careful reading of what the doc says after "If NO_DEFAULT_PATH is not specified, the search process is as follows:" suggests something different. What I currently do to solve the issue of nonstandard package locations is to use an environment v

Re: [CMake] Backlashes on Windows: bug or feature?

2009-03-09 Thread Pau Garcia i Quiles
Hello, That does not work. Using FILE( TO_NATIVE_PATH ) would create this shdir.c: char shdir[256]="C:\Cache2008\Mgr"; I need "\\" instead of "\" in shdir.c or the C compiler would fail. On Fri, Mar 6, 2009 at 1:06 AM, Clinton Stimpson wrote: > > How about just using forward slashes everywhere

[CMake] CPack source package path

2009-03-09 Thread Adolfo Rodríguez
Hi, I have set up CPack to generate source and binary packages with the TGZ generator. As I understand, the compressed tar consists of the files located in: ${CMAKE_BINARY_DIR}/_CPack_Packages/Linux-Source/TGZ/ I want to exclude some files from the package_source target, so I need to reference th

Re: [CMake] problem with cmake script.

2009-03-09 Thread Adolfo Rodríguez
Hi Benoit, The documentation of find_pathspecifies the order in which paths are searched. If you want to force the /opt path to be searched first, you should maybe try find_path( NAMES name PATHS ${NONSTANDARD_PATHS} NO_DEFAULT_

Re: [CMake] problem with cmake script.

2009-03-09 Thread Eric Noulard
2009/3/9 Benoit : > Hello, > > I'm having some trouble to use a cmake script correctly and i don't know > why. [...] > > Does anyone know why the result of > OpenCV_HIGHGUI_INCLUDE_DIR=/usr/include/opencv and not > /opt/opencv/1.1.0/include/opencv > even if both files /opt/opencv/1.1.0/include/ope

[CMake] problem with cmake script.

2009-03-09 Thread Benoit
Hello, I'm having some trouble to use a cmake script correctly and i don't know why. The cmake script come from the openCV library (you can find it here: http://opencv.willowgarage.com/wiki/Getting_started?action=AttachFile&do=get&target=FindOpenCV.cmake) and it search for include and library file