Andre Poenitz wrote:
> On Tue, Mar 20, 2007 at 06:45:29PM +0000, Angus Leeming wrote:
>> Andre Poenitz <[EMAIL PROTECTED]> writes:
>>> Each time I try to get back to work on LyX I am appalled by the
>>> time it takes to compile and link.
>> Agreed.
>>
>>> Testcase is src/graphics. Pretty selfcontained, modern C++ the
>>> way we like it. A total of 2608 lines in 11 *.C files.
>>> Now, cp *.C Graphics.C, adjust Makefile.am
>> It seems to me that multiple .C files are an aid to humans. I find it much
>> easier to navigate such a setup. I suspect I'm not alone. Remember,
>> discoverability is important, Andre.
>>
>> Given that your solution to the problems that the compiler has with these 11
>> files is so simple, why don't we introduce a new rule to the makefile to do
>> just as you suggest? Ie, let the makefile perform the concatenation?
>
> It's an interesting suggestion.
I've added this feature to the cmake build:
cmake ../trunk/development/cmake -Dmerge=1
then all *.C files but the files of the boost and the qt4 directories
are merged into one file. This happens while the configure process.
On windows it runs without changes to a actual co, for linux you need
the attached patch.
And it is faster!!
>
>> This may be truly hard with Automake, but it's surely do-able with scons.
>
> automake is still the offical toolkit as far as I am aware.
>
> Andre'
>
--
Peter Kümmel
Index: src/support/filetools.C
===================================================================
--- src/support/filetools.C (Revision 17495)
+++ src/support/filetools.C (Arbeitskopie)
@@ -67,7 +66,20 @@
namespace fs = boost::filesystem;
+#include <boost/lexical_cast.hpp>
+
namespace lyx {
+
+template<>
+string convert<string>(int i)
+{
+ return boost::lexical_cast<string>(i);
+}
+
+}
+
+
+namespace lyx {
namespace support {
bool isLyXFilename(string const & filename)
Index: src/support/convert.C
===================================================================
--- src/support/convert.C (Revision 17495)
+++ src/support/convert.C (Arbeitskopie)
@@ -51,13 +51,6 @@
template<>
-string convert<string>(int i)
-{
- return lexical_cast<string>(i);
-}
-
-
-template<>
docstring convert<docstring>(int i)
{
return lyx::from_ascii(lexical_cast<string>(i));