Re: [CMake] How to create a 64-bit Windows build of cmake?

2011-08-01 Thread John Drescher
On Mon, Aug 1, 2011 at 10:02 PM, John R. Cary  wrote:
> On 8/1/11 7:04 PM, John Drescher wrote:
>>
>> On Mon, Aug 1, 2011 at 8:34 PM, John R. Cary  wrote:
>>>
>>> I believe I have followed what I have found on the web for
>>> building a Win64 version of CMake.  I have downloaded the
>>> win32 version and used it to configure the cmake source.
>>> I used the Visual Studio 9 2008 Win64 generator.
>>>
>> Last Friday I pulled in the cmake-git configured for 64 bit Visual
>> Studio 2010 and generated.
>
> Thanks!  I will try.  I found http://www.vtk.org/Wiki/CMake/Git.
> So then I did:
>
> git clone git://cmake.org/cmake.git CMake
> cd CMake
> git checkout -b release origin/release
>
> Where do I find "the cmake-git configured for 64 bit Visual
> Studio 2010"?
>

You need to use a 32 bit version of cmake to configure and generate.

Open up cmake-gui,
set the source folder to where you put the git.

set the binary folder to a location you want to build cmake. Note:
this should not be in the same folder as the source.

Then configure. cmake will ask you to select the compiler.

After this you want to build cmake-gui as well. There is a
configuration option for that. Also cmake probably will not find Qt so
you need to set the location of qmake to a 64 bit build of Qt. You
will most likely have to build that since nokia does not supply 64 bit
windows binaries.

Then generate.

This will create a visual studio project in the binary folder.

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


Re: [CMake] How to create a 64-bit Windows build of cmake?

2011-08-01 Thread John R. Cary

On 8/1/11 7:04 PM, John Drescher wrote:

On Mon, Aug 1, 2011 at 8:34 PM, John R. Cary  wrote:

I believe I have followed what I have found on the web for
building a Win64 version of CMake.  I have downloaded the
win32 version and used it to configure the cmake source.
I used the Visual Studio 9 2008 Win64 generator.


Last Friday I pulled in the cmake-git configured for 64 bit Visual
Studio 2010 and generated.


Thanks!  I will try.  I found http://www.vtk.org/Wiki/CMake/Git.
So then I did:

git clone git://cmake.org/cmake.git CMake
cd CMake
git checkout -b release origin/release

Where do I find "the cmake-git configured for 64 bit Visual
Studio 2010"?



Opened the project it generated and built
release. Then I built the package target and installed the package and
I had a 64 bit version of cmake. Although with this said I have yet to
see a reason to need CMake to be 64 bit except for the install
location being Program Files instead of Program Files (x86).


The only thing I see is the loading of dll's.

Thx.   John Cary
___
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] Gathering up required shared libraries

2011-08-01 Thread Gregory Crosswhite
Hey everyone,

I am using CMake to build a package which has the normal unix layout,
i.e. programs are in bin/, libraries are in lib/, etc., and I would like
to simply copy all of the required shared non-system libraries into lib/
and make sure that the executable is updated to look for them there so
that I can have an standalone distribution.  CMake *almost* supports
this with fixup_bundle, but unless I am missing something it doesn't
seem to give me any control as to where the shared libraries are
installed, and it doesn't update the executable except on OSX --- though
the latter is not a big deal since if I understand correctly I can just
add @executable_path@/../lib to the RPATH.  Furthermore, on Linux it
incorrectly assumes that libraries in /usr/lib should be considered
system libraries (that is, guaranteed to be available everywhere), when
in fact only libraries in /lib should be, which means that I can't even
easily use get_prerequisites directly to find all of the libraries that
I need and then copy them to the correct location myself.

(Of course, an alternative would be to just statically-link everything,
but frankly having searched around it looks like it is simply impossible
for me to force all non-system libraries to be statically linked,
especially since once of them is libgfortran which is included
automatically by the gfortran compiler and I can't figure out a good way
to get CMake to reliably link statically to libgfortran instead of
dynamically.  If anyone has any recommendations on this front I would be
happy to hear them.)

So anyway, at the moment to do what I want it looks like I would have to
make my own project-specific copies of GetPrerequisites.cmake and
BundleUtilities.cmake and then hack them up in order to force them to do
what I want.  But I can't help but think that there must have lots of
people out there who have wanted to do what I want to do and so this
problem must have been solved in a much better way.  So does anyone have
advice for a way to do what I want, i.e. an easy way to copy all
non-system libraries (where only /lib is interpreted to be the location
of system libraries) to a directory of my choosing relative to the
installation prefix and to modify the executable to make sure it finds
them?  Or is my only option really to copy into my project and hack up
GetPrerequisites.cmake and BundleUtilities.cmake?

Thanks a lot in advance!  :-)

Cheers,
Greg
___
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 create a 64-bit Windows build of cmake?

2011-08-01 Thread John Drescher
On Mon, Aug 1, 2011 at 8:34 PM, John R. Cary  wrote:
> I believe I have followed what I have found on the web for
> building a Win64 version of CMake.  I have downloaded the
> win32 version and used it to configure the cmake source.
> I used the Visual Studio 9 2008 Win64 generator.
>

Last Friday I pulled in the cmake-git configured for 64 bit Visual
Studio 2010 and generated. Opened the project it generated and built
release. Then I built the package target and installed the package and
I had a 64 bit version of cmake. Although with this said I have yet to
see a reason to need CMake to be 64 bit except for the install
location being Program Files instead of Program Files (x86).

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 create a 64-bit Windows build of cmake?

2011-08-01 Thread John R. Cary

I believe I have followed what I have found on the web for
building a Win64 version of CMake.  I have downloaded the
win32 version and used it to configure the cmake source.
I used the Visual Studio 9 2008 Win64 generator.

However, when I then use that cmake to configure vtk (an
old version, 5.0.0) I get the much discussed error,

-- Loading VTK CMake commands
CMake Error at CMake/vtkLoadCMakeExtensions.cmake:7 (LOAD_COMMAND):
  load_command Attempt to load the library
  
C:/winsame/cary/builds-vs9/composerall/vtk-5.0.0i/ser/CMake/cmVTK_WRAP_TCL2.dll

  failed.  Additional error info is:

  The application has failed to start because its side-by-side 
configuration
  is incorrect.  Please see the application event log or use the 
command-line

  sxstrace.exe tool for more detail.

Call Stack (most recent call first):
  CMake/vtkLoadCMakeExtensions.cmake:27 (VTK_LOAD_SINGLE_CMAKE_EXTENSION)
  CMakeLists.txt:632 (VTK_LOAD_CMAKE_EXTENSIONS)


CMake Error at CMake/vtkLoadCMakeExtensions.cmake:11 (MESSAGE):
  Loading VTK command VTK_WRAP_TCL2 - failed
Call Stack (most recent call first):
  CMake/vtkLoadCMakeExtensions.cmake:27 (VTK_LOAD_SINGLE_CMAKE_EXTENSION)
  CMakeLists.txt:632 (VTK_LOAD_CMAKE_EXTENSIONS)

Using sxstrace shows

INFO: Parsing Manifest File 
C:\winsame\cary\builds-vs9\composerall\vtk-5.0.0i\ser\CMake\cmVTK_WRAP_TCL2.dll.

INFO: Manifest Definition Identity is (null).
INFO: Reference: 
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference 
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".

INFO: Resolving reference for ProcessorArchitecture amd64.

which seems to indicate that even though I built cmake with the VS9-Win64
generator, cmake somehow created the dll as win32?  Even though cmake
says,

-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio

9.0/VC/bin/amd64/cl.exe


showing that it found the 64-bit compiler?

Any hints on what to do next?

Thx...John Cary







___
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] VS2010 and superbuild - Fwd: [Ctk-developers] VS2010 support

2011-08-01 Thread Sascha Zelzer

Hi,

I played around with the ExternalProject unit tests and was able to 
reproduce my problem with the current HEAD ExternalProjects.cmake file. 
It boils down to *not* adding the UPDATE_COMMAND "" line:


1.) In CMake/Tests/ExternalProject/CMakeLists.txt:487 remove (or comment 
in) the UPDATE_COMMAND argument
2.) Build the "TutorialStep1-GIT-bytag" project with VisualStudio 2010 
(I am using the Express Edition). You will get:


1>-- Rebuild All started: Project: TutorialStep1-GIT-bytag, 
Configuration: Debug Win32 --

1>  Creating directories for 'TutorialStep1-GIT-bytag'
1>  Building Custom Rule 
C:/Development/git/CMake/Tests/ExternalProject/CMakeLists.txt
1>  CMake does not need to re-run because 
C:\Development\build\ExternalProject-Test\CMakeFiles\generate.stamp is 
up-to-date.

1>  Performing download step (git clone) for 'TutorialStep1-GIT-bytag'
1>  Cloning into TutorialStep1-GIT-bytag...
1>  done.
1>  Note: checking out 'origin/master'.
1>
1>  You are in 'detached HEAD' state. You can look around, make experimental
1>  changes and commit them, and you can discard any commits you make in 
this

1>  state without impacting any branches by performing another checkout.
1>
1>  If you want to create a new branch to retain commits you create, you may
1>  do so (now or later) by using -b with the checkout command again. 
Example:

1>
1>git checkout -b new_branch_name
1>
1>  HEAD is now at d197073... Initial import into repo.
1>  Performing update step (git fetch) for 'TutorialStep1-GIT-bytag'
== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==

So all other steps after the update step are ignored.

In CTK, we rely on the default update command for git and it works in 
Visual Studio 2008. Any ideas how to fix this will be greatly appreciated.


Thanks,
Sascha



On 07/29/2011 12:40 PM, David Cole wrote:
Can you send along the output that you do see when your project is 
downloading, and the build output that immediately follows that? Does 
it say anything about the steps that come after download?


For example, when I build the ExternalProject test and build only the 
project "TutorialStep5-Local", I get the following output:


1>  Performing download step (DIR copy) for 'TutorialStep5-Local'
1>  No update step for 'TutorialStep5-Local'
1>  No patch step for 'TutorialStep5-Local'
1>  Performing configure step for 'TutorialStep5-Local'
1>  loading initial cache file C:/Users/davidcole/Dashboards/My 
Tests/b20/CMakeExternals/tmp/TutorialStep5-Local/TutorialStep5-Local-cache.cmake

1>  -- Check for working C compiler using: Visual Studio 10
1>  -- Check for working C compiler using: Visual Studio 10 -- works
1>  -- Detecting C compiler ABI info
1>  -- Detecting C compiler ABI info - done
1>  -- Check for working CXX compiler using: Visual Studio 10
1>  -- Check for working CXX compiler using: Visual Studio 10 -- works
1>  -- Detecting CXX compiler ABI info
1>  -- Detecting CXX compiler ABI info - done
1>  -- Looking for log
1>  -- Looking for log - found
1>  -- Looking for exp
1>  -- Looking for exp - found
1>  -- Configuring done
1>  -- Generating done
1>  -- Build files have been written to: 
C:/Users/davidcole/Dashboards/My 
Tests/b20/CMakeExternals/Build/TutorialStep5-Local

1>  Performing build step for 'TutorialStep5-Local'
.


Do you see any "Performing XXX step" or "No XXX step" output after the 
download occurs...?




On Fri, Jul 29, 2011 at 6:30 AM, David Cole > wrote:


Is your VS 2010 in German by any chance? (Or the path name to the
installation of VS 2010?)

We do not typically test on non-English platforms or build tools...



On Fri, Jul 29, 2011 at 2:14 AM, Sascha Zelzer
mailto:s.zel...@dkfz-heidelberg.de>>
wrote:

Hi,

Thanks David and Yuri for the information. In my case (with
CTK), there are no error messages. The download step is
successfully completed and the following steps are just
skipped. VS then reports that everything was successfull (or
up-to-date).

I will play with your test cases and my VS 2010 installation.

Thanks,
Sascha


On 07/29/2011 12:30 AM, David Cole wrote:

The ExternalProject test in the CMake test suite passes on
Visual Studio 2010.

You can see all the variations of ExternalProject usage
the test tries
in this file:

http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/ExternalProject/CMakeLists.txt;h=4a542d722ff127e672a63082c6bb35de1f3ef9cd;hb=b6fb213ed1431321fab0705beb3aae82f451dcc8

Are there any error messages you get? Or are steps just
skipped?

??
David


On Wed, Jul 27, 2011 at 11:38 PM, Yuri
Timenkovmailto:y...@timenkov.ru>>  wrote:

I'm not sure I understood your question, but now I use
ExternalProject (from
   

Re: [CMake] VS2010 and superbuild - Fwd: [Ctk-developers] VS2010 support

2011-08-01 Thread Sascha Zelzer

Hi,

On 07/29/2011 12:30 PM, David Cole wrote:
Is your VS 2010 in German by any chance? (Or the path name to the 
installation of VS 2010?)


My Visual Studio is in English, but it is installed on a German Windows 
7 (under C:\Programme (x86)\...)


- Sascha



We do not typically test on non-English platforms or build tools...


On Fri, Jul 29, 2011 at 2:14 AM, Sascha Zelzer 
mailto:s.zel...@dkfz-heidelberg.de>> wrote:


Hi,

Thanks David and Yuri for the information. In my case (with CTK),
there are no error messages. The download step is successfully
completed and the following steps are just skipped. VS then
reports that everything was successfull (or up-to-date).

I will play with your test cases and my VS 2010 installation.

Thanks,
Sascha


On 07/29/2011 12:30 AM, David Cole wrote:

The ExternalProject test in the CMake test suite passes on
Visual Studio 2010.

You can see all the variations of ExternalProject usage the
test tries
in this file:

http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/ExternalProject/CMakeLists.txt;h=4a542d722ff127e672a63082c6bb35de1f3ef9cd;hb=b6fb213ed1431321fab0705beb3aae82f451dcc8

Are there any error messages you get? Or are steps just skipped?

??
David


On Wed, Jul 27, 2011 at 11:38 PM, Yuri
Timenkovmailto:y...@timenkov.ru>>  wrote:

I'm not sure I understood your question, but now I use
ExternalProject (from
CMake 2.8.4) with Visual Studio 2010 which has 2
externals: one built with
custom command (the C# project) and the second one is
CMake-based but with
VC6 generator. Everything compiles and works fine. But I
don't have download
step - everything is in my source directory.

The only wish I have I filed to Mantis:
http://public.kitware.com/Bug/view.php?id=12322

Regards,
Yuri

On Thu, Jul 28, 2011 at 12:37 AM, Sascha Zelzer
mailto:s.zel...@dkfz-heidelberg.de>>  wrote:

Hi,

Is nobody on this list using CTK or Slicer with Visual
Studio 2010 in
superbuild mode? If you do, could you please post if
you had success or not?

Thanks,
Sascha

On 07/22/2011 06:20 PM, Jean-Christophe Fillion-Robin
wrote:

Hi Folks,

Before digging further into the problem ... if some
your experience issue
with VS2010 and superbuild .. would be great if you
could provide more
details about your investigation.

Thanks
Jc

-- Forwarded message --
From: Sascha Zelzermailto:s.zel...@dkfz-heidelberg.de>>
Date: Fri, Jul 22, 2011 at 12:07 PM
Subject: Re: [Ctk-developers] VS2010 support
To: ctk-develop...@commontk.org



Hi,

there is something very strange going on. The
generated VS 2010 projects
(I am using the Express editions, 32bit) for the
external dependencies like
DCMTK, Log4Qt, etc. only call the download step of the
ExternalProject_add
call in our superbuild scripts. The projects are not
configured and build.

Did anybody experience the same? I tried with and
without the VS 2010 SP1
and with CMake 2.8.4 and 2.8.5.

Thanks,
Sascha

On 07/22/2011 01:39 PM, Sascha Zelzer wrote:

Hi Folks,

I would like to get Visual Studio 2010
compatibility for CTK.

Currently, it looks like I will have to copy
ExternalProject.cmake to
CTK for the CMAKE_CACHE_ARGS argument. Then a
couple of small
modifications should do.

Any other ideas or objections?

Thanks,

Sascha
___
Ctk-developers mailing list
ctk-develop...@commontk.org


http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers

___
Ctk-developers mailing list
ctk-develop...@commontk.org


http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-d

Re: [CMake] Assembler handling in 2.8.5 vs 2.8.4

2011-08-01 Thread Alexander Neundorf
On Monday 01 August 2011, Florian Reinhard wrote:
> 2011/7/29 Alexander Neundorf :
> > On Friday 29 July 2011, Florian Reinhard wrote:
> >> 2011/7/22 Alexander Neundorf :
> >> > Can you build cmake from this branch I just created ?
> >> > http://cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/TI_D
> >> > SP_ Compiler
> >> 
> >> Tested and failed:
> >> #cmake --version
> >> cmake version 2.8.5.20110722
> >> 
> >> #cmake -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=release ..
> >> -- Archiver: c:/tools/cgtools-7.2.4/bin/ar6x.exe
> >> -- The C compiler identification is TI_DSP
> >> -- The CXX compiler identification is TI_DSP
> >> -- Check for working C compiler: c:/tools/cgtools-7.2.4/bin/cl6x.exe
> >> terminate called after throwing an instance of 'std::logic_error'
> >>   what():  basic_string::_S_construct NULL not valid
> > 
> > Can you maybe run it in a debugger so we can get a backtrace ?
> 
> I attached the gdb output i got. I've been running gdb from a minGW32
> installation on a normal windows cmd.exe on windows7 x64.
> Unfortunately there's no backtrace (or i'm just don't know gdb well
> enough) and as soon as i execute "strace" after the cmake crash, gdb
> crashes as well.

Can you try to "catch throw" in gdb, then gdb should break when the exception 
is thrown, and you should be able to get a backtrace then, so we can see where 
it is thrown.

> >> Running on windows the output file extension is by default .exe which
> >> doesn't make sense, since there will be probably nobody compiling for
> >> the C6000 family on a C6000 system. So i guess having this would make
> >> sense:
> >> SET (CMAKE_EXECUTABLE_SUFFIX.out)
> > 
> > This depends also on your target operating system. For which OS are you
> > developing ?
> 
> Actually none. 

Ok.

> I'm compiling a complete firmware for a Texas
> Instruments DSP (674x family) and no single binaries. 

Just to make sure I understand correctly: the firmware consists of one big 
binary which contains everything and there are no shared libraries or anything 
like this, right ?

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] Bug fix requests for the *next* release of CMake...

2011-08-01 Thread Alexander Neundorf
On Saturday 30 July 2011, Alan W. Irwin wrote:
> Please do a fundamental fix for
> http://public.kitware.com/Bug/view.php?id=9220.

Since I implemented this, I feel responsible for it.
But most probably I will not be able to do this for 2.8.6.
At least I'll try to make it work again for ASM.

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


[CMake] Regenerating project files based on external file.

2011-08-01 Thread The Novice Coder


The short version of what I'm trying to do:
Add some kind of definition to the cmake file that specifies a file, 
that if modified, will cause the project to be regenerated.



Longer (more specific) version.
We (our small program team) want's to use cmake to generate a file 
"svn_version.h", which has a solution posted on the web.  The problem 
happens when we checkout new revisions, this file goes unmodified.  
Looking for a way to cause CMake to regenerate the build files (and with 
it, the revision number) after an "svn up" command, without having to 
touch cmakelists.txt.  It would be trivial to simply check files in the 
.svn folder for modification times, so that would probably be the 
easiest (although not 100% accurate) way to go.


Any help on where to look... Thanks!
___
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] Bug fix requests for the *next* release of CMake...

2011-08-01 Thread Johan Björk
http://www.cmake.org/Bug/view.php?id=12379 (EXCLUDE_FROM_DEFAULT_BUILD
broken)
http://www.cmake.org/Bug/view.php?id=12377 (-g0 enables debug in XCode)
http://www.cmake.org/Bug/view.php?id=12358 (ENABLE_LANGUAGE(.. OPTIONAL)
breaks configure step
http://www.cmake.org/Bug/view.php?id=11690 (XCode generator overwrites user
settings)

Bonus wishlist:
http://www.cmake.org/Bug/view.php?id=12275 (Generated files not removed by
clean target w/XCode)

On Mon, Aug 1, 2011 at 12:54 PM, Domagoj Saric <
domagoj.sa...@littleendian.com> wrote:

>
> http://public.kitware.com/Bug/**view.php?id=12375
> http://public.kitware.com/Bug/**view.php?id=12376
>
> thanks ;)
>
>
> --
> "What Huxley teaches is that in the age of advanced technology, spiritual
> devastation is more likely to come from an enemy with a smiling face than
> from one whose countenance exudes suspicion and hate."
> Neil Postman
>
> __**_
> 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] exclude build project from solution

2011-08-01 Thread Johan Björk
And another update while at it.

The following cmake file illustrates the issue:

FILE(WRITE foo.c "")
add_library(foo EXCLUDE_FROM_ALL foo.c)
set_target_properties(foo PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
FILE(WRITE foobar.c "")
add_executable(foobar foobar.c)
target_link_libraries(foobar foo)

This works fine in the makefile (and xcode) generator, but fails in MSVC
2008 with
1>-- Skipped Build: Project: foo, Configuration: Debug Win32 --
1>Project not selected to build for this solution configuration
2>-- Build started: Project: foobar, Configuration: Debug Win32 --
2>Compiling...
2>foobar.c
2>Compiling manifest to resources...
2>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
2>Copyright (C) Microsoft Corporation.  All rights reserved.
2>Linking...
2>LINK : fatal error LNK1104: cannot open file 'Debug\foo.lib'
2>Build log was saved at "file://c:\Users\Felix Bruns\Documents\Visual
Studio 2008\Projects\a'\foobar.dir\Debug\BuildLog.htm"
2>foobar - 1 error(s), 0 warning(s)
3>-- Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32
--
3>Project not selected to build for this solution configuration
== Build: 0 succeeded, 1 failed, 1 up-to-date, 2 skipped ==

I'll file a bug.




On Mon, Aug 1, 2011 at 5:15 PM, Johan Björk  wrote:

> and I just found
>
> The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual studio
> generators. If it is set to 1 the target will not be part of the default
> build when you select "Build Solution".
>
> Anyone know why it is different from EXLUDE_FROM_ALL ?
>
> -Johan
>
>
> On Mon, Aug 1, 2011 at 5:05 PM, Johan Björk  wrote:
>
>> Hi all,
>>
>> Anyone know anything about this? I'm seeing the same issue with MSVC 2008
>> + cmake 2.8(.?)
>>
>> add_library(foo .. EXCLUDE_FROM_ALL ..)
>>
>> -Johan
>>
>>
>> On Tue, May 3, 2011 at 4:59 PM, Andrea Galeazzi  wrote:
>>
>>> I've a project made up of multiple executable target:
>>> add_executable(TARGET_NAME1 ${SOURCES1})
>>> add_executable(TARGET_NAME2 ${SOURCES2})
>>> add_executable(TARGET_NAME3 ${SOURCES3})
>>>
>>> ...
>>> Now I'd like to build just only TARGET_NAME1 when I press F7 (build
>>> solution) in visual studio. I tried to add
>>> set_target_properties(TARGET_**NAME2 PROPERTIES EXCLUDE_FROM_ALL "TRUE")
>>> set_target_properties(TARGET_**NAME3 PROPERTIES EXCLUDE_FROM_ALL "TRUE")
>>> ..
>>> but it only remove the dependency from ALL_BUILD project.
>>> So, is it possible to generate a such kind of solution?
>>> __**_
>>> 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] Setting environment variable to execute_process

2011-08-01 Thread Bill Hoffman

On 8/1/2011 12:08 PM, Łukasz Tasz wrote:

Hi,

I would like to execute process, during cmake phase, but I need to
tune LD_LIBRARY_PATH a little,

I would like to get something like:

execute_proccess(COMMAND LD_LIBRARY_PATH=my_path my_proccess
ERROR_VARIABLE _error)

Unfornately command above is not working...
I'm using cmake 2.6

thanks for any clues,
Lukasz


The way to do this is to use the set command.

set(ENV{LD_LIBRARY_PATH} my_path)
execute_process(COMMAND my_process)

-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] Setting environment variable to execute_process

2011-08-01 Thread Łukasz Tasz
Hi,

I would like to execute process, during cmake phase, but I need to
tune LD_LIBRARY_PATH a little,

I would like to get something like:

execute_proccess(COMMAND LD_LIBRARY_PATH=my_path my_proccess
ERROR_VARIABLE _error)

Unfornately command above is not working...
I'm using cmake 2.6

thanks for any clues,
Lukasz

-- 
Lukasz Tasz
___
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] exclude build project from solution

2011-08-01 Thread Johan Björk
and I just found

The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual studio
generators. If it is set to 1 the target will not be part of the default
build when you select "Build Solution".

Anyone know why it is different from EXLUDE_FROM_ALL ?

-Johan


On Mon, Aug 1, 2011 at 5:05 PM, Johan Björk  wrote:

> Hi all,
>
> Anyone know anything about this? I'm seeing the same issue with MSVC 2008 +
> cmake 2.8(.?)
>
> add_library(foo .. EXCLUDE_FROM_ALL ..)
>
> -Johan
>
>
> On Tue, May 3, 2011 at 4:59 PM, Andrea Galeazzi  wrote:
>
>> I've a project made up of multiple executable target:
>> add_executable(TARGET_NAME1 ${SOURCES1})
>> add_executable(TARGET_NAME2 ${SOURCES2})
>> add_executable(TARGET_NAME3 ${SOURCES3})
>>
>> ...
>> Now I'd like to build just only TARGET_NAME1 when I press F7 (build
>> solution) in visual studio. I tried to add
>> set_target_properties(TARGET_**NAME2 PROPERTIES EXCLUDE_FROM_ALL "TRUE")
>> set_target_properties(TARGET_**NAME3 PROPERTIES EXCLUDE_FROM_ALL "TRUE")
>> ..
>> but it only remove the dependency from ALL_BUILD project.
>> So, is it possible to generate a such kind of solution?
>> __**_
>> 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] exclude build project from solution

2011-08-01 Thread Johan Björk
Hi all,

Anyone know anything about this? I'm seeing the same issue with MSVC 2008 +
cmake 2.8(.?)

add_library(foo .. EXCLUDE_FROM_ALL ..)

-Johan


On Tue, May 3, 2011 at 4:59 PM, Andrea Galeazzi  wrote:

> I've a project made up of multiple executable target:
> add_executable(TARGET_NAME1 ${SOURCES1})
> add_executable(TARGET_NAME2 ${SOURCES2})
> add_executable(TARGET_NAME3 ${SOURCES3})
>
> ...
> Now I'd like to build just only TARGET_NAME1 when I press F7 (build
> solution) in visual studio. I tried to add
> set_target_properties(TARGET_**NAME2 PROPERTIES EXCLUDE_FROM_ALL "TRUE")
> set_target_properties(TARGET_**NAME3 PROPERTIES EXCLUDE_FROM_ALL "TRUE")
> ..
> but it only remove the dependency from ALL_BUILD project.
> So, is it possible to generate a such kind of solution?
> __**_
> 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] Bug fix requests for the *next* release of CMake...

2011-08-01 Thread Domagoj Saric


http://public.kitware.com/Bug/view.php?id=12375
http://public.kitware.com/Bug/view.php?id=12376

thanks ;)


--
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman
___
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] Assembler handling in 2.8.5 vs 2.8.4

2011-08-01 Thread Florian Reinhard
2011/7/29 Alexander Neundorf :
> On Friday 29 July 2011, Florian Reinhard wrote:
>> 2011/7/22 Alexander Neundorf :
>> > Can you build cmake from this branch I just created ?
>> > http://cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/TI_DSP_
>> > Compiler
>>
>> Tested and failed:
>> #cmake --version
>> cmake version 2.8.5.20110722
>>
>> #cmake -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=release ..
>> -- Archiver: c:/tools/cgtools-7.2.4/bin/ar6x.exe
>> -- The C compiler identification is TI_DSP
>> -- The CXX compiler identification is TI_DSP
>> -- Check for working C compiler: c:/tools/cgtools-7.2.4/bin/cl6x.exe
>> terminate called after throwing an instance of 'std::logic_error'
>>   what():  basic_string::_S_construct NULL not valid
>
> Can you maybe run it in a debugger so we can get a backtrace ?

I attached the gdb output i got. I've been running gdb from a minGW32
installation on a normal windows cmd.exe on windows7 x64.
Unfortunately there's no backtrace (or i'm just don't know gdb well
enough) and as soon as i execute "strace" after the cmake crash, gdb
crashes as well.

>> Running on windows the output file extension is by default .exe which
>> doesn't make sense, since there will be probably nobody compiling for
>> the C6000 family on a C6000 system. So i guess having this would make
>> sense:
>> SET (CMAKE_EXECUTABLE_SUFFIX    .out)
>
> This depends also on your target operating system. For which OS are you
> developing ?

Actually none. I'm compiling a complete firmware for a Texas
Instruments DSP (674x family) and no single binaries. The cl6x output
is in COFF format from which the actual firmware binary is being
extracted.

Kind Regards,

Florian
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
...
Reading symbols from c:\tools\cmake\bin\cmake.exe...done.
(gdb) run -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=release ..
Starting program: c:\tools\cmake\bin\cmake.exe -G"MinGW Makefiles" 
-DCMAKE_BUILD_TYPE=release ..
[New Thread 23548.0x3264]
[New Thread 23548.0x5098]
[New Thread 23548.0x3e60]
[New Thread 23548.0x373c]
[New Thread 23548.0x384c]
-- Checked for GNU
--Output: ->> WARNING: invalid compiler option --version (ignored)
>> ERROR: no source files, nothing to do
-
--Result: -0-
[New Thread 23548.0x3a5c]
[New Thread 23548.0x1a84]
[New Thread 23548.0x56c0]
[New Thread 23548.0x536c]
-- Checked for HP
--Output: ->> WARNING: invalid compiler option -V (ignored)
>> ERROR: no source files, nothing to do
-
--Result: -0-
[New Thread 23548.0x1704]
[New Thread 23548.0x217c]
[New Thread 23548.0x3774]
[New Thread 23548.0x38f8]
-- Checked for Intel
--Output: ->> WARNING: invalid compiler option --version (ignored)
>> ERROR: no source files, nothing to do
-
--Result: -0-
[New Thread 23548.0x4d10]
[New Thread 23548.0x309c]
[New Thread 23548.0x150c]
[New Thread 23548.0x2d98]
-- Checked for SunPro
--Output: ->> WARNING: invalid compiler option -V (ignored)
>> ERROR: no source files, nothing to do
-
--Result: -0-
[New Thread 23548.0x37d8]
[New Thread 23548.0xa9c]
[New Thread 23548.0x3938]
[New Thread 23548.0xf98]
-- Checked for XL
--Output: -TMS320C6x C/C++ Compilerv7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U

TMS320C6x C/C++ Parser  v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x EABI C/C++ Parser v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x C/C++ File Merge  v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x C/C++ Optimizer   v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x C/C++ Codegen v7.2.4
Build Number 1LFFQ-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x Consultant Generator  v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x Assembly Preprocessor v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x Assembler v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x Compressorv7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x Embed Utility v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x C Source Interlister  v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x Linkerv7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x Absolute Lister   v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x Strip Utility v7.2.4
Build Number 1LFFP-KDADEMDK-RTARQ-TAV-ZAZG_X_S_U
TMS320C6x XREF Utility 

Re: [CMake] ADD_CUSTOM_COMMAND and Dependencies

2011-08-01 Thread Michael Wild
On 08/01/2011 09:32 AM, Micha Renner wrote:
> Am Montag, den 25.07.2011, 15:49 +0200 schrieb Michael Wild:
>> On 07/25/2011 03:24 PM, Micha Renner wrote:
>>> There is following sequence:
>>>
>>> ADD_EXECUTEABLE(generator gen.c)
>>>
>>> ADD_CUSTOM_COMMAND(OUTPUT tlib.h
>>> COMMAND generator > tlib.h)
>>>
>>> ADD_LIBRARY(tlib tlib.c tlib.h)
>>>
>>> The question: Is it sure that ADD_EXECUTEABLE is invoked before the
>>> library is build or is here an ADD_DEPENDENCIES(tlib generator)
>>> necessary?
>>>
>>> Greetings
>>>
>>> Micha
>>>
>>
>> Yes, CMake should recognize that "generator" is a target and create the
>> dependency of tlib.h on "generator" automagically. And since it knows
>> that tlib.h is GENERATED, it will also add a dependency of tlib on
>> tlib.h. If you want to make really sure that CMake understands that
>> "generator" is a target, use generator expressions, like
>> "$", but that works only since 2.8.4.
> 
> So really clear is this not.
> After studying the documentation, to get more information for
> target_file, I found this line in the add_custom_command documentation:
> "Additionally, if the target is an executable or library a file-level
> dependency is created to cause the custom command to re-run whenever the
> target is recompiled."
> 
> ADD_CUSTOM_COMMAND(OUTPUT tlib.h COMMAND generator > tlib.h DEPENDS
> generator) should solve my problem.

You don't need the DEPENDS option, since CMake automatically determines
that "generator" is a executable target, and adds the dependency by itself.

> 
> But what is the difference to 
> ADD_CUSTOM_COMMAND(OUTPUT tlib.h COMMAND $
> generator > tlib.h)?

None, it is just more explicit, and allows for greater flexibility. The
$<...:...> notation also allows one to retrieve other paths, not just
target output files.

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] ADD_CUSTOM_COMMAND and Dependencies

2011-08-01 Thread Micha Renner
Am Montag, den 25.07.2011, 15:49 +0200 schrieb Michael Wild:
> On 07/25/2011 03:24 PM, Micha Renner wrote:
> > There is following sequence:
> > 
> > ADD_EXECUTEABLE(generator gen.c)
> > 
> > ADD_CUSTOM_COMMAND(OUTPUT tlib.h
> > COMMAND generator > tlib.h)
> > 
> > ADD_LIBRARY(tlib tlib.c tlib.h)
> > 
> > The question: Is it sure that ADD_EXECUTEABLE is invoked before the
> > library is build or is here an ADD_DEPENDENCIES(tlib generator)
> > necessary?
> > 
> > Greetings
> > 
> > Micha
> > 
> 
> Yes, CMake should recognize that "generator" is a target and create the
> dependency of tlib.h on "generator" automagically. And since it knows
> that tlib.h is GENERATED, it will also add a dependency of tlib on
> tlib.h. If you want to make really sure that CMake understands that
> "generator" is a target, use generator expressions, like
> "$", but that works only since 2.8.4.

So really clear is this not.
After studying the documentation, to get more information for
target_file, I found this line in the add_custom_command documentation:
"Additionally, if the target is an executable or library a file-level
dependency is created to cause the custom command to re-run whenever the
target is recompiled."

ADD_CUSTOM_COMMAND(OUTPUT tlib.h COMMAND generator > tlib.h DEPENDS
generator) should solve my problem.

But what is the difference to 
ADD_CUSTOM_COMMAND(OUTPUT tlib.h COMMAND $
generator > tlib.h)?

Greetings

Micha




___
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