[CMake] CMake finds the wrong Python interpreter on Windows

2010-02-24 Thread Noel O'Boyle
Hello all,

With the following CMakeLists.txt on Windows...

project(MyProject NONE)
find_package(PythonInterp)
find_package(PythonLibs)

Using CMake 2.6.4 (or CMake 2.8), I get

-- Found PythonInterp: C:/Cygwin/bin/python2.5.exe
-- Found PythonLibs: C:/Python26/libs/python26.lib

instead of

-- Found PythonInterp: C:/Python26/python.exe
-- Found PythonLibs: C:/Python26/libs/python26.lib

This is a Windows XP machine, with standard installs of Python 2.5 and
2.6 and a standard Cygwin install of Python 2.5, where my PATH
includes C:\Python26 before C:\Cygwin\bin. Why doesn't CMake just use
the Python interpreter on my path as a first appoximation?

- Noel
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] OsX bundle including Qt framework

2010-02-24 Thread Martin Guillon
Hi,

I use cmake to make an osx bundle of my qt application. During install I copy 
qt framework from my qt install dir to the Frameworks directory of my bundle.
The problem I have now is that when using ostool -L  I see that my executable 
look for qt frameworks in a dir which is the absolute path to my qt install dir.
What I want is for my executable to look in the Frameworks directory of my 
bundle.

Is there a way to do that directly during build using Cmake?

Thanks

MArtin
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] OsX bundle including Qt framework

2010-02-24 Thread Michael Jackson

http://www.cmake.org/Wiki/BundleUtilitiesExample

___
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On Feb 24, 2010, at 9:11 AM, Martin Guillon wrote:


Hi,

I use cmake to make an osx bundle of my qt application. During  
install I copy qt framework from my qt install dir to the Frameworks  
directory of my bundle.
The problem I have now is that when using “ostool –L “ I see that my  
executable look for qt frameworks in a dir which is the absolute  
path to my qt install dir.
What I want is for my executable to look in the “Frameworks”  
directory of my bundle.


Is there a way to do that directly during build using Cmake?

Thanks

MArtin
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OsX bundle including Qt framework

2010-02-24 Thread Werner Smekal
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Martin,

 
 I use cmake to make an osx bundle of my qt application. During
 install I copy qt framework from my qt install dir to the Frameworks
 directory of my bundle.

This will be done automagically using the BundleUtilities module. E.g.
in my project I do:

# fixup bundle, copy dynamic libraries into app bundle
set(APPS \${CMAKE_INSTALL_PREFIX}/${SESSA_BUNDLE_NAME}.app)  # paths
to executables
set(DIRS ${CMAKE_SOURCE_DIR}/local/Release/lib)   # directories to
search for prerequisites
INSTALL(CODE 
include(BundleUtilities)
fixup_bundle(\${APPS}\   \\   \${DIRS}\)
)

Look in the mailing list or in the net about BundleUtilities to get more
information, or look in the module.

 
 The problem I have now is that when using “ostool –L “ I see that my 
 executable look for qt frameworks in a dir which is the absolute path
 to my qt install dir.

Reason is, that if you link to a library, the reference inside the
*library* (use otool -L on that library) is used and set in the
executable as well. You need at least to set the new reference
(@executable_path/) in the executable, so that it can find the
libraries (if libraries depend on other libraries you need to change
that as well). Use install_name_tool for that.

But everything is done by the BundleUtilities macro, so you don't need
to mess around here.

HTH,
Werner

 
 What I want is for my executable to look in the “Frameworks”
 directory of my bundle.
 
 
 
 Is there a way to do that directly during build using Cmake?
 
 
 
 Thanks
 
 
 
 MArtin
 
 
 
 ___ Powered by
 www.kitware.com
 
 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe: 
 http://www.cmake.org/mailman/listinfo/cmake


- -- 
Dr. Werner Smekal
Institut fuer Angewandte Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10/134
A-1040 Wien
Austria
DVR-Nr: 0005886

email: sme...@iap.tuwien.ac.at  (GPG: EDCAF4A79)
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
   +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJLhTjHAAoJEG1QQcXtyvSnRK0H/3NwjN7DB7IH339Szs0iqTMf
3ONaiP0IIjdzer2Ak4Ao3+Yl+vVksyGCaeB/goYEy5mBbLxLNHIjY71+pS2zNk4L
62tAolQZCJfRzxv9mQVZsX92wHw5DC1mtPnyqWl1DuQu4lrp+WVQlfareC25keI/
1TBndC7A74uTz9IZJWOkUZRUgK9uHD8MRWBL4ujYJw0ocghHYjbeSxySrAGBC/oG
DRp8l6N3UfFzTRVE+FZUnBdKcMkSTQXTdzK6oBtszKwJxkCKbcI94lAOgYqA49kU
TWcxwQEbYXoXXFzI1Qo5evG2NgjDmicHluXnSuNNMTkVGoxnJbECZcoi3d5dlJU=
=TUd7
-END PGP SIGNATURE-
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OsX bundle including Qt framework

2010-02-24 Thread Martin Guillon
Thanks a lot, it now works perfectly

MArtin

-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Werner Smekal
Sent: Wednesday, February 24, 2010 3:34 PM
To: cmake@cmake.org
Subject: Re: [CMake] OsX bundle including Qt framework

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Martin,

 
 I use cmake to make an osx bundle of my qt application. During install 
 I copy qt framework from my qt install dir to the Frameworks directory 
 of my bundle.

This will be done automagically using the BundleUtilities module. E.g.
in my project I do:

# fixup bundle, copy dynamic libraries into app bundle
set(APPS \${CMAKE_INSTALL_PREFIX}/${SESSA_BUNDLE_NAME}.app)  # paths 
to executables
set(DIRS ${CMAKE_SOURCE_DIR}/local/Release/lib)   # directories to
search for prerequisites
INSTALL(CODE 
include(BundleUtilities)
fixup_bundle(\${APPS}\   \\   \${DIRS}\)
)

Look in the mailing list or in the net about BundleUtilities to get more 
information, or look in the module.

 
 The problem I have now is that when using ostool -L  I see that my 
 executable look for qt frameworks in a dir which is the absolute path 
 to my qt install dir.

Reason is, that if you link to a library, the reference inside the
*library* (use otool -L on that library) is used and set in the executable as 
well. You need at least to set the new reference
(@executable_path/) in the executable, so that it can find the libraries 
(if libraries depend on other libraries you need to change that as well). Use 
install_name_tool for that.

But everything is done by the BundleUtilities macro, so you don't need to mess 
around here.

HTH,
Werner

 
 What I want is for my executable to look in the Frameworks
 directory of my bundle.
 
 
 
 Is there a way to do that directly during build using Cmake?
 
 
 
 Thanks
 
 
 
 MArtin
 
 
 
 ___ Powered by 
 www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe: 
 http://www.cmake.org/mailman/listinfo/cmake


- --
Dr. Werner Smekal
Institut fuer Angewandte Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10/134
A-1040 Wien
Austria
DVR-Nr: 0005886

email: sme...@iap.tuwien.ac.at  (GPG: EDCAF4A79)
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
   +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJLhTjHAAoJEG1QQcXtyvSnRK0H/3NwjN7DB7IH339Szs0iqTMf
3ONaiP0IIjdzer2Ak4Ao3+Yl+vVksyGCaeB/goYEy5mBbLxLNHIjY71+pS2zNk4L
62tAolQZCJfRzxv9mQVZsX92wHw5DC1mtPnyqWl1DuQu4lrp+WVQlfareC25keI/
1TBndC7A74uTz9IZJWOkUZRUgK9uHD8MRWBL4ujYJw0ocghHYjbeSxySrAGBC/oG
DRp8l6N3UfFzTRVE+FZUnBdKcMkSTQXTdzK6oBtszKwJxkCKbcI94lAOgYqA49kU
TWcxwQEbYXoXXFzI1Qo5evG2NgjDmicHluXnSuNNMTkVGoxnJbECZcoi3d5dlJU=
=TUd7
-END PGP SIGNATURE-
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] random failures on windows INSTALL target. file INSTALL cannot copy file

2010-02-24 Thread Tim St. Clair
I've been noticing random failures on file copy operations of install
targets when they are copying a lot of files.  (e.g. - headers for a
install library)

file INSTALL cannot copy file

I've verified there is nothing in the way, and I'm uncertain what the
actual error is.
It's intermittent and only happens when copying a large number of files.

Is there a timeout parameter I can set.

-- 
Cheers,
Timothy St. Clair
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] how to find out the compiler ID of a compiler which doesn't link

2010-02-24 Thread Alexander Neundorf
On Tuesday 23 February 2010, Alexander Neundorf wrote:
 On Monday 22 February 2010, Brad King wrote:
  Alexander Neundorf wrote:
   Hi,
  
   it seems the IAR C/C++ compiler for AVR cannot generate executables,
   but only object files, and the linker has to be called explcitely on
   the generated object files:
   ftp://ftp.iar.se/WWWfiles/avr32/guides/ocavr32.pdf
  
   Which says:
   iccavr32 myfile.c
   xlink myfile.r82 -s __program_start -f lnkavr32.xcl
  
   Can this be made to work with the compiler ID detection in cmake via
   compiling a source file or is the only chance to use the new
   CMAKE_DETERMINE_COMPILER_ID_VENDOR() function ?
 
  It doesn't have to link.  We can parse the compiler id out of object
  files. Look at lines in CMakeDetermineCCompiler that set
 
CMAKE_C_COMPILER_ID_TEST_FLAGS
 
  We already try compiling with just -c to get an object file.  Add the
  equivalent flag for this compiler if necessary.  Basically we just try
  with no flag, and then with each of the flags listed in this variable.
  After each build we scan all files for the compiler id.  If the object
  file is there it should work.

 This is for the AIR compiler, and it produces an IAR .r90 file.
 CMake tries to find the string in that file, but doesn't find it.

 Here (http://public.kitware.com/Bug/view.php?id=10176) such a file is
 attached (main.r90), and now I actually found the text in it :-)
 http://public.kitware.com/Bug/file_download.php?file_id=2896type=bug

 Near the end there is the Hello world, but mixed with 6s. Very strange.

It seems this file format might be the UBROF format. But I also didn't find 
any documentation on that.
I'm thinking about just taking the binary object file, then appending all even 
bytes to it, and then appending all odd bytes to it. Then the interesting 
strings should be *somewhere* there.
Any better ideas ?

Alex
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] random failures on windows INSTALL target. file INSTALL cannot copy file

2010-02-24 Thread Tim St. Clair
1-more point, when I check, the file is actually copied.

On Wed, Feb 24, 2010 at 3:51 PM, Tim St. Clair timoth...@gmail.com wrote:
 I've been noticing random failures on file copy operations of install
 targets when they are copying a lot of files.  (e.g. - headers for a
 install library)

    file INSTALL cannot copy file

 I've verified there is nothing in the way, and I'm uncertain what the
 actual error is.
 It's intermittent and only happens when copying a large number of files.

 Is there a timeout parameter I can set.

 --
 Cheers,
 Timothy St. Clair




-- 
Cheers,
Timothy St. Clair
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] policy CMP0003 and full path, but still conflict with implicit directories

2010-02-24 Thread PG


Hi all,

I want to link a target to libraries A and B.
A is in the /usr/lib directory, and B is in another directory, say 
/some/path. My problem is that an old version of A also exists in the 
directory /some/path, and if I add this directory to the linker search 
path, /some/path/A will be found instead of /usr/lib/A.


I am using cmake 2.8 on linux (ubuntu 9.10 karmic), and found that with 
policy CMP0003, libraries with full path provided shouldn't produce 
linker search paths entry.

I made sure this policy is active by adding a
  CMAKE_POLICY(SET CMP0003 NEW)
even though I used
  CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
at the beginning of my CMakeList.txt file.

I add these to library to the linker using full path:
  TARGET_LINK_LIBRARY(target /usr/lib/A /some/path/B)

I run cmake and got the error:

CMake Warning at CMakeLists.txt:67 (add_executable):
  Cannot generate a safe linker search path for target target because files
  in some directories may conflict with libraries in implicit directories:

link library [A] in /usr/lib may be hidden by files in:
  /some/path

  Some of these libraries may not be found correctly.


I checked the file CMakeFiles/target.dir/link.txt
and get a line like
  /usr/bin/c++ [...] -L/some/path -lA -lB
where I would like to see
  /usr/bin/c++ [...] -lA /some/path/B
according to what I understood from the CMP0003 policy help page.
This:
  /usr/bin/c++ [...] -lA -L/some/path/ -lB
would also work, but as far as I understand this is not what policy 
CMP0003 should produce.



I googled for a solution, but cannot find any that corresponds to my 
case. I still don't understand why I get the -L statement while using 
policy CMP0003.


I also tried adding a
  LINK_DIRECTORIES(/usr/include)
to get at least something like
  /usr/bin/c++ [...] -L/usr/lib,/some/path -lA -lB
so /usr/lib/A will be found prior to /some/path/A, but it didn't change 
anything. I guess it is because /usr/lib is an implicit directory.



Is there a way to have this working, knowing that B is from a third 
party software, meaning that I don't have control on what files are 
present or not in the /some/path directory?
I can of course manually edit the CMakeFiles/target.dir/link.txt file 
after running cmake, but as my code is to be installed by some users on 
their own computer, I would like to avoid asking them to do this.



Pierre

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake finds the wrong Python interpreter on Windows

2010-02-24 Thread Bill Hoffman

Noel O'Boyle wrote:

Hello all,

With the following CMakeLists.txt on Windows...

project(MyProject NONE)
find_package(PythonInterp)
find_package(PythonLibs)

Using CMake 2.6.4 (or CMake 2.8), I get

-- Found PythonInterp: C:/Cygwin/bin/python2.5.exe
-- Found PythonLibs: C:/Python26/libs/python26.lib

instead of

-- Found PythonInterp: C:/Python26/python.exe
-- Found PythonLibs: C:/Python26/libs/python26.lib

This is a Windows XP machine, with standard installs of Python 2.5 and
2.6 and a standard Cygwin install of Python 2.5, where my PATH
includes C:\Python26 before C:\Cygwin\bin. Why doesn't CMake just use
the Python interpreter on my path as a first appoximation?

It should use the one in your PATH...   What is your PATH set to? Might 
be something in the PATH that confuses CMake...   I have seen issues 
with  in the PATH.


-Bill
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] policy CMP0003 and full path, but still conflict with implicit directories

2010-02-24 Thread Bill Hoffman

PG wrote:


Hi all,

I want to link a target to libraries A and B.
A is in the /usr/lib directory, and B is in another directory, say 
/some/path. My problem is that an old version of A also exists in the 
directory /some/path, and if I add this directory to the linker search 
path, /some/path/A will be found instead of /usr/lib/A.


I am using cmake 2.8 on linux (ubuntu 9.10 karmic), and found that with 
policy CMP0003, libraries with full path provided shouldn't produce 
linker search paths entry.

I made sure this policy is active by adding a
  CMAKE_POLICY(SET CMP0003 NEW)
even though I used
  CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
at the beginning of my CMakeList.txt file.

I add these to library to the linker using full path:
  TARGET_LINK_LIBRARY(target /usr/lib/A /some/path/B)

I run cmake and got the error:

CMake Warning at CMakeLists.txt:67 (add_executable):
  Cannot generate a safe linker search path for target target because files
  in some directories may conflict with libraries in implicit directories:

link library [A] in /usr/lib may be hidden by files in:
  /some/path

  Some of these libraries may not be found correctly.


I checked the file CMakeFiles/target.dir/link.txt
and get a line like
  /usr/bin/c++ [...] -L/some/path -lA -lB
where I would like to see
  /usr/bin/c++ [...] -lA /some/path/B
according to what I understood from the CMP0003 policy help page.
This:
  /usr/bin/c++ [...] -lA -L/some/path/ -lB
would also work, but as far as I understand this is not what policy 
CMP0003 should produce.



I googled for a solution, but cannot find any that corresponds to my 
case. I still don't understand why I get the -L statement while using 
policy CMP0003.


I also tried adding a
  LINK_DIRECTORIES(/usr/include)
to get at least something like
  /usr/bin/c++ [...] -L/usr/lib,/some/path -lA -lB
so /usr/lib/A will be found prior to /some/path/A, but it didn't change 
anything. I guess it is because /usr/lib is an implicit directory.



Is there a way to have this working, knowing that B is from a third 
party software, meaning that I don't have control on what files are 
present or not in the /some/path directory?
I can of course manually edit the CMakeFiles/target.dir/link.txt file 
after running cmake, but as my code is to be installed by some users on 
their own computer, I would like to avoid asking them to do this.




Can you create a small example that shows the problem you are having?

Also, you might want to run cmake --trace and make sure nothing is 
changing the policy on you...


-Bill
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] policy CMP0003 and full path, but still conflict with implicit directories

2010-02-24 Thread PG


Hi Bill,


Can you create a small example that shows the problem you are having?


what do you mean by a small example? A simple CMakeList.txt file with 
some code to compile?
I will try to to this with some code anyone could compile, but it may 
take me some time as I am booked with other things.



Also, you might want to run cmake --trace and make sure nothing is
changing the policy on you...


I checked the --trace output, and didn't find anything related to policy 
CMP0003 apart from my own CMAKE_POLICY(SET CMP0003 NEW).


I also put this
  if (POLICY CMP0003)
message(CMP0003 OK)
  else (POLICY CMP0003)
message(CMP0003 NOT OK)
  endif (POLICY CMP0003)
at the very end of my CMakeList.txt file, and around the 
target_add_link() call, and found that CMP0003 is still active.



Pierre
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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... I did an svn diff, none found...


That's half the problem solved -- the bulk of the post was, though: I 
want to automatically generate one of these per-target, so that the 
tolua runs with per-target compiler switches, and so that the resulting 
.cc file is compiled with the per-target compile flags plus any specific 
flags needed to compile that source.


I.e. the origin file is lua.pkg;
For target dbproxy I want to run tolua++ -n game 
${db_proxy_definitions} ${common_definitions} -o 
${Foo_BINARY_DIR}/lua.dbproxy.cc ${Foo_SOURCE_DIR}/lua.pkg
For target statsd I want to run tolua++ -n game ${statsd_definitions} 
${common_definitions} -o ${Foo_BINARY_DIR}/lua.statsd.cc 
${Foo_SOURCE_DIR}/lua.pkg


And to add those .cc files to their respective targets. Obviously I can 
do it by hand, duh, but I have a lot of targets, so before I do go add 
it one at a time, I just want to be sure I'm not missing some mechanism 
for saying add a variation of this to all targets or add a variation 
of this to this list of targets.


- Oliver



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2010-02-24 Thread Tyler Roscoe
On Wed, Feb 24, 2010 at 05:17:27PM -0600, Oliver kfsone Smith wrote:
 That's half the problem solved -- the bulk of the post was, though: I 
 want to automatically generate one of these per-target, so that the 
 tolua runs with per-target compiler switches, and so that the resulting 
 .cc file is compiled with the per-target compile flags plus any specific 
 flags needed to compile that source.

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.

 I.e. the origin file is lua.pkg;
 For target dbproxy I want to run tolua++ -n game 
 ${db_proxy_definitions} ${common_definitions} -o 
 ${Foo_BINARY_DIR}/lua.dbproxy.cc ${Foo_SOURCE_DIR}/lua.pkg
 For target statsd I want to run tolua++ -n game ${statsd_definitions} 
 ${common_definitions} -o ${Foo_BINARY_DIR}/lua.statsd.cc 
 ${Foo_SOURCE_DIR}/lua.pkg

If these are real examples from your code, I would strongly suggest
normalizing your variable names. If the target is called dbproxy then
making all the config variables for that target match the form
dbproxy_WHATEVER lets you say stuff like:

add_library(${this_target} ${${this_target}_SOURCE_FILES} ...)

tyler
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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 of doing 
it before I plowed ahead with that :)



I.e. the origin file is lua.pkg;
For target dbproxy I want to run tolua++ -n game
${db_proxy_definitions} ${common_definitions} -o
${Foo_BINARY_DIR}/lua.dbproxy.cc ${Foo_SOURCE_DIR}/lua.pkg
For target statsd I want to run tolua++ -n game ${statsd_definitions}
${common_definitions} -o ${Foo_BINARY_DIR}/lua.statsd.cc
${Foo_SOURCE_DIR}/lua.pkg
 

If these are real examples from your code, I would strongly suggest
normalizing your variable names. If the target is called dbproxy then
   
Hehe, no, it's not :) And I didn't make it clear where I was just using 
${...} to denote stuff from another place :)



making all the config variables for that target match the form
dbproxy_WHATEVER lets you say stuff like:

add_library(${this_target} ${${this_target}_SOURCE_FILES} ...)
   
Hmm - I didn't know you could do that, so I've been doing everything 
project relative, but then the size of this project and the number of 
sub-targets, and the huge amount of shared code between targets means 
that things aren't really organized by target, so all of the targets sit 
in one top-level project.



- Oliver

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] multicore interix'en testing

2010-02-24 Thread Markus Duft
Bill Hoffman wrote:
 Markus Duft wrote:
 Bill Hoffman wrote:
 I did not want to get into the technical thread on this issue, so I
 created a new message.  Markus, will you be able to run a dashboard for
 this platform?  It is sort of a requirement for accepting patches like
 this into CMake.  Otherwise, we are sure to break things in the future
 and not notice it.   Once we get all the tests passing we can help you
 setup a CDash client to submit nightly builds.

 my boss isn't quite happy with running nightly builds for another
 But he is happy to use open source software from that company??
 company... but still i guess i'll be running cdash in a vm here, since i
 _want_ interix support upstream ;). am i right that the cdash client
 checks out a copy, builds, tests and then reports the results to you
 (over http?)? so there is no need for any inbound connections? i'll be
 behind proxy/firewall/etc... is this configuration possible?

 Yes, ctest uses http put, and there are no inbound connections.   If you
 have a build tree, you can run make Experimental to see if it will work
 for you.   I can then send you a better dashboard script for doing the
 nightly once that is working.  Thanks.

hmm... any place where i can configure a proxy server? http_proxy is
setup correctly it seems. i can wget something from cdash.org...

Submit files (using http)
   Using HTTP submit method
   Drop site:http://www.cdash.org/CDash/submit.php?project=CMake
   Error when uploading file:
/dev/fs/E/buildbot/s01en22vm3-f_base-10.0/build/toolsbase-2010.0/var/tmp/portage/dev-util/cmake-2.8.1_rc3/work/cmake-2.8.1-rc3/Testing/20100224-1452/Build.xml
   Error message was: couldn't connect to host
   Problems when submitting via HTTP
Errors while running CTest

Markus

 
 -Bill

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake