Re: [CMake] Mac Bundle installation with libraries

2010-02-26 Thread Clinton Stimpson

http://www.cmake.org/Wiki/BundleUtilitiesExample
I usually use it for 3rd party libraries, but it will also copy libraries from 
your build directory if you include your build directory in the list of paths 
to search in.

Clint

On Friday 26 February 2010 01:24:30 pm James Bigler wrote:
> How is that?  Could you provide a brief example of which function to call?
> I looked through the code and wasn't sure what I could call since almost
>  all the copies are done using execute_process which runs at configure
>  time.
> 
> James
> 
> On Fri, Feb 26, 2010 at 1:12 PM, Clinton Stimpson 
wrote:
> > Using BundleUtilities.cmake on each of the bundles should copy that
> > library into each bundle.
> >
> > Clint
> >
> > On Friday 26 February 2010 11:02:12 am James Bigler wrote:
> > > I have a project that builds a group of mac bundles that depend on a
> > >  library I also compile.  I need to install the library within the
> > > bundle to get it to be relocatable, but I have no way of doing this
> > > without creating a circular dependency.
> > >
> > > src/CMakeLists.txt:
> > >
> > > add_subdirectory(mylib)
> > > add_subdirectory(mysamples)
> > >
> > > src/mylib/CMakeLists.txt:
> > >
> > > add_library(mylib mylib.cpp mylib.h)
> > > set_target_properties(mylib PROPERTIES VERSION "2.3.4" SOVERSION "1")
> > > install(TARGETS mylib RUNTIME DESTINATION bin LIBRARY DESTINATION lib
> > > ARCHIVE DESTINATION lib)
> > >
> > > src/mysamples/CMakeLists.txt:
> > >
> > > foreach(sample fun lessfun)
> > >   add_executable(${sample} ${sample}.cpp MACOSX_BUNDLE)
> > >   target_link_libraries(${sample} mylib)
> > >
> > >   install(TARGETS ${sample} DESTINATION samples)
> > >   # I really want to install mylib in the bundle, but I don't have
> > > access to the library target anymore.
> > >   install(TARGETS mylib DESTINATION
> > > samples/${sample}.app/Contents/MacOS) endforeach()
> > >
> > > I really want to install my library within the bundle, but I don't have
> > > access to the library outside of the mylib subdirectory.  I can't
> > > create install targets in the mylib install directory, because I don't
> > > have the list of bundles to install it to until after I parse the
> > > mysamples directory and it's too late.
> > >
> > > I tried to use the LOCATION_${CMAKE_BUILD_CONFIG} variable, but because
> >
> > I'm
> >
> > > using the VERSION and SOVERSION properties on my library I only get one
> >
> > of
> >
> > > the symlinks and not all three (libmylib.dylib -> libmylib.2.3.4.dylib,
> > > libmylib.1.dylib -> libmylib.2.3.4.dylib, and libmylib.2.3.4.dylib).
> > >
> > > Is there some way I can get mylib to also install with my executable
> > > bundles?
> > >
> > > James
> 
___
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] Mac Bundle installation with libraries

2010-02-26 Thread James Bigler
How is that?  Could you provide a brief example of which function to call?
I looked through the code and wasn't sure what I could call since almost all
the copies are done using execute_process which runs at configure time.

James

On Fri, Feb 26, 2010 at 1:12 PM, Clinton Stimpson wrote:

>
> Using BundleUtilities.cmake on each of the bundles should copy that library
> into each bundle.
>
> Clint
>
> On Friday 26 February 2010 11:02:12 am James Bigler wrote:
> > I have a project that builds a group of mac bundles that depend on a
> >  library I also compile.  I need to install the library within the bundle
> >  to get it to be relocatable, but I have no way of doing this without
> >  creating a circular dependency.
> >
> > src/CMakeLists.txt:
> >
> > add_subdirectory(mylib)
> > add_subdirectory(mysamples)
> >
> > src/mylib/CMakeLists.txt:
> >
> > add_library(mylib mylib.cpp mylib.h)
> > set_target_properties(mylib PROPERTIES VERSION "2.3.4" SOVERSION "1")
> > install(TARGETS mylib RUNTIME DESTINATION bin LIBRARY DESTINATION lib
> > ARCHIVE DESTINATION lib)
> >
> > src/mysamples/CMakeLists.txt:
> >
> > foreach(sample fun lessfun)
> >   add_executable(${sample} ${sample}.cpp MACOSX_BUNDLE)
> >   target_link_libraries(${sample} mylib)
> >
> >   install(TARGETS ${sample} DESTINATION samples)
> >   # I really want to install mylib in the bundle, but I don't have access
> >  to the library target anymore.
> >   install(TARGETS mylib DESTINATION samples/${sample}.app/Contents/MacOS)
> > endforeach()
> >
> > I really want to install my library within the bundle, but I don't have
> > access to the library outside of the mylib subdirectory.  I can't create
> > install targets in the mylib install directory, because I don't have the
> > list of bundles to install it to until after I parse the mysamples
> >  directory and it's too late.
> >
> > I tried to use the LOCATION_${CMAKE_BUILD_CONFIG} variable, but because
> I'm
> > using the VERSION and SOVERSION properties on my library I only get one
> of
> > the symlinks and not all three (libmylib.dylib -> libmylib.2.3.4.dylib,
> > libmylib.1.dylib -> libmylib.2.3.4.dylib, and libmylib.2.3.4.dylib).
> >
> > Is there some way I can get mylib to also install with my executable
> > bundles?
> >
> > James
> >
>
___
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] Mac Bundle installation with libraries

2010-02-26 Thread Clinton Stimpson

Using BundleUtilities.cmake on each of the bundles should copy that library 
into each bundle.

Clint

On Friday 26 February 2010 11:02:12 am James Bigler wrote:
> I have a project that builds a group of mac bundles that depend on a
>  library I also compile.  I need to install the library within the bundle
>  to get it to be relocatable, but I have no way of doing this without
>  creating a circular dependency.
> 
> src/CMakeLists.txt:
> 
> add_subdirectory(mylib)
> add_subdirectory(mysamples)
> 
> src/mylib/CMakeLists.txt:
> 
> add_library(mylib mylib.cpp mylib.h)
> set_target_properties(mylib PROPERTIES VERSION "2.3.4" SOVERSION "1")
> install(TARGETS mylib RUNTIME DESTINATION bin LIBRARY DESTINATION lib
> ARCHIVE DESTINATION lib)
> 
> src/mysamples/CMakeLists.txt:
> 
> foreach(sample fun lessfun)
>   add_executable(${sample} ${sample}.cpp MACOSX_BUNDLE)
>   target_link_libraries(${sample} mylib)
> 
>   install(TARGETS ${sample} DESTINATION samples)
>   # I really want to install mylib in the bundle, but I don't have access
>  to the library target anymore.
>   install(TARGETS mylib DESTINATION samples/${sample}.app/Contents/MacOS)
> endforeach()
> 
> I really want to install my library within the bundle, but I don't have
> access to the library outside of the mylib subdirectory.  I can't create
> install targets in the mylib install directory, because I don't have the
> list of bundles to install it to until after I parse the mysamples
>  directory and it's too late.
> 
> I tried to use the LOCATION_${CMAKE_BUILD_CONFIG} variable, but because I'm
> using the VERSION and SOVERSION properties on my library I only get one of
> the symlinks and not all three (libmylib.dylib -> libmylib.2.3.4.dylib,
> libmylib.1.dylib -> libmylib.2.3.4.dylib, and libmylib.2.3.4.dylib).
> 
> Is there some way I can get mylib to also install with my executable
> bundles?
> 
> James
> 
___
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-26 Thread James Amundson

On 02/26/2010 09:15 AM, Bill Hoffman wrote:
 I am thinking that we should put python in the front of the list of 
names.


Great. I have a detailed argument for why that's the right choice, but 
I'll spare everyone if the decision is already made.


--Jim Amundson
___
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] Mac Bundle installation with libraries

2010-02-26 Thread James Bigler
I have a project that builds a group of mac bundles that depend on a library
I also compile.  I need to install the library within the bundle to get it
to be relocatable, but I have no way of doing this without creating a
circular dependency.

src/CMakeLists.txt:

add_subdirectory(mylib)
add_subdirectory(mysamples)

src/mylib/CMakeLists.txt:

add_library(mylib mylib.cpp mylib.h)
set_target_properties(mylib PROPERTIES VERSION "2.3.4" SOVERSION "1")
install(TARGETS mylib RUNTIME DESTINATION bin LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

src/mysamples/CMakeLists.txt:

foreach(sample fun lessfun)
  add_executable(${sample} ${sample}.cpp MACOSX_BUNDLE)
  target_link_libraries(${sample} mylib)

  install(TARGETS ${sample} DESTINATION samples)
  # I really want to install mylib in the bundle, but I don't have access to
the library target anymore.
  install(TARGETS mylib DESTINATION samples/${sample}.app/Contents/MacOS)
endforeach()

I really want to install my library within the bundle, but I don't have
access to the library outside of the mylib subdirectory.  I can't create
install targets in the mylib install directory, because I don't have the
list of bundles to install it to until after I parse the mysamples directory
and it's too late.

I tried to use the LOCATION_${CMAKE_BUILD_CONFIG} variable, but because I'm
using the VERSION and SOVERSION properties on my library I only get one of
the symlinks and not all three (libmylib.dylib -> libmylib.2.3.4.dylib,
libmylib.1.dylib -> libmylib.2.3.4.dylib, and libmylib.2.3.4.dylib).

Is there some way I can get mylib to also install with my executable
bundles?

James
___
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] [CTest] relative path in create_test_sourcelist

2010-02-26 Thread David Cole
You could do:
get_filename_component(dir "${CMAKE_CURRENT_SOURCE_DIR}/../src" ABSOLUTE)

and then use:
${dir}/testTest.cpp

Does that work?


2010/2/26 Raphaël M. 

> Hello,
>
> I'm starting to use CTest and having some trouble generating the test
> driver.
>
> Here is the cmake commands I'm using :
>
> create_test_sourcelist (Tests_src
>  TestSuite.cpp
> ../src/testTest.cpp
> )
>
> My directory structure is
>
> LoggerTest/
> - build/
> -CMakeLists.txt
> - inc/
> - src/
>  testTest.cpp   (which contains int testTest(int argc, char*[]
> argv) )
>
> When I run 'cmake .'  it generates a file called TestSuite.cpp which
> doesn't compile when I then run "make"
>
> The reason is that cmake generated a function prototype like this :
>
> /* Forward declare test functions. */
> int .._src_testTest(int, char*[]);
>
>
> (Obviously, I tested putting the CMakeLists.txt and the source files in one
> same directory, and it works, but I don't think that's an elegant solution)
>
> Does anyone have a clean solution to fix this issue and keep the
> CMakeLists.txt in a separate folder than the source files ?
>
> Thanks a lot,
>
> Raphaël Mor
>
> ___
> 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] CMake finds the wrong Python interpreter on Windows

2010-02-26 Thread Marcus D. Hanwell
On Friday 26 February 2010 10:15:06 Bill Hoffman wrote:
> Mathieu Malaterre wrote:
> the windows one prefer python
> 
> >>> over any of the named version ones...
> >> 
> >> Or find both independently and compare their versions. OTOH, the problem
> >> was the library/executable mismatch, so it doesn't matter which is
> >> found as long as the library matches the executable.
> > 
> > +1
> > There is an old bug report for cmake for this. PythonLibs should be
> > derived from a python -c"..." (see bug #2257)
> 
> We should create a new module that is FindPython that finds both of them
> and makes sure they are consistent.  We have to be careful with python
> -c because it won't work with a cross compiler.   I am thinking that we
> should put python in the front of the list of names.
> 
I have been doing some work on FindPythonLibs, and after talking with Brad 
King we concluded that having a FindPython module where components could be 
requested (as in other modules such as Qt or Boost) would be a better 
solution. I have not had much time to work on this, but if the logic were all 
in one module it would certainly be easier to ensure the logic to find the 
libraries and interpreter were consistent.

Marcus
___
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-26 Thread Bill Hoffman

Markus Duft wrote:


Performing coverage
 Cannot find any coverage files. Ignoring Coverage request.
   Use HTTP Proxy: s01en22.salomon.at:5865
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/20100226-0844/Build.xml
   Error message was: couldn't connect to host
   Problems when submitting via HTTP
Errors while running CTest

i'm using a cntlm proxy, anyone else doing this? :) i can also try to
switch back to ntlmaps if that would help some, but i don't think so.



Can you use the command line curl from this machine?

-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] CMake finds the wrong Python interpreter on Windows

2010-02-26 Thread Bill Hoffman

Mathieu Malaterre wrote:
the windows one prefer python

over any of the named version ones...

Or find both independently and compare their versions. OTOH, the problem was
the library/executable mismatch, so it doesn't matter which is found as long
as the library matches the executable.


+1
There is an old bug report for cmake for this. PythonLibs should be
derived from a python -c"..." (see bug #2257)



We should create a new module that is FindPython that finds both of them 
and makes sure they are consistent.  We have to be careful with python 
-c because it won't work with a cross compiler.   I am thinking that we 
should put python in the front of the list of names.


-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


[CMake] [CTest] relative path in create_test_sourcelist

2010-02-26 Thread Raphaël M .
Hello,

I'm starting to use CTest and having some trouble generating the test
driver.

Here is the cmake commands I'm using :

create_test_sourcelist (Tests_src
TestSuite.cpp
../src/testTest.cpp
)

My directory structure is

LoggerTest/
- build/
-CMakeLists.txt
- inc/
- src/
 testTest.cpp   (which contains int testTest(int argc, char*[] argv)
)

When I run 'cmake .'  it generates a file called TestSuite.cpp which doesn't
compile when I then run "make"

The reason is that cmake generated a function prototype like this :

/* Forward declare test functions. */
int .._src_testTest(int, char*[]);


(Obviously, I tested putting the CMakeLists.txt and the source files in one
same directory, and it works, but I don't think that's an elegant solution)

Does anyone have a clean solution to fix this issue and keep the
CMakeLists.txt in a separate folder than the source files ?

Thanks a lot,

Raphaël Mor
___
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] CTest xml encoding

2010-02-26 Thread Christian Ehrlicher
David Cole schrieb:
> On Thu, Feb 25, 2010 at 1:33 PM, Christian Ehrlicher
> mailto:ch.ehrlic...@gmx.de>> wrote:
> 
> Am 25.02.2010 18:23, schrieb David Cole:
> > Is the  block exactly the same with cmake 2.6.2 and cmake
> > 2.8.0...? Can you try it with our latest CMake 2.8.1 release
> candidate?
> > ( http://www.cmake.org/files/v2.8/?C=M;O=D )
> >
> > It should be properly utf-8 encoded with cmake 2.8.1 -- we fixed some
> > bugs related to that, but I thought the fix was in the 2.8.0
> release...
> >
> Tried with 2.6.2 and 2.8.0 - same result. I'll test 2.8.1rc tomorrow and
> also take a look if 2.8.0 was really used - not that PATH fooled me...
> 
> > Also, note: for results to show up properly on a CDash dashboard, you
> > must update the CDash version to its latest release: 1.6.2...
> >
> Did this yesterday :)
> 
> Another question: It looks like my test results are not uploaded
> although they're locally available. Any idea what's wrong here or where
> I can start debugging?
> All other xml files show up fine.
> 
> 
> Does ctest say it had problems submitting Test.xml? You can run it with
> "--debug" to get more verbose info about what's happening during a
> submission...
> 
Ok, all problems solved. The encoding is correct now - tested with
2.8.1rc3. I did not test 2.8.0.

The upload problem was a php config problem. I forgot to install
php-zlib package. I should have looked into the php logfile earlier...

Thx for the help,
Christian
___
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] Fwd: BundleUtilities problem

2010-02-26 Thread Michael Wild
Bump...

Created http://public.kitware.com/Bug/view.php?id=10337 for this.

Begin forwarded message:

> From: Michael Wild 
> Date: 22. February, 2010 4:53:07 PM GMT+01:00
> To: CMake List 
> Subject: BundleUtilities problem
> 
> Hi all
> 
> I'm using CMake-2.8.0 and have the following problem when trying to deploy a 
> Qt application (ParaView) on Mac OS X using the BundleUtilities:
> 
> When using the binary Qt installer, libQtCLucene.dylib is unfortunately 
> installed into /usr/lib, which makes get_prerequisites() (actually, the 
> culprit is gp_resolved_file_type()) think it is a system-library and doesn't 
> need to be packed up in the bundle. If, however, I force BundleUtilities to 
> do so by passing /usr/lib/libQtCLucene.dylib to fixup_bundle(), the library 
> gets packed up into the bundle and it's install_name is changed 
> appropriately, but the other libraries and executables referencing this 
> library do not get updated.
> 
> I do realize I actually should be blaming Nokia for installing something into 
> /usr/lib which doesn't belong there, but do you guys have any suggestion on 
> how to work around this issue (apart from doing it manually, of course)? 
> Probably future versions of GetPrerequisites should probably provide a 
> gp_resolved_file_type_override() hook...
> 
> Thanks in advance
> 
> Michael

___
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-26 Thread Markus Duft
Eric Noulard wrote:
[snip]
> 
> Note that some proxy do not accept to relay http-1.1 request but only http-1.0
> (I'm behind such proxy... see bug
> http://public.kitware.com/Bug/view.php?id=8903)
> 
> from cmake 2.8.1-rc1 and up you should be able to tell ctest to use http1.0
> using the
> 
> --http1.0 command line switch.

thanks for the tip. it however still doesn't work:

Performing coverage
 Cannot find any coverage files. Ignoring Coverage request.
   Use HTTP Proxy: s01en22.salomon.at:5865
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/20100226-0844/Build.xml
   Error message was: couldn't connect to host
   Problems when submitting via HTTP
Errors while running CTest

i'm using a cntlm proxy, anyone else doing this? :) i can also try to
switch back to ntlmaps if that would help some, but i don't think so.

Markus

> 
> 

___
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-26 Thread Mathieu Malaterre
On Fri, Feb 26, 2010 at 9:17 AM, Hendrik Sattler
 wrote:
> Zitat von Bill Hoffman :
>
>> Noel O'Boyle wrote:
>>
>>>
>>> Done. I've attached the result (off list). In summary it seems to be
>>> searching for python2.6.exe first, instead of python.exe.
>>>
>>
>> OK, so that is the problem
>>
>> It looks for names in this order:
>>
>> NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1
>> python2.0 python1.6 python1.5 python
>>
>>
>> It will prefer python2.6 over python in the PATH, and it has no way of
>> knowing or caring if one is cygwin or not.  I don't think there is much
>> we can do about this.
>>
>> I should have noticed this:
>> C:/Python26/python.exe
>> C:/Cygwin/bin/python2.5.exe
>>
>>
>> I suppose one fix could be to to have the windows one prefer python
>> over any of the named version ones...
>
> Or find both independently and compare their versions. OTOH, the problem was
> the library/executable mismatch, so it doesn't matter which is found as long
> as the library matches the executable.

+1
There is an old bug report for cmake for this. PythonLibs should be
derived from a python -c"..." (see bug #2257)

Cheers
-- 
Mathieu
___
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-26 Thread Hendrik Sattler

Zitat von Bill Hoffman :


Noel O'Boyle wrote:



Done. I've attached the result (off list). In summary it seems to be
searching for python2.6.exe first, instead of python.exe.



OK, so that is the problem

It looks for names in this order:

NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1
python2.0 python1.6 python1.5 python


It will prefer python2.6 over python in the PATH, and it has no way of
knowing or caring if one is cygwin or not.  I don't think there is much
we can do about this.

I should have noticed this:
C:/Python26/python.exe
C:/Cygwin/bin/python2.5.exe


I suppose one fix could be to to have the windows one prefer python
over any of the named version ones...


Or find both independently and compare their versions. OTOH, the  
problem was the library/executable mismatch, so it doesn't matter  
which is found as long as the library matches the executable.


HS




___
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-26 Thread Markus Duft
Bill Hoffman wrote:
> Bill Hoffman wrote:
>> Markus Duft wrote:
>>
>>> 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
>>>
>>
>> Did you try setting http_proxy, we just use curl, so that should work:
>>
>> http://www.cs.sunysb.edu/documentation/curl/index.html
>>
>> Can you run ctest with --debug -D ExperimentalSubmit?
>>
>> It should say what http proxy is being used.  For example:
>>  export http_proxy=foo.bar
>> ../../bin/ctest -D ExperimentalSubmit
>> ...
>> C:/hoffman/My Builds/CMake/Source/CTest/cmCTestSubmitHandler.cxx:973
>> Use HTTP Proxy: foo.bar
>> ...
>>
> Just noticed another site was doing something like this:
> 
>  "HTTP_PROXY=www-cache.usyd.edu.au"
>   "HTTP_PROXY_PORT=8080"

interesting :) any chance to get future ctests to accept the UNIXish
default http_proxy variable? that would sure make it easier to setup
such things for many people... (i don't mind setting the other variables
too, just for the future ... ;))

so, i'll try again...

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


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

2010-02-26 Thread Michael Wild

On 25. Feb, 2010, at 22:39 , James Amundson wrote:

> On 02/25/2010 12:29 PM, Bill Hoffman wrote:
>> OK, so that is the problem
>> 
>> It looks for names in this order:
>> 
>> NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 
>> python1.6 python1.5 python
>> 
> Coincidently, I had a bug report that arose from the above ordering just this 
> afternoon. It makes no sense to me. I think "python" should be the first 
> choice, not the last choice. What's the logic there?
> 
> --Jim Amundson

Probably the idea was that one wants to find the newest Python version first, 
and with the versioned pythonX.Y names this is relatively easy. With the 
unversioned name, it's not that easy...

Perhaps something like this (completely untested)?

set(_fpi_versions 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
foreach(_fpi_v IN LISTS _fpi_versions)
  string(REPLACE "." "" _fpi_n python${_fpi_v})
  if(WIN32)
# on WIN32 search registered installations first
find_executable(PYTHON_${_fpi_n}_EXECUTABLE python
  PATHS 
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_fpi_v}\\InstallPath]
  NO_DEFAULT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH
  NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
   endif()
   # then proceed to normal search
   find_executable(PYTHON_${_fpi_n}_EXECUTABLE NAMES python${_fpi_v} python)
   if(PYTHON_${_fpi_n}_EXECUTABLE)
 # if we found a python interpreter, set PYTHON_EXECUTABLE and don't search 
further
 set(PYTHON_EXECUTABLE "${PYTHON_${_fpi_n}_EXECUTABLE}")
 break()
   endif()
endforeach()


Of course, FindPythonLibs.cmake should be smartened up to first search for 
PythonInterp, and then use that result to come up with good guesses used in 
HINT. Also it should fail if it can't find the libraries/headers that match the 
interpreter that has been discovered...

Michael
___
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