Maik Beckmann | 1 Oct 2007 11:30
Picon
Picon

Fortran 77/9x enhancements

I opened a bug-report as a repository for patches and a place for discussions 
on this issue:
http://www.cmake.org/Bug/view.php?id=5809

please join to...
   ... contribute patches,
   ... test the patches, 
   ... report things which doesn't work, 
   ... spend simplified examples of things which doesn't work,
   ... share you expert knowledge of CMake.

Regards,
Maik Beckmann
Brad King | 1 Oct 2007 15:18
Favicon
Gravatar

Re: Shared library OutputFile path for Visual Studio

Philip Lowman wrote:
> Neal Meyer wrote:
>> Is there any particular reasoning why for a shared library project the
>> .dll file is created in the LibraryOutputPath rather then the
>> ExecutableOutputPath.  The Import library(.lib) should be placed in
>> the LibraryOutputPath, but it doesn't make any sense for the .dll to
>> be placed there as well.
>>
>> I end up having to copy the .dll output with a post-build step, which
>> works but is complete a waste of time and just makes the cmake file
>> more complex for what seems like a very simple case.
> 
> Here Here!
> 
> I've had to add custom post-build rules for this issue before too. Other
> users I know of in the OSG project have resorted to trickery with the
> PREFIX target option to try to work around this problem.
> 
> I've filed this as bug #5805 (feature request) in the bugtracker.
> 
> Implementing this modification for the Visual Studio generators is
> trivial (I did it two weeks ago by coincidence when I came across this
> issue yet again).  I had a look at the Makefile and Makefile generators
> that same day though and nearly had a stroke :).  Provided someone could
> give me some pointers as to where to start I probably could add the
> support for this.

This was fixed months ago in the CVS version of CMake.  I've updated the
bug report to link to information on the fix.  Summary:

(Continue reading)

Josef Karthauser | 1 Oct 2007 15:26
Favicon

Building both make files and visual studio files.

Hello again,

I'm wondering what the best way to going about producing make files and
visual studio files at the same time is.  I want to use nmake to build
my tree, but want visual studio project files so that the developers can
continue to with within the visual studio environment, which would call
the make as an external build tool.

Does anyone do anything like this?  I'm really new to cmake, and so am
still working out the ropes.  I apologise if this is a really obvious
question.

Thanks,
Joe 
Torsten Martinsen | 1 Oct 2007 15:42
Picon

RE: Building both make files and visual studio files.

Josef Karthauser <> wrote:

> Hello again,
>
> I'm wondering what the best way to going about producing make files
> and visual studio files at the same time is.  I want to use nmake to
> build my tree, but want visual studio project files so that the
> developers can continue to with within the visual studio environment,
> which would call the make as an external build tool.

I would recommend to set up CMake to generate .vcproj files, and use
those both for the IDE and for command-line builds (using vcbuild.exe or
devenv.exe).

-Torsten

This e-mail and any files sent with it contain information that may be privileged or confidential and is the
property of the GateHouse Group. This information is intended solely for the person to whom it is
addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy,
disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in
error, please notify the sender immediately, and delete all copies of this message. In accordance with
GateHouse Security Policy, e-mails sent or received may be monitored.
Josef Karthauser | 1 Oct 2007 15:57
Favicon

RE: Building both make files and visual studio files.

> -----Original Message-----
> From: Torsten Martinsen [mailto:tma@...]
> Sent: 01 October 2007 14:43
> To: Josef Karthauser; Cmake Mailing List
> Subject: RE: [CMake] Building both make files and visual studio files.
> 
> Josef Karthauser <> wrote:
> 
> > Hello again,
> >
> > I'm wondering what the best way to going about producing make files
> > and visual studio files at the same time is.  I want to use nmake to
> > build my tree, but want visual studio project files so that the
> > developers can continue to with within the visual studio
environment,
> > which would call the make as an external build tool.
> 
> I would recommend to set up CMake to generate .vcproj files, and use
> those both for the IDE and for command-line builds (using vcbuild.exe
or
> devenv.exe).
> 

Alas I don't think that that is going to be flexible enough.  In order
to do that we would need more flexibility within cmake for the
generation of the vcproj files, as it only knows about conventional
builds.  For example Xbox360 builds don't have a VCCLCompilerTool,
instead having a 
VCCLX360CompilerTool.

(Continue reading)

Sylvain Benner | 1 Oct 2007 16:12

Re: Building both make files and visual studio files.


Alas I don't think that that is going to be flexible enough. In order to do that we would need more flexibility within cmake for the generation of the vcproj files, as it only knows about conventional builds. For example Xbox360 builds don't have a VCCLCompilerTool, instead having a VCCLX360CompilerTool. I guess that answers my question - If I want custom vcproj files I'll have to write them myself, somehow.
To address this issue I had to patch the cmake source files like this:

          if(this->PlatformName == "XBox 360")
          {
              aCompilerTool = "VCCLX360CompilerTool";
          }
          else
          {
              aCompilerTool = "VCCLCompilerTool";
          }

Hopefully for us, the XBox 360 is the only platform that needs this modification. The PS3 has a custom tool but it can be ignored since it relies on settings of the default tools.

There is another issue, the platform names in SLN files can have 2 different names:
-one condensed name without any spaces
-one full length name
So you can encounter this kind of line :
{F064F4EF-CE8A-4613-885E-3E80C6683EF9}.runtime|XBox360.Build.0 = runtime|Xbox 360
To address this we had to add a "Real name" member to the global generator and set this real name in our top level CMakeLists.txt.

Well, to handle Visual Studio nicely and completely is a big work. You can fill a request feature here: http://www.cmake.org/Bug

--Sylvain
_______________________________________________
CMake mailing list
CMake@...
http://www.cmake.org/mailman/listinfo/cmake
Josef Karthauser | 1 Oct 2007 16:27
Favicon

RE: Building both make files and visual studio files.

	To address this issue I had to patch the cmake source files like this:

          if(this->PlatformName == "XBox 360")
          {
              aCompilerTool = "VCCLX360CompilerTool";
          }
          else
          {
              aCompilerTool = "VCCLCompilerTool";
          }

	Hopefully for us, the XBox 360 is the only platform that needs this 	modification. The PS3 has a custom tool
but it can be ignored since it 	relies on settings of the default tools.

How do you go about setting the platformname from within the CMakeLists.txt?  I had a look at the code, but
concluded that it wasn't configurable.  Is that another local hack?

	There is another issue, the platform names in SLN files can have 2 different names:
	-one condensed name without any spaces
	-one full length name
	So you can encounter this kind of line :
	{F064F4EF-CE8A-4613-885E-3E80C6683EF9}.runtime|XBox360.Build.0 = 	runtime|Xbox 360
	To address this we had to add a "Real name" member to the global 	generator and set this real name in our top
level CMakeLists.txt.

Hmm, yes, it's a pain.  I think I'm still inclined to do it in make files for this reason.  I suspect I'll try
adding another local make generator for makefile type projects, and get them produced in a separate run of
cmake, as you originally suggested.

Joe
Sylvain Benner | 1 Oct 2007 15:43

Re: Building both make files and visual studio files.


Josef Karthauser a écrit :
> Hello again,
>
> I'm wondering what the best way to going about producing make files and
> visual studio files at the same time is.  I want to use nmake to build
> my tree, but want visual studio project files so that the developers can
> continue to with within the visual studio environment, which would call
> the make as an external build tool.
>
> Does anyone do anything like this?  I'm really new to cmake, and so am
> still working out the ropes.  I apologise if this is a really obvious
> question.
>
> Thanks,
> Joe 
>   
You'll have to run cmake twice, once for generation the makefiles, and 
once for generation the Visual Studio files.
The Visual Studio project should be of type Makefile (and not 
Executable, Shared library etc...).
But I don't know how to generate a project with the Configuration Type 
setting to "Makefile". Maybe using the Configuration Type "Utilitiy" it 
is possible.
Anyone know how to achieve this ?

--Sylvain
Sylvain Benner | 1 Oct 2007 16:52

Re: Building both make files and visual studio files.


> How do you go about setting the platformname from within the CMakeLists.txt?  I had a look at the code, but
concluded that it wasn't configurable.  Is that another local hack?
Actually in the global generator we added a "RealPlatformName" AND a 
"Platform" members.

We pass a custom "PLATFORM" variable to cmake on the command line, like 
this:

cmake.exe -G "Some Generator" -D -D "PLATFORM:STRING=Win32_Dynamic"

Then in the top level CMakeLists.txt we set the "real" platform name.

IF(PLATFORM MATCHES "Win32" OR PLATFORM MATCHES "PS3")
    SET(PLATFORM_REAL_CONFIGNAME "Win32")
ENDIF(PLATFORM MATCHES "Win32" OR PLATFORM MATCHES "PS3")

in our custom generator, we get these variables like this:

this->Makefile->GetRequiredDefinition("PLATFORM");
this->Makefile->GetRequiredDefinition("PLATFORM_REAL_CONFIGNAME");

--Sylvain
Alan W. Irwin | 1 Oct 2007 17:54
Picon
Picon

Re: Fortran 77/9x enhancements

On 2007-10-01 11:30+0200 Maik Beckmann wrote:

> I opened a bug-report as a repository for patches and a place for discussions
> on this issue:
> http://www.cmake.org/Bug/view.php?id=5809
>
> please join to...
>   ... contribute patches,
>   ... test the patches,
>   ... report things which doesn't work,
>   ... spend simplified examples of things which doesn't work,
>   ... share you expert knowledge of CMake.
>
> Regards,
> Maik Beckmann
> _______________________________________________
> CMake mailing list
> CMake@...
> http://www.cmake.org/mailman/listinfo/cmake
>

Good idea, Maik, to concentrate fortran bug fixing/discussion/testing in one
place.  However, there is a barrier to entry here for (Fortran) newbies
because you have to have an account established and also login to the
account before you can even view bug reports.  Because of that issue, you
might want to consider moving to the wiki instead.  The one potential wiki
issue that springs to mind is whether you can upload files.  I haven't
tested that myself, but there certainly is a button to do that.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

Gmane