[CMake] MSB4051

2010-12-27 Thread Anders Backman
Hi all.

Im using CMake 2.8.3 under windows 7 with Visual Studio 2010 32 bit.

I have a rather large CMake configuration which has worked for a few years
(VS2008).
Now today I wanted to use VS2010 and suddenly ran into a problem.

We use Incredibuild for a distributed build, and when I configure the
project and do Incredibuild->Clean I get the error:

Build started 2010-12-27 15:34:03.
 0>A:\projects\trunk_x86_vs2010\x.sln.metaproj : Solution file error
MSB4051: Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a
project with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with
this GUID was not found in the .SLN file.


I reduced our project down from > 200 projects down to 4 and I still get the
problem.
To remove the uncertainty of using Incredibuild I instead used msbuild and I
get the exact same problem:

a:\projects\trunk_x86_vs2010>msbuild x.sln
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.208]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 2010-12-27 15:34:16.
a:\projects\trunk_x86_vs2010\x.sln.metaproj : Solution file error MSB4051:
Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a project
with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with this
GUID was not found in the .SLN file.

Build FAILED.

  a:\projects\agx\trunk_x86_vs2010\x.sln.metaproj : Solution file error
MSB4051: Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a
project with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with
this GUID was not found in the .SLN file.


But it works if I build with VisualStudio BUILD->Clean (that is the ordinary
clean inside the VS gui).
I did some googling on it, and some indicated a missing EndProject in the
.sln file, but I certainly cant see anything like that.

Anyone with similar experience?

/A
___
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] MSB4051

2010-12-27 Thread Anders Backman
Seems to be bug in CMake!

I reduce the solution down to 1 project. Still fails. So I copied the
generated .sln file into agx.cmake.sln

Then I marked the solution in VisualStudio and selected File->save agx.sln.

Now it works to build the whole solution.
So there is SOMETHING wrong with the .sln file that CMake generates, which
VisualStudio silently fixes when it saves the solution again.

I have attached the initial .sln file generated by CMake (2.8.3) and the
saved (from VisualStudio).

agx.sln - saved with VisualStudio File->Save agx.sln
agx.cmake.sln - As generated by CMake.

/A

On Mon, Dec 27, 2010 at 3:41 PM, Anders Backman  wrote:

> Hi all.
>
> Im using CMake 2.8.3 under windows 7 with Visual Studio 2010 32 bit.
>
> I have a rather large CMake configuration which has worked for a few years
> (VS2008).
> Now today I wanted to use VS2010 and suddenly ran into a problem.
>
> We use Incredibuild for a distributed build, and when I configure the
> project and do Incredibuild->Clean I get the error:
>
> Build started 2010-12-27 15:34:03.
>  0>A:\projects\trunk_x86_vs2010\x.sln.metaproj : Solution file error
> MSB4051: Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a
> project with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with
> this GUID was not found in the .SLN file.
>
>
> I reduced our project down from > 200 projects down to 4 and I still get
> the problem.
> To remove the uncertainty of using Incredibuild I instead used msbuild and
> I get the exact same problem:
>
> a:\projects\trunk_x86_vs2010>msbuild x.sln
> Microsoft (R) Build Engine Version 4.0.30319.1
> [Microsoft .NET Framework, Version 4.0.30319.208]
> Copyright (C) Microsoft Corporation 2007. All rights reserved.
>
> Build started 2010-12-27 15:34:16.
> a:\projects\trunk_x86_vs2010\x.sln.metaproj : Solution file error MSB4051:
> Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a project
> with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with this
> GUID was not found in the .SLN file.
>
> Build FAILED.
>
>   a:\projects\agx\trunk_x86_vs2010\x.sln.metaproj : Solution file error
> MSB4051: Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a
> project with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with
> this GUID was not found in the .SLN file.
>
>
> But it works if I build with VisualStudio BUILD->Clean (that is the
> ordinary clean inside the VS gui).
> I did some googling on it, and some indicated a missing EndProject in the
> .sln file, but I certainly cant see anything like that.
>
> Anyone with similar experience?
>
> /A
>


agx.cmake.sln
Description: Binary data


agx.sln
Description: Binary data
___
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] MSB4051

2010-12-28 Thread Anders Backman
Yep. It works with the nightly build.
Great.

/A

On Tue, Dec 28, 2010 at 6:14 PM, Bill Hoffman wrote:

> On 12/27/2010 10:25 AM, Bill Hoffman wrote:
>
>> On 12/27/2010 10:03 AM, Anders Backman wrote:
>>
>>> Seems to be bug in CMake!
>>>
>>> I reduce the solution down to 1 project. Still fails. So I copied the
>>> generated .sln file into agx.cmake.sln
>>>
>>
>> More helpful would be a minimal CMakeLists.txt and instructions on how
>> to get CMake to create the bad .sln file. Can you do that?
>>
>>
>> -Bill
>>
>>  OK, this seems to be already fixed in master.  Please try a nightly build
> of cmake from here:
>
> http://www.cmake.org/files/dev
> I tried this one:
> http://www.cmake.org/files/dev/cmake-2.8.3.20101227-gae91a-win32-x86.zip
>
>
> -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
>



--
___
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] complete rebuild

2010-12-29 Thread Anders Backman
Hi all.

I have a problem where I have a project of C++ headers and source files
which are built into a .lib .dll.
Now this works just fine with CMake 2.8.x and VisualStudio 2008.

I press F7 everything builds. I press F7 again, it is all built, nothing to
be done.

But now when I move over to vs2010, I get into problems where no matter how
I build the project, it constantly want to rebuild everything.

I have tried both 'msbuild project.sln' from the command line, as well as
build (F7) inside of VisualStudio  as well as using Incredibuild. The result
is the same. If I press F7, it builds everything as it was not built before.

I did some googling on the issue, and some suggest that there is a file in
the project (header) which does not exist on disk, causing the problem.
We do file(glob) on all files, so a file which is not found, should not be
part of the project.

Right now, it seems to be hard to reduce the problem. When I start from the
full project, 107 files, it want to rebuild everything.
When I reduce the problem, I can get down to one single file, still it wants
to build it. Its a c file, and there is nothing special about it. I even
managed to reduce that down to one function, no includes. still the same
problem.

If I copy the relevant files (a few cmakelists.txt and the directory
structure, including the two files (.h .c) it builds as it should again.
I tried to run cmake and generate vs2008 files, that works. Open them in
vs2010, build, then that works (with the two files only).


So anyway, before I put you all to sleep, as far as I know, there are two
dependency parsers involved here:

- CMake runs through source files and generates dependencies, right?
- THen visual studio does the same (generating the External dependencies
folder in the project). Now there is SOMETHING wrong in either one, or both
or none related to VS2010.

Does someone have any hints on how to debug this problem? I have spent
substantial time, and I cant seem to get anywhere.
I cant reduce it to something I can post on the list, as it just magically
works when I want to rip it out.

At one point, I had 3 cmakelists, each with about 3 lines. 2 source files
(.h .c), I did clean on CMakeCache.txt between each cmake . run, loaded the
project build and got the error. Fairly simple scene. But as soon as I try
to move that to another dir, it fails.

Thankful for any advice on the matter.


--
___
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] complete rebuild

2010-12-29 Thread Anders Backman
Ok, Im already using the nightly build (from Tuesday I believe), as I
discovered a bug in CMake yesterday.
I will bug M$ too :-)

/A

On Wed, Dec 29, 2010 at 1:03 PM, David Cole  wrote:

> For Visual Studio generators, CMake does *NO* depedency analysis. It
> generates solution and project files such that Visual Studio can do
> all the dependency analysis and decide what to re-build when files
> change.
>
> My advice to you would be:
> - use only CMake 2.8.3 or newer (a nightly development build of CMake)
> with Visual Studio 10 -- CMake 2.8.2 and earlier had significant bugs
> related to VS10 that have since been resolved...
> - using a newer CMake, isolate the problem to a minimally reproducible
> case and then report a bug in the bug tracker about it including the
> steps to reproduce the problem
>
> Reply here again and point us to the bug.
>
>
> HTH,
> David
>
>
> On Wed, Dec 29, 2010 at 4:07 AM, Anders Backman  wrote:
> > Hi all.
> > I have a problem where I have a project of C++ headers and source files
> > which are built into a .lib .dll.
> > Now this works just fine with CMake 2.8.x and VisualStudio 2008.
> > I press F7 everything builds. I press F7 again, it is all built, nothing
> to
> > be done.
> > But now when I move over to vs2010, I get into problems where no matter
> how
> > I build the project, it constantly want to rebuild everything.
> > I have tried both 'msbuild project.sln' from the command line, as well as
> > build (F7) inside of VisualStudio  as well as using Incredibuild. The
> result
> > is the same. If I press F7, it builds everything as it was not built
> before.
> > I did some googling on the issue, and some suggest that there is a file
> in
> > the project (header) which does not exist on disk, causing the problem.
> > We do file(glob) on all files, so a file which is not found, should not
> be
> > part of the project.
> > Right now, it seems to be hard to reduce the problem. When I start from
> the
> > full project, 107 files, it want to rebuild everything.
> > When I reduce the problem, I can get down to one single file, still it
> wants
> > to build it. Its a c file, and there is nothing special about it. I even
> > managed to reduce that down to one function, no includes. still the same
> > problem.
> > If I copy the relevant files (a few cmakelists.txt and the directory
> > structure, including the two files (.h .c) it builds as it should again.
> > I tried to run cmake and generate vs2008 files, that works. Open them in
> > vs2010, build, then that works (with the two files only).
> >
> > So anyway, before I put you all to sleep, as far as I know, there are two
> > dependency parsers involved here:
> > - CMake runs through source files and generates dependencies, right?
> > - THen visual studio does the same (generating the External dependencies
> > folder in the project). Now there is SOMETHING wrong in either one, or
> both
> > or none related to VS2010.
> > Does someone have any hints on how to debug this problem? I have spent
> > substantial time, and I cant seem to get anywhere.
> > I cant reduce it to something I can post on the list, as it just
> magically
> > works when I want to rip it out.
> > At one point, I had 3 cmakelists, each with about 3 lines. 2 source files
> > (.h .c), I did clean on CMakeCache.txt between each cmake . run, loaded
> the
> > project build and got the error. Fairly simple scene. But as soon as I
> try
> > to move that to another dir, it fails.
> > Thankful for any advice on the matter.
> >
> > --
> >
> >
> > ___
> > 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] complete rebuild

2010-12-30 Thread Anders Backman
I think I managed to reproduce the problem, partially.

The file below contains a project which for me reproduces the problem when I
use msbuild.
F7 (Build->BuildSolution) works (builds only once, then next time, it does
nothing).

So there is something in the combination of CMake and msbuild which causes
the problem.
We use Incredibuild, which uses msbuild, hence we get the problem also in
Incredibuild.
I do not know the difference between F7 and msbuild though.

http://rapidshare.com/files/439941435/DependencyBug.rar

Instructions:

1. Unpack dep2.rar into a new empty directory
2. install CMake (2.8.2 or later)
http://www.cmake.org/files/v2.8/cmake-2.8.3-win32-x86.exe
3 go to the directory in a command prompt
4. execute: cmake .
5. msbuild DepBug.sln
6. msbuild DepBug.sln << Builds everything again from scratch.


/A
On Wed, Dec 29, 2010 at 1:26 PM, Anders Backman  wrote:

> Ok, Im already using the nightly build (from Tuesday I believe), as I
> discovered a bug in CMake yesterday.
> I will bug M$ too :-)
>
> /A
>
>
> On Wed, Dec 29, 2010 at 1:03 PM, David Cole wrote:
>
>> For Visual Studio generators, CMake does *NO* depedency analysis. It
>> generates solution and project files such that Visual Studio can do
>> all the dependency analysis and decide what to re-build when files
>> change.
>>
>> My advice to you would be:
>> - use only CMake 2.8.3 or newer (a nightly development build of CMake)
>> with Visual Studio 10 -- CMake 2.8.2 and earlier had significant bugs
>> related to VS10 that have since been resolved...
>> - using a newer CMake, isolate the problem to a minimally reproducible
>> case and then report a bug in the bug tracker about it including the
>> steps to reproduce the problem
>>
>> Reply here again and point us to the bug.
>>
>>
>> HTH,
>> David
>>
>>
>> On Wed, Dec 29, 2010 at 4:07 AM, Anders Backman 
>> wrote:
>> > Hi all.
>> > I have a problem where I have a project of C++ headers and source files
>> > which are built into a .lib .dll.
>> > Now this works just fine with CMake 2.8.x and VisualStudio 2008.
>> > I press F7 everything builds. I press F7 again, it is all built, nothing
>> to
>> > be done.
>> > But now when I move over to vs2010, I get into problems where no matter
>> how
>> > I build the project, it constantly want to rebuild everything.
>> > I have tried both 'msbuild project.sln' from the command line, as well
>> as
>> > build (F7) inside of VisualStudio  as well as using Incredibuild. The
>> result
>> > is the same. If I press F7, it builds everything as it was not built
>> before.
>> > I did some googling on the issue, and some suggest that there is a file
>> in
>> > the project (header) which does not exist on disk, causing the problem.
>> > We do file(glob) on all files, so a file which is not found, should not
>> be
>> > part of the project.
>> > Right now, it seems to be hard to reduce the problem. When I start from
>> the
>> > full project, 107 files, it want to rebuild everything.
>> > When I reduce the problem, I can get down to one single file, still it
>> wants
>> > to build it. Its a c file, and there is nothing special about it. I even
>> > managed to reduce that down to one function, no includes. still the same
>> > problem.
>> > If I copy the relevant files (a few cmakelists.txt and the directory
>> > structure, including the two files (.h .c) it builds as it should again.
>> > I tried to run cmake and generate vs2008 files, that works. Open them in
>> > vs2010, build, then that works (with the two files only).
>> >
>> > So anyway, before I put you all to sleep, as far as I know, there are
>> two
>> > dependency parsers involved here:
>> > - CMake runs through source files and generates dependencies, right?
>> > - THen visual studio does the same (generating the External dependencies
>> > folder in the project). Now there is SOMETHING wrong in either one, or
>> both
>> > or none related to VS2010.
>> > Does someone have any hints on how to debug this problem? I have spent
>> > substantial time, and I cant seem to get anywhere.
>> > I cant reduce it to something I can post on the list, as it just
>> magically
>> > works when I want to rip it out.
>> > At one point, I had 3 cmakelists, each with about 3 lines. 2 source
>> files
>> > (.h .c), I did clean on CMakeCache.txt between each cmake . run, loaded
>>

Re: [CMake] complete rebuild

2010-12-30 Thread Anders Backman
Eh?

The files looks ok to me (in Sweden :-)
We are ahead of US (in time also :-) , but that shouldn't matter in this
case.

I unpacked the file, looked at the dates, and they are all from today around
noon (11:54).

Which means either you have to wait until after 11:54 or you have to touch
the files...
I can certainly touch and make a double check...

Ok. touched all files, ran cmake . and then:

cmake --build . --config Release

Everything is built for each time I execute the above command. So problem
resists.


/A

On Thu, Dec 30, 2010 at 3:29 PM, David Cole  wrote:

> The rar file you have pointed us to, when extracted, yields "modified
> time" stamps on the source files in the future. No matter how many
> times you rebuild such a project, you will always get rebuild problems
> with systems that base "modified-ness" on time stamps. Visual Studio /
> msbuild is such a system (as are most makes).
>
> The question is: why *doesn't* this happen with VS 2008 on the same
> source tree? It should... The CMakeLists.txt file is in the future as
> are most of the referenced c++ source files.
>
> Where did these source files from the future come from? (A colleague
> in another time zone, a computer with a clock problem, or did you do
> this on your laptop in another time zone and then adjust the time
> later and then try the build (travelling lately? :-) ... ) ??
>
> Please fix up the mod times, try again, and let us know if you still
> have problems.
>
>
> Also, just as an FYI, here's the reply I was working on before I
> discovered the time stamp madness:
>
> You can use:
> cmake --build . --config Release
>
> to build a CMake-based project via the command line regardless of the
> underlying native build system. And when you do, it will generate the
> "correct" call to that underlying native build system, whether it be
> make, devenv, msbuild or xcode.
>
> In the Visual Studio 10 case, the CMakeCache should have something
> like this defined:
>
> MAKECOMMAND:STRING=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
> ALL_BUILD.vcxproj /p:Configuration=${CTEST_CONFIGURATION_TYPE}
>
> In which case, that is the command line executed by a call to "cmake
> --build"
>
> MSBuild does not need the sln file, it can build the whole project
> based on ALL_BUILD.vcxproj and the other vcxproj files that it
> references. The sln file is only needed by Visual Studio.
>
>
> HTH,
> David
>
>
> On Thu, Dec 30, 2010 at 6:06 AM, Anders Backman  wrote:
> > I think I managed to reproduce the problem, partially.
> > The file below contains a project which for me reproduces the problem
> when I
> > use msbuild.
> > F7 (Build->BuildSolution) works (builds only once, then next time, it
> does
> > nothing).
> > So there is something in the combination of CMake and msbuild which
> causes
> > the problem.
> > We use Incredibuild, which uses msbuild, hence we get the problem also in
> > Incredibuild.
> > I do not know the difference between F7 and msbuild though.
> > http://rapidshare.com/files/439941435/DependencyBug.rar
> > Instructions:
> > 1. Unpack dep2.rar into a new empty directory
> > 2. install CMake (2.8.2 or later)
> > http://www.cmake.org/files/v2.8/cmake-2.8.3-win32-x86.exe
> > 3 go to the directory in a command prompt
> > 4. execute: cmake .
> > 5. msbuild DepBug.sln
> > 6. msbuild DepBug.sln << Builds everything again from scratch.
> >
> > /A
> > On Wed, Dec 29, 2010 at 1:26 PM, Anders Backman 
> wrote:
> >>
> >> Ok, Im already using the nightly build (from Tuesday I believe), as I
> >> discovered a bug in CMake yesterday.
> >> I will bug M$ too :-)
> >> /A
> >>
> >> On Wed, Dec 29, 2010 at 1:03 PM, David Cole 
> >> wrote:
> >>>
> >>> For Visual Studio generators, CMake does *NO* depedency analysis. It
> >>> generates solution and project files such that Visual Studio can do
> >>> all the dependency analysis and decide what to re-build when files
> >>> change.
> >>>
> >>> My advice to you would be:
> >>> - use only CMake 2.8.3 or newer (a nightly development build of CMake)
> >>> with Visual Studio 10 -- CMake 2.8.2 and earlier had significant bugs
> >>> related to VS10 that have since been resolved...
> >>> - using a newer CMake, isolate the problem to a minimally reproducible
> >>> case and then report a bug in the bug tracker about it including the
> >>> steps to reproduce the problem
> >>>
> >>> Reply here again

[CMake] Warning! PATH too long installer unable to modify PATH!

2011-03-14 Thread Anders Backman
Im using CPack with CMake 2.8 and when I am installing my app, I get the
message:

Warning! PATH too long installer unable to modify PATH!

Seems that Im not the first:

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

Is this an acceptable limitation? Or is there something Im doing wrong?
I have an "ordinary" path, not very long, and I cannot add my dir to the
path during install.

/A

--
___
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] Warning! PATH too long installer unable to modify PATH!

2011-03-17 Thread Anders Backman
Noone else experienced this problem?
/A

On Mon, Mar 14, 2011 at 4:37 PM, Anders Backman  wrote:

> Im using CPack with CMake 2.8 and when I am installing my app, I get the
> message:
>
> Warning! PATH too long installer unable to modify PATH!
>
> Seems that Im not the first:
>
> http://public.kitware.com/Bug/view.php?id=11931
>
> Is this an acceptable limitation? Or is there something Im doing wrong?
> I have an "ordinary" path, not very long, and I cannot add my dir to the
> path during install.
>
> /A
>
> --
>
>


-- 
__
Anders Backman, HPC2N
90187 Umeå University, Sweden
and...@cs.umu.se http://www.hpc2n.umu.se
Cell: +46-70-392 64 67
___
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] Specifying build directory

2010-02-17 Thread Anders Backman
Hi all.

Im using latest (2.8 CMake) under Windows, VisualStudio 2008.


When I mix x86 and x64 builds, I would like to separate the actual output
directory for the builds so that I dont get problems about mixing build
types.

Right now, the obj files etc is created in: src\foo.dir\Debug
no matter if I build in x86 OR in x64. I would like this to become:

src\foo.dir\X86\Debug and src\foo.dir\X64\Debug

Is there a way to specify this?


Cheers,
Anders

--
___
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] Associating files with command

2010-08-31 Thread Anders Backman
Hi all.

I have a directory of .pkg files to be processed by tolua. This in turn
generates a bunch of cpp files, which I then link into a library.

My problem right now is that, I would like to generate a project, where each
.pkg is associated with a custom command, so that I in visual studio (for
exampel) can "compile" each .pkg file individually.

I have managed to create a library, and to get all the generated cpp file
associated to the library+a custom target command which is executed
PRE_BUILD to the library.
But thats not quite what I would like. Because then I cant just compile one
.pkg file if I edit it. Using the above approach, requires me to build the
whole project, which compiles ALL .pkg files associated to it, not what I
want. I want to setup a proper dependency chain, so that If a .pkg file is
modified, the corresponding "generated"_xx.cpp is generated, and the project
is linked.

So I guess Im looking for something like:

add_library(myLib theMain.cpp
   generated_math.cpp
   math.pkg
)

set_source_files_properties(generated_math.cpp GENERATED)

being able to tell CMake that .pkg files are treated in a certain way:
The command that I want to execute for each .pkg is:

tolua -o generated_math.cpp -n math math.pkg

So any hints on how to do this?
I can certainly do this in VisualStudio, adding .pkg files to the project,
and setting the build events on it, but I need a portable solution...

/A
___
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] Associating files with command

2010-09-01 Thread Anders Backman
That was very close to what I wanted. But not to 100%, Im not sure if it is
possible to get to what I really want:

On one hand, I get one build rule for each tolua file, but it was not
associated to the actual tolua file. So I cannot do right click->compile on
the .pkg file.

I can however go further down, locate the matching rule, right click on that
and compile.
So for a large project with hundred of .pgk file, this is not optimal. I
would like to be able to do ctrl+F7 to compile the current file for
example...

Some slight modifications was needed on the function:

FUNCTION (wrap_tolua outvar)
set(outfiles)
foreach(in ${ARGN})
get_filename_component(inAbs ${in} ABSOLUTE)
get_filename_component(basename ${in} NAME_WE)
get_filename_component(path ${in} PATH)
file(MAKE_DIRECTORY ${path}/generated)
set(outfile "${path}/generated/generated_${basename}.cpp")
list(APPEND outfiles "${outfile}")
add_custom_command(OUTPUT "${outfile}"
COMMAND ${TOLUA_EXECUTABLE} -o "${outfile}" -n ${basename}
"${inAbs}" -L "lua/access_hook.lua"
DEPENDS "${inAbs}"
WORKING_DIRECTORY "${path}"
COMMENT "Wrapping ${basename} with tolua")
endforeach()
set(${outvar} ${outfiles} PARENT_SCOPE)
endfunction()

So unless someone knows how to add a file to a library, associate it with a
custom build command, this is what I have to stick to.

/Anders

On Tue, Aug 31, 2010 at 10:38 PM, Ryan Pavlik  wrote:

>  You were close:
>
> here's a function to handle the wrapping - could stick this in the
> Findtolua.cmake file that you've hopefully made.
>
> function wrap_tolua(outvar)
> set(outfiles)
> foreach(in ${ARGN})
> get_filename_component(inAbs ${in} ABSOLUTE)
> get_filename_component(basename ${in} NAME_WE)
> set(outfile
> "${CMAKE_CURRENT_BINARY_DIR}/generated_${basename}.cpp")
> list(APPEND outfile "${outfile}")
> add_custom_command(OUTPUT "${outfile}"
> COMMAND ${TOLUA_EXECUTABLE} -o "${outfile}" -n ${basename}
> "${inAbs}"
> DEPENDS "${inAbs}"
> COMMENT "Wrapping ${basename} with tolua")
> endforeach()
> set(${outvar} ${outfiles} PARENT_SCOPE)
> endfunction()
>
>
> Then, to do your example:
>
> find_package(tolua REQUIRED)
>
> wrap_tolua(TOLUA_WRAPPED_SRC math.pkg another.pkg)
> add_library(myLib theMain.cpp ${TOLUA_WRAPPED_SRC})
>
> (This is similar to how Qt and FLTK builds take place.)
>
> Hope this helps!  Please share your find module with this code added and
> tweaked, if needed - thanks!
>
> Ryan
>
>
> On 08/31/2010 02:44 PM, Anders Backman wrote:
>
> Hi all.
>
>  I have a directory of .pkg files to be processed by tolua. This in turn
> generates a bunch of cpp files, which I then link into a library.
>
>  My problem right now is that, I would like to generate a project, where
> each .pkg is associated with a custom command, so that I in visual studio
> (for exampel) can "compile" each .pkg file individually.
>
>  I have managed to create a library, and to get all the generated cpp file
> associated to the library+a custom target command which is executed
> PRE_BUILD to the library.
> But thats not quite what I would like. Because then I cant just compile one
> .pkg file if I edit it. Using the above approach, requires me to build the
> whole project, which compiles ALL .pkg files associated to it, not what I
> want. I want to setup a proper dependency chain, so that If a .pkg file is
> modified, the corresponding "generated"_xx.cpp is generated, and the project
> is linked.
>
>  So I guess Im looking for something like:
>
>  add_library(myLib theMain.cpp
>generated_math.cpp
>math.pkg
> )
>
>  set_source_files_properties(generated_math.cpp GENERATED)
>
>  being able to tell CMake that .pkg files are treated in a certain way:
> The command that I want to execute for each .pkg is:
>
>  tolua -o generated_math.cpp -n math math.pkg
>
>  So any hints on how to do this?
> I can certainly do this in VisualStudio, adding .pkg files to the project,
> and setting the build events on it, but I need a portable solution...
>
>  /A
>
>
> ___
> 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:

[CMake] Common Properties in Visual Studio

2012-02-21 Thread Anders Backman
Hi all.

I was wondering if someone ever have used CMake to configure a .NET
project, where one need to add References in:

Common Properties -> Framework and References

I need to locate some .dll-files from a .NET API and add those as
references to a project to be able to build against it.
I haven't found any relevant info on the web nor in the CMake documentation.

Have anyone succeeded in doing this? Or is it outside the scope of CMake?

Cheers and thanks for a great tool.

/A
-- 
______
Anders Backman, HPC2N
90187 Umeå University, Sweden
and...@cs.umu.se http://www.hpc2n.umu.se
Cell: +46-70-392 64 67
--

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] Common Properties in Visual Studio

2012-02-21 Thread Anders Backman
No plans on adding more thorough support for .NET projects or is that out
of the scope for CMake?

/A

On Tue, Feb 21, 2012 at 11:57 AM,  wrote:

> *I’m pretty sure that CMake does not directly support .NET projects.
> Here, we handle the csharp projects in visual studio and then use the
> include_external_msproject stuff to pull them in.*
>
> * *
>
> *In our case, we had to apply a patch to get it working correctly.  (see:
> *http://www.cmake.org/Bug/print_bug_page.php?bug_id=9742 )
>
> *We used the patch titled:
> 0001-ms-external-project-.NET-project-support-GUID-fixed.patch*
>
> * *
>
> * *
>
> * *
>
> *Aaron Meadows*
>
> * *
>
> *From:* cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] *On
> Behalf Of *Anders Backman
> *Sent:* Tuesday, February 21, 2012 9:55 AM
> *To:* cmake
> *Subject:* [CMake] Common Properties in Visual Studio
>
> ** **
>
> Hi all.
>
> ** **
>
> I was wondering if someone ever have used CMake to configure a .NET
> project, where one need to add References in:
>
> ** **
>
> Common Properties -> Framework and References
>
> ** **
>
> I need to locate some .dll-files from a .NET API and add those as
> references to a project to be able to build against it.
> 
>
> I haven't found any relevant info on the web nor in the CMake
> documentation.
>
> ** **
>
> Have anyone succeeded in doing this? Or is it outside the scope of CMake?*
> ***
>
> ** **
>
> Cheers and thanks for a great tool.
>
> ** **
>
> /A
>
> --
>  This email was sent to you by Thomson Reuters, the global news and
> information company. Any views expressed in this message are those of the
> individual sender, except where the sender specifically states them to be
> the views of Thomson Reuters.
>
--

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] Dependency list

2007-12-05 Thread Anders Backman
Hi all.

I have a question regarding library dependency.
Im using VC2005.


Assume the following:

I have a solution with a set of projects, three are libraries and one is an
application:

A.lib /A.dll

B.lib/B.dll : B depends on A.lib, so if I want to use B.lib somewhere,
A.libis also automatically added as a link dependency. Also
B.lib depends on X.lib which is a library external to the solution.
X.lib is also a X.lib/X.dll


C.lib, depends on B.lib, so in the list of libraries in Additional
Libraries, is now: A.lib, B.lib, X.lib


Application APP depends on C, so the list of libraries is then: A.lib ,
B.lib, X.lib, C.lib


Now if X.lib is a library with the implementation in a dynamic library, one
does not need to link C nor APP against X.lib because it is implicitly
already linked against B.lib


My question is now, is there a way to tell CMake to not include X.lib (which
is needed to build B.lib only) when using B.lib?
Otherwise the list of libraries in Additional LIbraries tends to be pretty
long...

It seems that Cmake always assumes that all libraries including their
dependencies should be used when building.
I realize that there is perhaps no way for CMake to automatically realize
whether a library should be included or not...
But is there a way around this?


/Anders


-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Library dependency

2007-12-06 Thread Anders Backman
Hi all.

I have a question regarding library dependency.
Im using VC2005.


Assume the following:

I have a solution with a set of projects, three are libraries and one is an
application:

A.lib /A.dll

B.lib/B.dll : B depends on A.lib, so if I want to use B.lib somewhere,
A.libis also automatically added as a link dependency. Also
B.lib depends on X.lib which is a library external to the solution.
X.lib is also a X.lib/X.dll


C.lib, depends on B.lib, so in the list of libraries in Additional
Libraries, is now: A.lib, B.lib, X.lib


Application APP depends on C, so the list of libraries is then: A.lib ,
B.lib, X.lib, C.lib


Now if X.lib is a library with the implementation in a dynamic library, one
does not need to link C nor APP against X.lib because it is implicitly
already linked against B.lib


My question is now, is there a way to tell CMake to not include X.lib (which
is needed to build B.lib only) when using B.lib?
Otherwise the list of libraries in Additional LIbraries tends to be pretty
long...

It seems that Cmake always assumes that all libraries including their
dependencies should be used when building.
I realize that there is perhaps no way for CMake to automatically realize
whether a library should be included or not...
But is there a way around this?


-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Filter in VisualStudio projects

2008-01-13 Thread Anders Backman
Hi all.

Is there a way to create/specify Filter (directories) in the VisualStudio
projects?

I would like to create a structure for the Source/Include
(filters/Directories) in the VisualStudio project for clarity.

Im using CMake 2.4 PAtch 7 and visualstudio 2005.

Thanks..



-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Precompiled headers

2008-05-06 Thread Anders Backman
Hi all.

Im kind of confused whether cmake does support pre-compiled headers
natively or not...

I have googled this and found some email around 2007 where various
suggestions was proposed, but I cant see it in the most recent
versions?

So is there are portable way of handling this in cmake?

Cheers,
Anders

-- 



 Anders Backman Email: [EMAIL PROTECTED]
 HPC2N/VRlab Phone: +46 (0)90-786 9936
 Umea university Cellular: +46 (0)70-392 64 67
 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126
 http://www.cs.umu.se/~andersb
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Precompiled headers

2008-05-06 Thread Anders Backman
Hi and thanks for the tip...

However, when I try this (Im using VS2008, CMake 2.4-patch 8) I get
some problems.
I have nailed this down to the following command:



#usual add_executable etc... works just fine!
add_executable(rendering file1.cpp ...)
.
.
.

get_target_property(OBJECT_FILES rendering SOURCES)
message("Msg: ${OBJECT_FILES}")



Output is:

Msg: NOTFOUND


Now I have tried quite a few various properties, and it seems to not
give me much output what so ever...

There are a few properties that actually works:

DEBUG_LOCATION
TYPE

That is, the one documented at: http://www.cmake.org/HTML/CMake-2.4.html

So, what version of cmake are you using?
Or are the SOURCES property a platform dependent property?

/Anders


On Tue, May 6, 2008 at 4:06 PM, Rodolfo Lima <[EMAIL PROTECTED]> wrote:
> Anders Backman escreveu:
>
>
>
> > So is there are portable way of handling this in cmake?
> >
>
>  I've been using the attached script and it has been working nicely for my
> needs.
>
>  The usage is:
>
>
>  include(PCHSupport)
>  add_executable(test test.cpp pch.h)
>  ADD_PRECOMPILED_HEADER(test pch.h)
>
>  I'm using it with gcc, but it should work with MS Visual Studio too.
>
>  Regards,
>  rod
>
> # - Try to find precompiled headers support for GCC 3.4 and 4.x
>  # Once done this will define:
>  #
>  # Variable:
>  #   PCHSupport_FOUND
>  #
>  # Macro:
>  #   ADD_PRECOMPILED_HEADER  _targetName _input  _dowarn
>
>  set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
>
>  IF(CMAKE_COMPILER_IS_GNUCXX)
> # Verifies if GCC supports precompiled header
> # Its version should be >= 3.4.0
> EXEC_PROGRAM(
> ${CMAKE_CXX_COMPILER}
> ARGS${CMAKE_CXX_COMPILER_ARG1} -dumpversion
> OUTPUT_VARIABLE gcc_compiler_version)
> #MESSAGE("GCC Version: ${gcc_compiler_version}")
> IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
> SET(PCHSupport_FOUND TRUE)
> ELSE()
> IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
> SET(PCHSupport_FOUND TRUE)
> ENDIF()
> ENDIF()
>
> SET(_PCH_include_prefix -I)
>  ELSE()
> IF(WIN32)
> SET(PCHSupport_FOUND TRUE) # for experimental msvc support
> SET(_PCH_include_prefix /I)
> ELSE()
> SET(PCHSupport_FOUND FALSE)
> ENDIF()
>  ENDIF()
>
>
>  MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
> SET(${_out_compile_flags} ${CMAKE_CXX_FLAGS} )
>
> STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
> if(${_flags_var_name})
> list(APPEND ${_out_compile_flags} ${${_flags_var_name}} )
> endif(${_flags_var_name})
>
> # If the compiler is g++ and the target type is shared library, we have
> # to add -fPIC to its compile flags.
> IF(CMAKE_COMPILER_IS_GNUCXX)
> GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
> IF(${_targetType} STREQUAL SHARED_LIBRARY)
> LIST(APPEND ${_out_compile_flags} -fPIC)
> ENDIF()
> ELSE(MSVC)
> LIST(APPEND ${_out_compile_flags}
> /Fd${CMAKE_CURRENT_BINARY_DIR}/${_PCH_current_target}.pdb)
> ENDIF()
>
> # Add all include directives...
> GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
> FOREACH(item ${DIRINC})
> LIST(APPEND ${_out_compile_flags} ${_PCH_include_prefix}${item})
> ENDFOREACH(item)
>
> # Add all definitions...
> GET_TARGET_PROPERTY(_compiler_flags ${_PCH_current_target}
> COMPILE_FLAGS)
> if(_compiler_flags)
> LIST(APPEND ${_out_compile_flags} ${_compiler_flags})
> endif()
>
> GET_DIRECTORY_PROPERTY(_directory_flags COMPILE_DEFINITIONS)
> if(_directory_flags)
> foreach(flag ${_directory_flags})
> LIST(APPEND ${_out_compile_flags} -D${flag})
> endforeach(flag)
> endif(_directory_flags)
>
> STRING(TOUPPER "COMPILE_DEFINITIONS_${CMAKE_BUILD_TYPE}"
> _defs_prop_name)
> GET_DIRECTORY_PROPERTY(_directory_flags ${_defs_prop_name})
> if(_directory_flags)
> foreach(flag ${_directory_flags})
> LIST(APPEND ${_out_compile_flags} -D${flag})
> endforeach(flag)
> endif(_directory_flags)
>
> get_target_property(_target_flags ${_PCH_current_target}
> COMPILE_DEFINITIONS)
> if(_target_flags)
> foreach(flag ${_target_flags})
> LIST(APPEND ${_out_compile_flags} -D${flag})
> endforeach(flag)
> endif(_target_flags)
>
> get_

Re: [CMake] Precompiled headers

2008-05-06 Thread Anders Backman
Ok, that make sense of course...Just read the 2.6 documentation.

Is there anyone that have tried to use this script in visualstudio
lately with good result?

I get quite a few very confusing errors and warnings related to this:


2>-- Build started: Project: agx_rendering, Configuration: Debug
Win32 --
2>Generating pch.h.pch
2>pch.cpp
2>Compiling...
2>main.cpp
2>.\src\agxOSG\main.cpp(1) : warning C4653: compiler option
'Optimizations (one or more of /Oawstgp[y]) or debug checks (one or
more of /GZ, /RTCcsu)' inconsistent with precompiled header; current
command-line option ignored
2>.\src\agxOSG\main.cpp(1) : error C2855: command-line option '/Zi'
inconsistent with precompiled header
2>.\src\agxOSG\main.cpp(1) : error C2859:
c:\projects\algoryx\anders\rendering\debug\agx_rendering.pdb is not
the pdb file that was used when this precompiled header was created,
recreate the precompiled header.
2>.\src\agxOSG\main.cpp(1) : error C2859:
c:\projects\algoryx\anders\rendering\debug\agx_rendering.idb is not
the idb file that was used when this precompiled header was created,
recreate the precompiled header.
2>agx_rendering.h
2>.\include\agxOSG\agx_rendering.h(1) : warning C4653: compiler option
'Optimizations (one or more of /Oawstgp[y]) or debug checks (one or
more of /GZ, /RTCcsu)' inconsistent with precompiled header; current
command-line option ignored
2>.\include\agxOSG\agx_rendering.h(1) : error C2855: command-line
option '/Zi' inconsistent with precompiled header
2>.\include\agxOSG\agx_rendering.h(1) : error C2859:
c:\projects\algoryx\anders\rendering\debug\agx_rendering.pdb is not
the pdb file that was used when this precompiled header was created,
recreate the precompiled header.
2>.\include\agxOSG\agx_rendering.h(1) : error C2859:
c:\projects\algoryx\anders\rendering\debug\agx_rendering.idb is not
the idb file that was used when this precompiled header was created,
recreate the precompiled header.
2>Generating Code...


Tampering a bit with the settings, for example setting
C++->General->Debug Information Format to Disabled, makes it build...

However this also disables debugging more or less.
So Im still struggling with how to get a larger project to work with
this. I guess I need to read up on precompiled headers...

Before spending too much time on this, is there anyone with good
experiences from using pch/cmake/visual studio?

/Anders

On Tue, May 6, 2008 at 9:11 PM, Anders Backman <[EMAIL PROTECTED]> wrote:
> Hi and thanks for the tip...
>
>  However, when I try this (Im using VS2008, CMake 2.4-patch 8) I get
>  some problems.
>  I have nailed this down to the following command:
>
>
>
>  #usual add_executable etc... works just fine!
>  add_executable(rendering file1.cpp ...)
>  .
>  .
>  .
>
>  get_target_property(OBJECT_FILES rendering SOURCES)
>  message("Msg: ${OBJECT_FILES}")
>
>
>
>  Output is:
>
>  Msg: NOTFOUND
>
>
>  Now I have tried quite a few various properties, and it seems to not
>  give me much output what so ever...
>
>  There are a few properties that actually works:
>
>  DEBUG_LOCATION
>  TYPE
>
>  That is, the one documented at: http://www.cmake.org/HTML/CMake-2.4.html
>
>  So, what version of cmake are you using?
>  Or are the SOURCES property a platform dependent property?
>
>  /Anders
>
>
>
>
>  On Tue, May 6, 2008 at 4:06 PM, Rodolfo Lima <[EMAIL PROTECTED]> wrote:
>  > Anders Backman escreveu:
>  >
>  >
>  >
>  > > So is there are portable way of handling this in cmake?
>  > >
>  >
>  >  I've been using the attached script and it has been working nicely for my
>  > needs.
>  >
>  >  The usage is:
>  >
>  >
>  >  include(PCHSupport)
>  >  add_executable(test test.cpp pch.h)
>  >  ADD_PRECOMPILED_HEADER(test pch.h)
>  >
>  >  I'm using it with gcc, but it should work with MS Visual Studio too.
>  >
>  >  Regards,
>  >  rod
>  >
>  > # - Try to find precompiled headers support for GCC 3.4 and 4.x
>  >  # Once done this will define:
>  >  #
>  >  # Variable:
>  >  #   PCHSupport_FOUND
>  >  #
>  >  # Macro:
>  >  #   ADD_PRECOMPILED_HEADER  _targetName _input  _dowarn
>  >
>  >  set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
>  >
>  >  IF(CMAKE_COMPILER_IS_GNUCXX)
>  > # Verifies if GCC supports precompiled header
>  > # Its version should be >= 3.4.0
>  > EXEC_PROGRAM(
>  > ${CMAKE_CXX_COMPILER}
>  > ARGS${CMAKE_CXX_COMPILER_ARG1} -dumpversion
>  > OUTPUT_VARIABLE gcc_compiler_version)
>  > #MESSAGE("GCC Version:

Re: [CMake] How to set Windows DLL version information

2009-01-29 Thread Anders Backman
so set_target_properties(target PROPERTIES VERSION 1.1 SOVERSION 1.1)

doesnt work under windows then?

/A

2008/12/26 David Cole :
> Add an *.rc file with the correct VS_VERSIONINFO resource in it as a source
> file for your dll...
> set(source_files
>   blah1.cpp
>   blah2.cpp
>   mydll.rc
>   )
> add_library(mydll SHARED ${source_files})
>
> On Fri, Dec 26, 2008 at 1:50 AM, sherman wilcox 
> wrote:
>>
>> Hi, I am trying to find information about how to add version
>> information to Windows DLLs. Something like adding a resource to the
>> DLL so that specific version information (product version, name, etc.)
>> shows up when the DLL properties are displayed. Simple file-version
>> resource stuff (VS_VERSIONINFO) - I see a line in the changelog that
>> indicates CMake seems to support something like this. The line I'm
>> referring to is:  "add support for windows dll version numbers" - I'm
>> not having much luck locating any information on the topic though. Can
>> anyone nudge me in the right direction?
>> ___
>> CMake mailing list
>> CMake@cmake.org
>> http://www.cmake.org/mailman/listinfo/cmake
>
>
> _______
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
__
Anders Backman, CTO  Algoryx Simulation AB
Uminova Science Park, Box 7973,  SE-907 19
Umeå,  Sweden
and...@algoryx.se http://www.algoryx.se
Cell: +46-70-392 64 67
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Bug: set_target_property VERSION WIN32

2009-01-29 Thread Anders Backman
Hi all

Old issue, but Im trying to set dll version from CMAKE on dynamic libraries.
After reading docs/release info I saw that version 2.4.4 included this
functionality.

However, Im trying without any success.
So IS this supported or not?

SET_TARGET_PROPERTIES( target PROPERTIES VERSION 1.2.3 )

??
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to set Windows DLL version information

2009-01-29 Thread Anders Backman
But I thought the whole idea was to get CMake to handle this?
It states in the documentation that it should be possible. No
exclusion about windows as far as I can see.

I saw this thread before but as CMake claims to have this
functionality (multiplatform) I thought that would be a much better
solution.

Comments?



On Thu, Jan 29, 2009 at 10:09 AM, Hendrik Sattler
 wrote:
> Anders Backman schrieb:
>> so set_target_properties(target PROPERTIES VERSION 1.1 SOVERSION 1.1)
>>
>> doesnt work under windows then?
>
> No. A RC file is not created automatically. A bit complicated as other
> information is included in that file, too. However, you can use
> configure_file to automatically fill in the information. An example from
> openobex:
> ---
> #include 
>
> VS_VERSION_INFO VERSIONINFO
>  FILEVERSION
> @openobex_VERSION_MAJOR@,@openobex_VERSION_MINOR@,@openobex_VERSION_PATCH@,0
>  PRODUCTVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
>  FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
> #ifndef NDEBUG
>  FILEFLAGS 0
> #else
>  FILEFLAGS VER_DEBUG
> #endif
>  FILEOS VOS_NT_WINDOWS32
> #ifdef OPENOBEX_EXPORTS
>  FILETYPE VFT_DLL
> #else
>  FILETYPE VFT_STATIC_LIB
> #endif
>  FILESUBTYPE VFT2_UNKNOWN
>  BEGIN
>BLOCK "StringFileInfo"
>BEGIN
>  BLOCK "0409"
>  BEGIN
>VALUE "FileDescription", "Object Exchange Protocol Implementation"
>VALUE "FileVersion", "@openobex_VERSION@"
>VALUE "InternalName", "openobex"
>VALUE "LegalCopyright", "Licensed under GPLv2 or any later version"
>VALUE "OriginalFilename", "openobex.dll"
>VALUE "ProductName", "OpenObex"
>VALUE "ProductVersion", "@VERSION@"
>  END
>END
>BLOCK "VarFileInfo"
>BEGIN
>  VALUE "Translation", 0x409, 1200
>END
>  END
> ---
>
> Basicly, that defines FileVersion and ProductVersion (which are often
> equal). It works with the MS rc compiler (rc.exe), not tested with
> windres.exe.
> Additionally, you can have a third version information in the VERSION
> flag in a .def file or as compiler argument on the command line. The
> dependency checker tool can show you all three of those version
> information.
>
> CMake could not create this file as e.g. a cmake project() call has no
> version information (why not? it could be the ProductVersion above).
>
> HS
>



--
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Build install from command line Visual Studio

2009-03-03 Thread Anders Backman
Hi all.

A slightly off-topic, but perhaps not question ;-)

Is there a way to build the INSTALL project from the command line?

Im trying the following:

devenv /useenv vrlib.sln /build   Debug /project INSTALL

Microsoft (R) Visual Studio Version 9.0.21022.8.
Copyright (C) Microsoft Corp. All rights reserved.
1>-- Skipped Build: Project: INSTALL, Configuration: Debug Win32 --
1>Project not selected to build for this solution configuration
== Build: 0 succeeded, 0 failed, 4 up-to-date, 1 skipped ==

The project INSTALL is not selected in the Build target Debug Win32.

Is there any way to build it anyway? It would be rather handy to be
able to build the CMake Install project from command line too, without
having to go into devenv and enable it for each project.
___
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] Build install from command line Visual Studio

2009-03-03 Thread Anders Backman
I would, if could. Thats the point.

The question was: "from the command line"
Not inside the IDE.



On Tue, Mar 3, 2009 at 7:29 PM, Timenkov Yuri  wrote:
> Just use "build project" command on it (through right click, for example).
>
> On 3/3/09, Anders Backman  wrote:
>> Hi all.
>>
>> A slightly off-topic, but perhaps not question ;-)
>>
>> Is there a way to build the INSTALL project from the command line?
>>
>> Im trying the following:
>>
>> devenv /useenv vrlib.sln /build   Debug /project INSTALL
>>
>> Microsoft (R) Visual Studio Version 9.0.21022.8.
>> Copyright (C) Microsoft Corp. All rights reserved.
>> 1>-- Skipped Build: Project: INSTALL, Configuration: Debug Win32 --
>> 1>Project not selected to build for this solution configuration
>> == Build: 0 succeeded, 0 failed, 4 up-to-date, 1 skipped ==
>>
>> The project INSTALL is not selected in the Build target Debug Win32.
>>
>> Is there any way to build it anyway? It would be rather handy to be
>> able to build the CMake Install project from command line too, without
>> having to go into devenv and enable it for each project.
>> ___
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
___
Powered by www.kitware.com

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

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

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


[CMake] Moving QT getting FIND_PACKAGE( Qt4 ) to work

2009-04-27 Thread Anders Backman
Hi all.
I have a problem where I pack the necessary stuff from qt into a dependency
zip file (.h, .lib, .dll and qmake.exe).

I have the path to qmake setup, so that qmake can be found.

Then I unpack that to some specified directory and run cmake on my own code.

My projectgs CMakeLists.txt call FIND_PACKAGE( Qt4 ) which among other
things call:

qmake -query QT_INSTALL_LIBS (

Now this returns with the ORIGINAL build directory, not the new one where
qmake actually exists.

Is there anything one can do to fix this?
I want CMake to use qmake so that it can locate things in relative to where
qmake actually is, and not where it was when I built qt.
___
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] Moving QT getting FIND_PACKAGE( Qt4 ) to work

2009-04-27 Thread Anders Backman
Ah thanks.But how to know what to copy from QT so that one can still build
applications?

That is, what is needed so that CMake accepts the copied files as a complete
qt installation?

.lib files,
.dll:s

which plugins?
mkspecs
which exe files?

Do I have to parse the FindQt4.cmake file, or is there a faster way to
figure this out?



On Mon, Apr 27, 2009 at 7:13 PM, Christian Ehrlicher wrote:

> Am Montag 27 April 2009 18:47:07 schrieb Anders Backman:
> > Hi all.
> > I have a problem where I pack the necessary stuff from qt into a
> dependency
> > zip file (.h, .lib, .dll and qmake.exe).
> >
> > I have the path to qmake setup, so that qmake can be found.
> >
> > Then I unpack that to some specified directory and run cmake on my own
> > code.
> >
> > My projectgs CMakeLists.txt call FIND_PACKAGE( Qt4 ) which among other
> > things call:
> >
> > qmake -query QT_INSTALL_LIBS (
> >
> > Now this returns with the ORIGINAL build directory, not the new one where
> > qmake actually exists.
> >
> > Is there anything one can do to fix this?
> > I want CMake to use qmake so that it can locate things in relative to
> where
> > qmake actually is, and not where it was when I built qt.
> This is not a cmake problem - you can't move the qt installation around. If
> you want to do this you have to provide a proper qt.conf (
> http://doc.trolltech.com/4.5/qt-conf.html )
>
> HTH
> 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
>
___
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] cpack, both debug and release in win32

2009-04-28 Thread Anders Backman
Is it possible (and if so how) to use Cpack and create a package with files
both  from Debug and Release under windows?

/A
___
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, both debug and release in win32

2009-04-29 Thread Anders Backman
When using INSTALL its possible to first build with release and then debug
into the same target directory, but with PACKAGE this is not possible.
First I build with release I get only release libraries into an installer
(running under windows using NSIS)
second, if I build with debug, I get a new one, with only debug.

Is there something I can do with the INSTALL command to get both
libraries/apps to be packaged into the same pack?

On Tue, Apr 28, 2009 at 7:23 PM, Anders Backman  wrote:

> Is it possible (and if so how) to use Cpack and create a package with files
> both  from Debug and Release under windows?
>
> /A
___
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] Changed lib name for jpeg?

2009-05-08 Thread Anders Backman
Hi.
Im using CMake 2.6 patch 1. in Windows.
It seems that it is has changed the way jpeg is found.

FindJPEG.cmake:

SET(JPEG_NAMES ${JPEG_NAMES} jpeg)


For all other image formats the following convention is used: libjpeg jpeg

Is there a reason why jpeg is not using the 'lib' convention?
Most dependency packages with jepeg for windows is named libjpeg.lib not
jpeg.lib


/Anders
___
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