Re: [CMake] Creating CMakeLists files from Solutions, Projects and Makefiles

2010-12-07 Thread Convey, Christian J CIV NUWC NWPT, B-171
Funny timing - I just did that today, at least in a crude manner.

Long story short: On Unix/Linux/Mac, you can use the command-line tools (grep, 
sed, cut, xargs, etc.) to get the list of all source file that comprise the 
solutions' projects.  If your needs aren't too fancy, it's pretty trivial to 
make a simple CMakeLists.txt file out of that list of files.

Granted it's just a start, but my point is, it may not me as tough of a nut to 
crack as you fear, at least for relatively simple projects.

 -Original Message-
 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On
 Behalf Of Paul Dean
 Sent: Tuesday, December 07, 2010 14:14
 To: cmake@cmake.org
 Subject: [CMake] Creating CMakeLists files from Solutions,Projects and
 Makefiles
 
 I've been using CMAKE for a few years now and I absolutley LOVE it.
 It makes my life as a programmer so much easier to be able to generate
 project files on any platform.
 
 What hurts is doing the reverse.  I can't count how many hours I've
 spent converting Solutions, Projects and Makefiles into CmakeLists
 files.
 
 I think if CMAKE could generate CMakeLists files from Solutions,
 Projects and Makefiles, it would be the ULTIMATE make system.
 Just think. Any time you run into some sorcecode that does not have a
 CMakeFile, you could generate it from the Makefile or Project.
 
 I can't imagine any programmer that would not love that ability.  I
 think it would be something great to add to CMAKE.
 What are everyones thoughts on that?
 
 Paul Dean
 I.T. Professional
 714-341-4519
 p...@pdcomputertech.com
 aquawic...@hotmail.com
 
 
 



smime.p7s
Description: S/MIME cryptographic signature
___
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] Creating CMakeLists files from Solutions, Projects and Makefiles

2010-12-07 Thread John Drescher
On Tue, Dec 7, 2010 at 2:14 PM, Paul Dean aquawic...@hotmail.com wrote:
 I've been using CMAKE for a few years now and I absolutley LOVE it.
 It makes my life as a programmer so much easier to be able to generate
 project files on any platform.

 What hurts is doing the reverse.  I can't count how many hours I've spent
 converting Solutions, Projects and Makefiles into CmakeLists files.

 I think if CMAKE could generate CMakeLists files from Solutions, Projects
 and Makefiles, it would be the ULTIMATE make system.
 Just think. Any time you run into some sorcecode that does not have a
 CMakeFile, you could generate it from the Makefile or Project.

 I can't imagine any programmer that would not love that ability.  I think it
 would be something great to add to CMAKE.
 What are everyones thoughts on that?


I would love to see a working QMake to CMake converter. And I mean one
that works for complicated QMake projects not just a simple executable
with a few headers and a few source files.

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] Creating CMakeLists files from Solutions, Projects and Makefiles

2010-12-07 Thread Andreas Mohr
Hi,

On Tue, Dec 07, 2010 at 02:25:18PM -0500, cmake-requ...@cmake.org wrote:
 Message: 4
 Date: Tue, 7 Dec 2010 13:14:19 -0600
 From: Paul Dean aquawic...@hotmail.com
 Subject: [CMake] Creating CMakeLists files from Solutions,Projects
   and Makefiles

 I've been using CMAKE for a few years now and I absolutley LOVE it. 
 It makes my life as a programmer so much easier to be able to generate 
 project files on any platform.
  
 What hurts is doing the reverse.  I can't count how many hours I've spent 
 converting Solutions, Projects and Makefiles into CmakeLists files.  
  
 I think if CMAKE could generate CMakeLists files from Solutions, Projects and 
 Makefiles, it would be the ULTIMATE make system.

http://sourceforge.net/projects/vcproj2cmake/ ?

OK, it's not integrated, it's got its sizeable share of warts considering its
current sorta-pre-beta status (I've currently got lots of notes for
improvements in the near future though), but... it might just help after all,
you know ;)

 Just think. Any time you run into some sorcecode that does not have a 
 CMakeFile, you could generate it from the Makefile or Project.

some sorcecode == 2MLOC on my side of the fence. It's working ok so far.

Andreas Mohr
___
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] Creating CMakeLists files from Solutions, Projects and Makefiles

2010-12-07 Thread Andreas Pakulat
On 07.12.10 14:31:56, John Drescher wrote:
 On Tue, Dec 7, 2010 at 2:14 PM, Paul Dean aquawic...@hotmail.com wrote:
  I've been using CMAKE for a few years now and I absolutley LOVE it.
  It makes my life as a programmer so much easier to be able to generate
  project files on any platform.
 
  What hurts is doing the reverse.  I can't count how many hours I've spent
  converting Solutions, Projects and Makefiles into CmakeLists files.
 
  I think if CMAKE could generate CMakeLists files from Solutions, Projects
  and Makefiles, it would be the ULTIMATE make system.
  Just think. Any time you run into some sorcecode that does not have a
  CMakeFile, you could generate it from the Makefile or Project.
 
  I can't imagine any programmer that would not love that ability.  I think it
  would be something great to add to CMAKE.
  What are everyones thoughts on that?
 
 
 I would love to see a working QMake to CMake converter. And I mean one
 that works for complicated QMake projects not just a simple executable
 with a few headers and a few source files.

If I recollect my lessons in computer-theory correctly from university,
then this is not possible for the general case. The problem is that
QMake's language is very close to a general-purpose programming
language, in particular it supports loops and conditions. This (again
IIRC) makes it impossible for a program to decide wether two qmake
projects or a qmake and a cmake project are semantically equal. It might
be possible to do a bit-by-bit conversion of qmake project files to
cmake, but I doubt the resulting cmake project is very useful except for
pure building. Maintaining those cmake-files is not going to be easy or
fun, nor would they match what a cmake developer would write if he set
up stuff from scratch for cmake to build the project. And without the
goal of switching from qmake to cmake, I don't see any point in doing a
conversion in the first place - after all qmake can build the project on
all interesting platforms already (else it would've been replaced).

And that doesn't even consider a configure-script which I think most
larger qmake projects have (like Qt itself).

Andreas

-- 
You are as I am with You.
___
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] Creating CMakeLists files from Solutions, Projects and Makefiles

2010-12-07 Thread Andreas Pakulat
On 07.12.10 13:14:19, Paul Dean wrote:
 
 I've been using CMAKE for a few years now and I absolutley LOVE it. 
 It makes my life as a programmer so much easier to be able to generate 
 project files on any platform.
  
 What hurts is doing the reverse.  I can't count how many hours I've spent 
 converting Solutions, Projects and Makefiles into CmakeLists files.  
  
 I think if CMAKE could generate CMakeLists files from Solutions, Projects and 
 Makefiles, it would be the ULTIMATE make system.
 Just think. Any time you run into some sorcecode that does not have a 
 CMakeFile, you could generate it from the Makefile or Project.
  
 I can't imagine any programmer that would not love that ability.  I think it 
 would be something great to add to CMAKE.
 What are everyones thoughts on that?   

See my answer to John, basically I doubt this is actually possible,
except for very static project-files like may VS solutions are. For
Makefile's or other build-tools like qmake its not going to work as they
allow arbitrary commands to be executed at any point. You may be able to
convert the files on a syntactic level, but that doesn't guarantee you
they're semantically equivalent. And I bet in most cases (except very
trivial ones) the generated CMake files will look very un-cmake'ish.

Not to mention configure-scripts written in some shell-language or as
C++ app...

Also whats the point of being able to generate cmake files from any
project files? If I just want to build the project then I can just as
well use the existing buildsystem to build. Why bother installing cmake,
if VS is already installed and the project has a solution file?

If you want to port a project to cmake, you'll probably also end up
restructuring some things wrt. the buildsystem, so a human needs to do
the conversion anyway (and automatic conversion will be ugly, see
above).

This is similar to automatic translation of languages. Yes todays tools
that do this are good enough so that you can get the meaning of a text
for many cases. But they're still not good enough to match what a native
speaker would've written or to be able to translate any arbitrary text
(especially 'slang', scientific texts etc. are causing problems for such
tools).

Andreas

-- 
You need more time; and you probably always will.
___
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] Creating CMakeLists files from Solutions, Projects and Makefiles

2010-12-07 Thread John Drescher
 And without the
 goal of switching from qmake to cmake, I don't see any point in doing a
 conversion in the first place - after all qmake can build the project on
 all interesting platforms already (else it would've been replaced).

The reason I want this is there are a few QMake based libraries I
would like to use with my projects but in their current form (without
proper cmake support / finders ...) it becomes difficult to integrate
them into projects that use CMake.

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] Creating CMakeLists files from Solutions, Projects and Makefiles

2010-12-07 Thread Andreas Pakulat
On 07.12.10 23:52:10, Andreas Pakulat wrote:
 On 07.12.10 13:14:19, Paul Dean wrote:
  
  I've been using CMAKE for a few years now and I absolutley LOVE it. 
  It makes my life as a programmer so much easier to be able to generate 
  project files on any platform.
   
  What hurts is doing the reverse.  I can't count how many hours I've spent 
  converting Solutions, Projects and Makefiles into CmakeLists files.  
   
  I think if CMAKE could generate CMakeLists files from Solutions, Projects 
  and Makefiles, it would be the ULTIMATE make system.
  Just think. Any time you run into some sorcecode that does not have a 
  CMakeFile, you could generate it from the Makefile or Project.
   
  I can't imagine any programmer that would not love that ability.  I think 
  it would be something great to add to CMAKE.
  What are everyones thoughts on that?   
 
 See my answer to John, basically I doubt this is actually possible,
 except for very static project-files like may VS solutions are. For
 Makefile's or other build-tools like qmake its not going to work as they
 allow arbitrary commands to be executed at any point. You may be able to
 convert the files on a syntactic level, but that doesn't guarantee you
 they're semantically equivalent. And I bet in most cases (except very
 trivial ones) the generated CMake files will look very un-cmake'ish.
 
 Not to mention configure-scripts written in some shell-language or as
 C++ app...
 
 Also whats the point of being able to generate cmake files from any
 project files? If I just want to build the project then I can just as
 well use the existing buildsystem to build. Why bother installing cmake,
 if VS is already installed and the project has a solution file?
 
 If you want to port a project to cmake, you'll probably also end up
 restructuring some things wrt. the buildsystem, so a human needs to do
 the conversion anyway (and automatic conversion will be ugly, see
 above).
 
 This is similar to automatic translation of languages. Yes todays tools
 that do this are good enough so that you can get the meaning of a text
 for many cases. But they're still not good enough to match what a native
 speaker would've written or to be able to translate any arbitrary text
 (especially 'slang', scientific texts etc. are causing problems for such
 tools).

PS: All the above doesn't mean I think conversion-tools are totally
useless. In fact the automake-to-cmake tool I think is very useful to
get a basic skeleton cmake project up in no time. That way one can
concentrate on the 'real work', i.e. porting the library/feature checks
and making sure that includes and link-libs are set up correctly.

Andreas

-- 
You are so boring that when I see you my feet go to sleep.
___
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