Re: [CMake] file(WRITE) versus configure_file

2009-06-04 Thread James Bigler
if(NOT EXISTS ${dependency_file}) #message("configuring dependency_file = ${dependency_file}") configure_file( ${empty_file} ${dependency_file} IMMEDIATE) endif() # Always include this file to force CMake to run again next # invocation and rebuild the dependencies. #me

Re: [CMake] file(WRITE) versus configure_file

2009-06-04 Thread Eric Noulard
2009/6/4 James Bigler : > Back in the day before file(WRITE) there was write_file().  write_file() had > the problem that you couldn't use the file as input to CMake, so you had to > use configure_file. What do you mean as "input", you mean a source file in add_library or add_executable? > Does f

[CMake] Convert unix c++ compiler flags to windows compiler flags?

2009-06-04 Thread motes motes
I have these compiler flags in a CMakeList.txt file for some linux code: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -lX11 -Dcimg_use_xshm -lXext -Dcimg_use_xrandr -lXrandr -O3 -fpermissive -march=nocona -m64 -ffast-math -funroll-loops -finline-functions") Any ideas on who I convert those to win

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

[CMake] include_external_msproject creating duplicate projects in parent solution

2009-06-04 Thread David . Karr
Randy Hancock : > I'm getting duplicate projects included in my top-level solution > (*.sln file). I have a cmake project() defined at the top level and in > the test projects for convenience during development. When I use > include_external_msproject in the subprojects it also adds the > external

Re: [CMake] Custom compile command?

2009-06-04 Thread Bill Hoffman
Bob Tanner wrote: I'm moving an open source project (netrek) to cmake. Things are going great except for 1 fairly convoluted Makefile snippet listed below: Cool! I used to love Xtrek! I wasted many hours playing that at GE in the early 90's. commands_mars.o: $(PMAKE) ${srcdir}/../ntser

[CMake] file(WRITE) versus configure_file

2009-06-04 Thread James Bigler
Back in the day before file(WRITE) there was write_file(). write_file() had the problem that you couldn't use the file as input to CMake, so you had to use configure_file. Does file(WRITE) have this same restriction? I currently use a blank template file for configure_file for one of my projects

Re: [CMake] Custom compile command?

2009-06-04 Thread Michael Jackson
On Jun 4, 2009, at 4:18 PM, Bob Tanner wrote: I'm moving an open source project (netrek) to cmake. Things are going great except for 1 fairly convoluted Makefile snippet listed below: commands_mars.o: $(PMAKE) ${srcdir}/../ntserv/commands.c $(CC) $(CFLAGS) $(DEP) -DDOG -c ${srcdir}/

Re: [CMake] Trouble setting LIBRARY_OUTPUT_DIRECTORY

2009-06-04 Thread Lober, Randy
Mike - thanks for the idea - I have been blowing away my build dir to be safe all this time, i.e. rm -rf * ; cmake ../distro/zlib-1.2.3 ; make install Clint - your suggestion solved this problem. The following commands work iff they appeared prior to the add_library/add_executable statements s

[CMake] Custom compile command?

2009-06-04 Thread Bob Tanner
I'm moving an open source project (netrek) to cmake. Things are going great except for 1 fairly convoluted Makefile snippet listed below: commands_mars.o: $(PMAKE) ${srcdir}/../ntserv/commands.c $(CC) $(CFLAGS) $(DEP) -DDOG -c ${srcdir}/../ntserv/commands.c -o commands_mars.o commands

Re: [CMake] Trouble setting LIBRARY_OUTPUT_DIRECTORY

2009-06-04 Thread Clinton Stimpson
How about setting the output dir variables before specifying the libraries and executables you want. Clint Lober, Randy wrote: Thanks for the response and suggestion Mike. I had tried directly setting the value CMAKE_LIBRARY_OUTPUT_DIRECTORY once before to no avail but following your idea

Re: [CMake] Trouble setting LIBRARY_OUTPUT_DIRECTORY

2009-06-04 Thread Michael Jackson
Did you try from a clean build directory? Blow away EVERYTHING in the build directory and start over. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software E

Re: [CMake] Trouble setting LIBRARY_OUTPUT_DIRECTORY

2009-06-04 Thread Lober, Randy
Thanks for the response and suggestion Mike. I had tried directly setting the value CMAKE_LIBRARY_OUTPUT_DIRECTORY once before to no avail but following your idea I tried all three again as you list below. Unfortunately, this still does not succeed in defining a non-default creation location fo

[CMake] Running python nose tests

2009-06-04 Thread Eric Jonas
I've written a server that serves up an interface using a cross-language RPC mechanism (dbus) and currently build and unit test with cmake. But testing cross-language (and more functional) aspects of the server is easier to do from python, where I can rapidly test the RPC API. I've written a collec

Re: [CMake] for loop won't locate libs

2009-06-04 Thread e...@cs.bgu.ac.il
On Thu 04 Jun 22:01 2009 Michael Jackson wrote: > > _ > Mike Jackson mike.jack...@bluequartz.net > BlueQuartz Softwarewww.bluequartz.net > Principal Software Engineer Dayton, Ohio > > >

Re: [CMake] Trouble setting LIBRARY_OUTPUT_DIRECTORY

2009-06-04 Thread Michael Jackson
# -- Setup output Directories - SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Bin ) # - Setup the Executable output Directory - SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Bin ) # - Setup the Executable out

[CMake] Trouble setting LIBRARY_OUTPUT_DIRECTORY

2009-06-04 Thread Lober, Randy
Hello, I am a new user of cmake and I am running version 2.6-patch 4 on Linux. I am setting up a simple project to learn cmake and most everything has worked just as expected except for my attempts to define where an output library target is to be created. Here is part of the CMakeLists.txt pro

Re: [CMake] for loop won't locate libs

2009-06-04 Thread Hendrik Sattler
Am Donnerstag 04 Juni 2009 20:22:12 schrieb e...@cs.bgu.ac.il: > On Thu 04 Jun 21:15 2009 Bill Hoffman wrote: > > e...@cs.bgu.ac.il wrote: > > > On Thu 04 Jun 20:31 2009 Bill Hoffman wrote: > > >> e...@cs.bgu.ac.il wrote: > > >>> On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote: > > On Thu, Jun 04,

Re: [CMake] for loop won't locate libs

2009-06-04 Thread Michael Jackson
_ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Jun 4, 2009, at 1:22 PM, e...@cs.bgu.ac.il wrote: SET(LIB

Re: [CMake] for loop won't locate libs

2009-06-04 Thread e...@cs.bgu.ac.il
On Thu 04 Jun 21:15 2009 Bill Hoffman wrote: > e...@cs.bgu.ac.il wrote: > > On Thu 04 Jun 20:31 2009 Bill Hoffman wrote: > >> e...@cs.bgu.ac.il wrote: > >>> On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote: > On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote: > > SET(LIBS AR AR

Re: [CMake] for loop won't locate libs

2009-06-04 Thread Bill Hoffman
e...@cs.bgu.ac.il wrote: On Thu 04 Jun 20:31 2009 Bill Hoffman wrote: e...@cs.bgu.ac.il wrote: On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote: On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote: SET(LIBS AR ARMulti ARvideo) FOREACH (LIB ${LIBS}) SET(FOUND_LIB) FIND_LIBRARY(L

[CMake] include_external_msproject creating duplicate projects in parent solution

2009-06-04 Thread Randy Hancock
Hello all, It's my first post! I'm having an issue with include_external_msproject. I have a directory layout like so: CMakeLists.txt /src /common/CMakeLists.txt /string/CMakeLists.txt /time/CMakeLists.txt /test /string/CMakeLists.txt /time/CMakeLists.txt /build /src /

Re: [CMake] for loop won't locate libs

2009-06-04 Thread e...@cs.bgu.ac.il
On Thu 04 Jun 20:31 2009 Bill Hoffman wrote: > e...@cs.bgu.ac.il wrote: > > On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote: > >> On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote: > >>> SET(LIBS AR ARMulti ARvideo) > >>> FOREACH (LIB ${LIBS}) > >>>SET(FOUND_LIB) > >>>FIND_LIBR

Re: [CMake] for loop won't locate libs

2009-06-04 Thread e...@cs.bgu.ac.il
On Thu 04 Jun 20:30 2009 Tyler Roscoe wrote: > On Thu, Jun 04, 2009 at 08:22:32PM +0300, e...@cs.bgu.ac.il wrote: > > > > On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote: > > > On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote: > > > > SET(LIBS AR ARMulti ARvideo) > > > > FOREACH (LIB

Re: [CMake] for loop won't locate libs

2009-06-04 Thread Bill Hoffman
e...@cs.bgu.ac.il wrote: On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote: On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote: SET(LIBS AR ARMulti ARvideo) FOREACH (LIB ${LIBS}) SET(FOUND_LIB) FIND_LIBRARY(LIB_FOUND ${LIB} /usr/lib /usr/local/lib) SET(ARTK_LIBRARY ${ARTK_LIB

Re: [CMake] for loop won't locate libs

2009-06-04 Thread Tyler Roscoe
On Thu, Jun 04, 2009 at 08:22:32PM +0300, e...@cs.bgu.ac.il wrote: > > On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote: > > On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote: > > > SET(LIBS AR ARMulti ARvideo) > > > FOREACH (LIB ${LIBS}) > > >SET(FOUND_LIB) > > >FIND_LIBRARY(LI

Re: [CMake] Trouble starting ctest run with intention of reporting to dashboard

2009-06-04 Thread Steve Huston
Thanks for the quick assistance, David. No joy though... > After setting up the project on the CDash server, the project > administrator should be able to download the CTestConfig.cmake > from CDash to put in the source tree. Ah, ok. I did this. I don't remember reading a direction like this whil

Re: [CMake] for loop won't locate libs

2009-06-04 Thread e...@cs.bgu.ac.il
On Thu 04 Jun 20:16 2009 Tyler Roscoe wrote: > On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote: > > SET(LIBS AR ARMulti ARvideo) > > FOREACH (LIB ${LIBS}) > >SET(FOUND_LIB) > >FIND_LIBRARY(LIB_FOUND ${LIB} /usr/lib /usr/local/lib) > >SET(ARTK_LIBRARY ${ARTK_LIBRARY}

Re: [CMake] for loop won't locate libs

2009-06-04 Thread Tyler Roscoe
On Thu, Jun 04, 2009 at 07:50:08PM +0300, e...@cs.bgu.ac.il wrote: > SET(LIBS AR ARMulti ARvideo) > FOREACH (LIB ${LIBS}) >SET(FOUND_LIB) >FIND_LIBRARY(LIB_FOUND ${LIB} /usr/lib /usr/local/lib) >SET(ARTK_LIBRARY ${ARTK_LIBRARY} ${LIB_FOUND}) > ENDFOREACH(LIB) > > the result is /usr/li

Re: [CMake] Trouble starting ctest run with intention of reporting to dashboard

2009-06-04 Thread David Cole
After setting up the project on the CDash server, the project administrator should be able to download the CTestConfig.cmake from CDash to put in the source tree. Your CTestConfig.cmake does not have the proper variable definitions in it to work with CDash... for example, this is a snippet from CTe

[CMake] for loop won't locate libs

2009-06-04 Thread e...@cs.bgu.ac.il
hello, I'm trying to write a for look that will iterate on a group of libs and find the path of the lib, here is my code: SET(LIBS AR ARMulti ARvideo) FOREACH (LIB ${LIBS}) SET(FOUND_LIB) FIND_LIBRARY(LIB_FOUND ${LIB} /usr/lib /usr/local/lib) SET(ARTK_LIBRARY ${ARTK_LIBRARY} ${LIB_FOUND

Re: [CMake] Trouble starting ctest run with intention of reporting to dashboard

2009-06-04 Thread Steve Huston
Still have problems... On Linux, I cd to my main source dir... [shus...@smokey cpp]$ ctest -S ~/trunk_nightly.cmake Unable to run ctest: Cannot find file: /qpidbuilds/trunk/qpid/cpp/rhel5/DartConfiguration.tcl Site: Build name: WARNING: No nightly start time found please set in CTestConfi

Re: [CMake] Trouble starting ctest run with intention of reporting to dashboard

2009-06-04 Thread David Cole
- Download the CTestConfig.cmake from CDash - Place it at the top of your source tree (next to your main CMakeLists.txt)- No need for the --ctest-config on the ctest command line Arrange it like that, and let us know if you still have problems. HTH, David On Thu, Jun 4, 2009 at 11:03 AM, Tyler

Re: [CMake] Trouble starting ctest run with intention of reporting to dashboard

2009-06-04 Thread Tyler Roscoe
On Wed, Jun 03, 2009 at 07:21:33PM -0400, Steve Huston wrote: > C:\ace\exported\qpid> ctest -S trunk_nightly.cmake --ctest-config > trunk\qpid\cpp\CTestConfig.cmake > Unable to run ctest: > Cannot find file: > C:/ace/exported/qpid/trunk/qpid/cpp/build/DartConfiguration.tcl >Site: >Build nam