Re: [CMake] Compile multiple-sources at a time?

2012-01-20 Thread Eric Noulard
2012/1/20 Oliver kfsone Smith osm...@playnet.com:
 Eric Noulard said the following on 1/20/2012 1:26 AM:

 2012/1/19 Oliver kfsone Smithosm...@playnet.com:

 I realize not every build environment supports the option, but is there a
 way to get CMake to generate Makefiles which aggregate source files, e.g.

 $ g++ -pipe -o library.a lib1.cpp lib2.cpp lib3.cpp
 $ g++ -pipe -o exeutable file1.cpp file2.cpp file3.cpp library.a

 I don't think so.
 Why do you want to do that?
 Are you seeking for performance? Thus the -pipe option?

 -combine :)

I see.
From this
http://stackoverflow.com/questions/6347041/cmake-and-gcc-combine
I think combine disappeared from gcc 4.6
and -flto authorizes separate compilation
http://lwn.net/Articles/387122/
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

 CMake generates makefiles that handle the -j option of make quite nicely?

 As long as you turn off colorizing - otherwise it's a bit messy :)

Or you look elsewhere until it's over :-]
Beautifulness and speed not always go together.

PS: Try not to drop the ML address.
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

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

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

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


Re: [CMake] Compile multiple-sources at a time?

2012-01-20 Thread Michael Hertling
On 01/19/2012 11:09 PM, Oliver kfsone Smith wrote:
 I realize not every build environment supports the option, but is there 
 a way to get CMake to generate Makefiles which aggregate source files, e.g.
 
 $ g++ -pipe -o library.a lib1.cpp lib2.cpp lib3.cpp
 $ g++ -pipe -o exeutable file1.cpp file2.cpp file3.cpp library.a
 
 
 - Oliver

Aggregating source files in this way fundamentally collides with the
concept of source file properties, a well-established CMake feature.
Thus, it would require a check if the aggregated source files are to
be compiled with exactly the same flags/definitions/etc. If not, one
would need to trade off aggregation against source file properties,
perhaps by use of a variable/property/policy or whatever solution
might suit. Not that trivial, IMO.

Regards,

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


[CMake] Compile multiple-sources at a time?

2012-01-19 Thread Oliver kfsone Smith
I realize not every build environment supports the option, but is there 
a way to get CMake to generate Makefiles which aggregate source files, e.g.


$ g++ -pipe -o library.a lib1.cpp lib2.cpp lib3.cpp
$ g++ -pipe -o exeutable file1.cpp file2.cpp file3.cpp library.a


- Oliver

--

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] Compile multiple-sources at a time?

2012-01-19 Thread Eric Noulard
2012/1/19 Oliver kfsone Smith osm...@playnet.com:
 I realize not every build environment supports the option, but is there a
 way to get CMake to generate Makefiles which aggregate source files, e.g.

 $ g++ -pipe -o library.a lib1.cpp lib2.cpp lib3.cpp
 $ g++ -pipe -o exeutable file1.cpp file2.cpp file3.cpp library.a

I don't think so.
Why do you want to do that?
Are you seeking for performance? Thus the -pipe option?

CMake generates makefiles that handle the -j option of make quite nicely?
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

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

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

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