Re: [CMake] Getting coredump from ctest

2013-03-21 Thread Sergei Nikulov
2013/3/21 Martin Sustrik 

> Hi,
>
> Is there a way to get a coredumps from failures that happen durink 'make
> test'?
>
> Thanks,
> Martin
> --
>
>
What do you mean by "get coredump"?
Any crash should produce core if ulimit -c unlimited set.
-- 
Best Regards,
Sergei Nikulov
--

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] Is there an easy way to time how long build parts take.

2013-03-21 Thread Eric Noulard
2013/3/21 Miller Henry :
> Our build it taking a long time, (15+ minutes even when with a massive build
> farm to distribute compiles across), and the question keeps coming up: what
> is actually taking so long.  Is there an easy way to measure?

Your build certainly have a lot of different targets.
1) first you can have a broad look at the overall target dependencies
cd 
cmake --graphiz=yourproject.dot .
then render/display the dot file with graphviz dot tool.

2) Try to measure the time of the build of the leaf node of the preceding graph
in order to see if any target takes a big part of the build.

With this rough target by target analysis you should begin to have some idea
on where is the problem.

Some complementary questions:

1) Where do your source tree and build tree reside?
Are they on a local disk or a network share?
If they are on a network share could try a pure "local disk" build
and compare the timings.

2) Which generator/build tool do you use?
Ninja, Make, on the command line? from within eclipse/codeblocks?

> If there are some top 10 files we might be able to split them (reducing some
> includes).  If it is a link step we might be able to reduce dependencies.
> Maybe a couple unit tests (some frameworks give this information but not
> all)? I don’t know how to get data so it is difficult to attack the problem.
>
> We are using cmake 2.8.10.1  (a few random people have 2.8.11-rc1, results
> are encouraging: we intend to update everyone when it is released) on ubuntu
> lucid.

Does the "build/make" take 15+ minutes or the "configuration/CMake" part?
How does a no-op build behave? i.e. when you've just build your project
how much time takes a second (normally no-op) build in the same build tree?


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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] 2.8.11rc1 - OSX Lion and Xcode 4.4.1

2013-03-21 Thread Nicholas Yue

On 22/03/13 2:19 AM, Sean McBride wrote:

On Thu, 21 Mar 2013 22:27:41 +1100, Nicholas Yue said:


 I am trying out CMake 2.8.11rc1 on OS X Lion with XCode 4.4.1

My dashboard here:


Is running OS X 10.7.5, CMake 2.8.11rc1, and Xcode 4.4.1.  It's able to build 
(nightly) CMake itself, are you?

I am running OS X 10.7.4

I am able to build CMake itself successfully.

It's just that cmakexbuild is not able to compile a simple project which 
it creates itself. The simple project is just a single helloworld.cpp 
i.e. ADD_EXECUTABLE ( helloworld helloworld.cpp)


Cheers

--
Nicholas Yue
Graphics - RenderMan, Visualization, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools

--

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] Getting coredump from ctest

2013-03-21 Thread Martin Sustrik

Hi,

Is there a way to get a coredumps from failures that happen durink 'make 
test'?


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


[CMake] Building an external library based on autotools

2013-03-21 Thread Lucas Soltic
Hello,

I'm having a hard time figuring out which solution to choose to build a library 
(FFmpeg) based on autotools from CMake, and I have the impression I'm going the 
tricky way.

I know how to run the FFmpeg's configure and make scripts with the right 
options from a bash script. I made a CMake function (based on 
add_custom_command()) that is able to run any bash script on both Windows and 
Unix OSs. Thus I could manually (from CMake) launch a FFmpeg build with the 
previous statements.

But the main disadvantage with this solution is the following one: the enabled 
video decoders are defined in a CMake variable (a list) that the user can 
define in the CMake GUI; I would like FFmpeg to be rebuilt only when this 
variable changes, but at the moment FFmpeg is always rebuilt.

FFmpeg is based on autotools (configure, make, etc). I've read a lot about 
add_custom_command(), add_custom_target() and ExternalProject_Add() but I still 
don't know what's the way to go.

The issues I've seen with these are:
- add_custom_command() will be always executed when I build the target that 
needs FFmpeg, even if FFmpeg is already built and that no setting changed
- add_custom_target() is always built too
- ExternalProject_Add() would directly execute the configure command without 
going through my portable bash launcher (see P.S.)

What I would like is my custom build to be dependent on some CMake variables, I 
don't know if it's possible.

Dependencies about some output files isn't the most important to me, because I 
won't be modifying the FFmpeg sources more than once every few months. And the 
FFmpeg sources are already in my repo so I've no need for automatic download.

Regards,
Lucas SOLTIC



P.S.: details about the portable Bash launcher for those who'd like to know:

The portable Bash launcher I made still requires MinGW to be installed if one 
wants to build from Visual Studio, but the user doesn't need to care about any 
command line interpreter. It's composed of 3 files: RunShellCommand.cmake, 
BatchBridgeToShell.bat and RunShellCommand.sh. When being run from Visual 
Studio, RunShellCommand() (defined in RunShellCommand.cmake) will run the bat 
file that will run the shell script. Otherwise RunShellCommand() will directly 
launch RunShellCommand.sh.

RunShellCommand.cmake is as follow:
function(RunShell target phase shell_command)
set(cmd ${ARGV})
list(REMOVE_AT cmd 0 1)

if (MSVC)
add_custom_command(TARGET ${target}
 ${phase}
 COMMAND BatchBridgeToShell ARGS ${MINGW_DIR} ${cmd}
 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) 
else()
add_custom_command(TARGET ${target}
 ${phase}
 COMMAND bash ARGS -c \"${cmd}\"
 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) 
endif()
endfunction(RunShell)


BatchBridgeToShell.bat is as follows:
PATH %1/msys/1.0/bin;%1/bin;%path%
bash -c "./RunShellCommand.sh --from-batch %*"

RunShellCommand.sh is as follows:
#!/bin/bash

# Shell script to run the command given as parameter
# If this script is called from a batch script, it is expected to have 
# two unneeded parameters

if [ "$1" == "--from-batch" ]
  then
shift # drop --from-batch
shift # drop mingw param
fi

# execute
$@


--

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] Is there an easy way to time how long build parts take.

2013-03-21 Thread Miller Henry
Our build it taking a long time, (15+ minutes even when with a massive build 
farm to distribute compiles across), and the question keeps coming up: what is 
actually taking so long.  Is there an easy way to measure?

If there are some top 10 files we might be able to split them (reducing some 
includes).  If it is a link step we might be able to reduce dependencies. Maybe 
a couple unit tests (some frameworks give this information but not all)? I 
don't know how to get data so it is difficult to attack the problem.

We are using cmake 2.8.10.1  (a few random people have 2.8.11-rc1, results are 
encouraging: we intend to update everyone when it is released) on ubuntu lucid.


--

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] patch proposal for PythonInterp

2013-03-21 Thread Rolf Eike Beer
Yngve Inntjore Levinsen wrote:
> On 21. mars 2013 12:00, Rolf Eike Beer wrote:
> > Am 21.03.2013 11:03, schrieb Yngve Inntjore Levinsen:
> >> Hi,
> >> 
> >> I have a suggestion for the PythonInterp. On a system I am compiling my
> >> code on, I need to find the python binary which is newer than 2.5.
> >> However, the default /usr/bin/python is 2.4.
> >> 
> >> If I then set the variable (which is not documented in the header by the
> >> way) PythonInterp_FIND_VERSION to 2.5, it will first search for the
> >> 
> >> following list of binary names:
> >> python2.5 python2 python.
> > 
> > This looks like you are using CMake 2.8.7 or before. Upgrade.

> cmake --version
> cmake version 2.8.10.2
> 
> Have a look at line 64 and 79 of FindPythonInterp.cmake. If e.g.
> PythonInterp_FIND_VERSION is set to 2.5, then _Python_NAMES in line 64
> is equal to "python2.5;python2;python" It then finds python2 or python.
> Since PYTHON_EXECUTABLE then is found in line 79, it does not check the
> other versions (2.6 and 2.7). Or?

Oh, you are right. It takes the other versions only into account after doing a 
first find attempt. This is because it tries to pick up the systems default 
python for a given major first, e.g. whatever you have configured for python 
2.x. But what it doesn't do is drop and search more if that is a too old 
version. Patches welcome.

Eike
-- 


signature.asc
Description: This is a digitally signed message part.
--

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] Accessing data

2013-03-21 Thread Todd Greer
Eric Noulard said:

> Instead of copying you could use
> cmake -E create_symlink
> but this won't work on Windows.

If building on Windows is required, you could make a symlink, hardlink, or 
junction point. If on Vista or later, look at the command mklink. Symlinks 
require admin privileges, but I've read that's not true of hardlinks or 
junction points.

If you have to support building on the FAT filesystem, none of that will work.

--
Todd Greer
Principal Scientist, Affinegy, Inc.


--

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] patch proposal for PythonInterp

2013-03-21 Thread Yngve Inntjore Levinsen
On 21. mars 2013 12:00, Rolf Eike Beer wrote:
> Am 21.03.2013 11:03, schrieb Yngve Inntjore Levinsen:
>> Hi,
>>
>> I have a suggestion for the PythonInterp. On a system I am compiling my
>> code on, I need to find the python binary which is newer than 2.5.
>> However, the default /usr/bin/python is 2.4.
>>
>> If I then set the variable (which is not documented in the header by the
>> way) PythonInterp_FIND_VERSION to 2.5, it will first search for the
>> following list of binary names:
>> python2.5 python2 python.
>
> This looks like you are using CMake 2.8.7 or before. Upgrade.
>
> Eike
> -- 

cmake --version 
cmake version 2.8.10.2

Have a look at line 64 and 79 of FindPythonInterp.cmake. If e.g.
PythonInterp_FIND_VERSION is set to 2.5, then _Python_NAMES in line 64
is equal to "python2.5;python2;python" It then finds python2 or python.
Since PYTHON_EXECUTABLE then is found in line 79, it does not check the
other versions (2.6 and 2.7). Or?

Cheers,
Yngve

--

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] 2.8.11rc1 - OSX Lion and Xcode 4.4.1

2013-03-21 Thread Sean McBride
On Thu, 21 Mar 2013 22:27:41 +1100, Nicholas Yue said:

> I am trying out CMake 2.8.11rc1 on OS X Lion with XCode 4.4.1

My dashboard here:


Is running OS X 10.7.5, CMake 2.8.11rc1, and Xcode 4.4.1.  It's able to build 
(nightly) CMake itself, are you?

Cheers,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada


--

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 avoid having /D _MBCS ?

2013-03-21 Thread Martin Koller
On Thursday 21 March 2013 15:29:18 John Drescher wrote:
> On Thu, Mar 21, 2013 at 10:20 AM, Martin Koller  wrote:
> > In my win project, when I use the visual studio generator (64bit), I always 
> > get the /D _MBCS flag in the compiler options
> > (started with msbuild).
> > When I generate Makefiles with the same project (JOM NMakefiles), _MBCS is 
> > not defined.
> > I do not want to have it defined. How can I avoid it and still using 
> > vcxproj files ?
> > --
> 
> I would use remove_definitions(-D_MBCS)

ok, thanks.
What I do not like here is:

> x:\x64\VC.110>cmake --help-command remove_definitions
> cmake version 2.8.10.2
>   remove_definitions
>Removes -D define flags added by add_definitions.

=> I did not use add_definitions, therefore it looks like a hack to
remove something I did not add.

But I grepped the cmake sources and found another solution:
I need to add the "/D _SBCS" flag. If that's set, cmake does not generate the 
_MBCS define

-- 
Best regards/Schöne Grüße

Martin

A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

This mail was not scanned before sending.
It was sent from a secure Linux desktop.
--

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 avoid having /D _MBCS ?

2013-03-21 Thread John Drescher
On Thu, Mar 21, 2013 at 10:20 AM, Martin Koller  wrote:
> In my win project, when I use the visual studio generator (64bit), I always 
> get the /D _MBCS flag in the compiler options
> (started with msbuild).
> When I generate Makefiles with the same project (JOM NMakefiles), _MBCS is 
> not defined.
> I do not want to have it defined. How can I avoid it and still using vcxproj 
> files ?
> --

I would use remove_definitions(-D_MBCS)

x:\x64\VC.110>cmake --help-command remove_definitions
cmake version 2.8.10.2
  remove_definitions
   Removes -D define flags added by add_definitions.

 remove_definitions(-DFOO -DBAR ...)

   Removes flags (added by add_definitions) from the compiler command
   line for sources in the current directory and below.

John
--

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] How to avoid having /D _MBCS ?

2013-03-21 Thread Martin Koller
In my win project, when I use the visual studio generator (64bit), I always get 
the /D _MBCS flag in the compiler options
(started with msbuild).
When I generate Makefiles with the same project (JOM NMakefiles), _MBCS is not 
defined.
I do not want to have it defined. How can I avoid it and still using vcxproj 
files ?
-- 
Best Regards/Schöne Grüße

Martin

-
Ing. Martin Koller , mailto:martin.kol...@etm.at , http://www.etm.at
ETM professional control GmbH, A-7000 Eisenstadt Marktstr. 3
Phone:+43 2682/741-62603, Fax:+43 2682/741-52555
-
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?


--

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] CPack RPM with COMPONENTS packaging

2013-03-21 Thread Eric Noulard
2013/3/20 Theodore Papadopoulo :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Actually, this patch works better... and is much simpler.

Yes right.
Some other modifications of yours in
Source/cmFindBase.cxx
Source/cmFindLibraryCommand.cxx

Do not belong to that problem, right?
I'll strip them off.


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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] CPack RPM with COMPONENTS packaging

2013-03-21 Thread Eric Noulard
2013/3/20 Theodore Papadopoulo :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 03/20/2013 05:01 PM, Eric Noulard wrote:
>> 2013/3/20 Theodore Papadopoulo :
>
 And do you observe differences when you do  that?
>>>
>>> As I said above, no there is no difference in my case because the
>>> set of file is fixed. But the difference will appear if a new
>>> file is added in a component.
>>
>> No I don't think so, but I shall check with an example.
>
> I'm confident you will see the problem.
>
>> Theoretical explanation is:  the variable (@ or $) get expanded
>> when CPack runs (i.e. at CPack time) not when CMake runs (i.e. at
>> CMake time) so adding a file to the component implies
>> CMakeLists.txt change which will trigger CMake re-run then when
>> CPack run the content of CPACK_RPM_* will be updated as well.
>
> But then the $ should be escaped because the ${} are also expanded in
> the string of the file(WRITE ...).

Yes right off-course I make a confusion and forgot we
write
then configure etc...

We need \@.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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] 2.8.11rc1 - OSX Lion and Xcode 4.4.1

2013-03-21 Thread Nicholas Yue

Hi,

I am trying out CMake 2.8.11rc1 on OS X Lion with XCode 4.4.1

When I use the "Xcode" generator, I get the following messages
=
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/nicholas/temp/xcode/build
=

When I attempt to do a build regardless of the above, I get the 
following


=
Xcode 4.4.1
Build version 4F1003
Tan-Meng-Yues-MacBook:build nicholas$ xcodebuild
=== BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT Project WITH THE 
DEFAULT CONFIGURATION (Debug) ===

Check dependencies

PhaseScriptExecution "CMake Rules" 
build/Project.build/Debug/ZERO_CHECK.build/Script-3F926441115C46B2986F8D6A.sh

cd /Users/nicholas/temp/xcode
/bin/sh -c 
/Users/nicholas/temp/xcode/build/Project.build/Debug/ZERO_CHECK.build/Script-3F926441115C46B2986F8D6A.sh

echo ""

make -f /Users/nicholas/temp/xcode/build/CMakeScripts/ReRunCMake.make
make[1]: *** No rule to make target 
`/Users/nicholas/temp/xcode/build/CMakeFiles/2.8.11-rc1/CMakeCCompiler.cmake', 
needed by 
`/Users/nicholas/temp/xcode/build/CMakeFiles/cmake.check_cache'. Stop.

make: *** [/Users/nicholas/temp/xcode/build/CMakeFiles/ZERO_CHECK] Error 2
Command /bin/sh failed with exit code 2


** BUILD FAILED **


The following build commands failed:
PhaseScriptExecution "CMake Rules" 
build/Project.build/Debug/ZERO_CHECK.build/Script-3F926441115C46B2986F8D6A.sh

(1 failure)
=


Cheers

--
Nicholas Yue
Graphics - RenderMan, Visualization, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools

--

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] patch proposal for PythonInterp

2013-03-21 Thread Rolf Eike Beer

Am 21.03.2013 11:03, schrieb Yngve Inntjore Levinsen:

Hi,

I have a suggestion for the PythonInterp. On a system I am compiling 
my

code on, I need to find the python binary which is newer than 2.5.
However, the default /usr/bin/python is 2.4.

If I then set the variable (which is not documented in the header by 
the

way) PythonInterp_FIND_VERSION to 2.5, it will first search for the
following list of binary names:
python2.5 python2 python.


This looks like you are using CMake 2.8.7 or before. Upgrade.

Eike
--

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] 2.8.11rc1 CMAKE_LINKER and CMAKE_OBJCOPY sporadically vanishing

2013-03-21 Thread Nils Gladitz
I am trying out CMake 2.8.11rc1 on windows and linux continuous build 
clients.


During clean full rebuilds everything seems to work fine.
During incremental "Continuous" builds with reused build directories 
however CMAKE_OBJCOPY (on linux gcc; used by me manually) and 
CMAKE_LINKER (on windows MSVC; used by the static link step) sometimes 
seem to go missing (the variables are suddenly empty?).


I haven't been able to reliably reproduce or find the issue behind it 
but at least the CMAKE_OBJCOPY problem seems to have gone away by me 
manually including CMakeFindBinUtils in the context where I used it.


When CMAKE_LINKER goes empty I get Dashboard (CDash) errors like this:
Command: "/lib" "/nologo" [...] <- notice the missing linker 
executable name at the beginning
Exit Condition: Error administrating child process: The parameter 
is incorrect


Nils

--
Nils Gladitz, B.Sc.
DICOM, Konnektivität und Entwicklung

Scivis wissenschaftliche Bildverarbeitung GmbH
Bertha-von-Suttner-Str. 5
D-37085 Göttingen
GERMANY
Handelsregister Nr. / Trade Register No. B3100 Göttingen
Geschäftsführer / Managing Directors Dr. Gernot Ebel, Dr. Uwe Engeland

Tel: 0049 (0)551 634181-28
E-Mail: glad...@scivis.de
Web: www.scivis.de

--

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] patch proposal for PythonInterp

2013-03-21 Thread Yngve Inntjore Levinsen
Hi,

I have a suggestion for the PythonInterp. On a system I am compiling my
code on, I need to find the python binary which is newer than 2.5.
However, the default /usr/bin/python is 2.4.

If I then set the variable (which is not documented in the header by the
way) PythonInterp_FIND_VERSION to 2.5, it will first search for the
following list of binary names:
python2.5 python2 python.

It then finds python2 (and would find python) which points to python2.4.
I do not have python2.5 on this system, only 2.6.

Now I know my way around this myself, but I think the implementation of
this script would be nicer with the attached patch. The list of binary
names in the first search then becomes:
python2.5 python2.7 python2.6 python2.5 python2 python

Any comments? Do people agree? Am I missing some important reason for
the current behaviour?

Cheers,
Yngve
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 7fb65b8..60a0f53 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -39,15 +39,17 @@ if(PythonInterp_FIND_VERSION)
 if(PythonInterp_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
 string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonInterp_FIND_VERSION}")
 string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
-list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ_MIN} python${_PYTHON_FIND_MAJ})
+list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ_MIN})
 unset(_PYTHON_FIND_OTHER_VERSIONS)
 if(NOT PythonInterp_FIND_VERSION_EXACT)
 foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
 if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
 list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
+list(APPEND _Python_NAMES python${_PYTHON_V})
 endif()
  endforeach()
 endif()
+list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ})
 unset(_PYTHON_FIND_MAJ_MIN)
 unset(_PYTHON_FIND_MAJ)
 else()
--

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