final compilation: wheel was already invented :(

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17529 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2007-03-23 23:56:27 +00:00
parent e53e4d0672
commit 65870c3168
7 changed files with 45 additions and 24 deletions

View File

@ -208,7 +208,7 @@ namespace boost { namespace spirit {
result_t hit = scan.empty_match();
std::size_t n = m_min;
for (std::size_t i = 0; ; ++i)
for (std::size_t i = 0;; ++i)
{
typename ScannerT::iterator_t save = scan.first;
result_t next = this->subject().parse(scan);

View File

@ -680,7 +680,7 @@ namespace boost
{
std::string narrow_short_form;
std::wstring short_form;
for ( DWORD buf_sz( static_cast<DWORD>( ph.size()+1 )); ; )
for ( DWORD buf_sz( static_cast<DWORD>( ph.size()+1 ));; )
{
boost::scoped_array<wchar_t> buf( new wchar_t[buf_sz] );
DWORD sz( ::GetShortPathNameW( ph.c_str(), buf.get(), buf_sz ) );
@ -1040,7 +1040,7 @@ namespace boost
BOOST_FILESYSTEM_DECL fs::system_error_type
get_current_path_api( std::string & ph )
{
for ( long path_max = 32; ; path_max *=2 ) // loop 'til buffer large enough
for ( long path_max = 32;; path_max *=2 ) // loop 'til buffer large enough
{
boost::scoped_array<char>
buf( new char[static_cast<std::size_t>(path_max)] );

View File

@ -126,16 +126,36 @@ MACRO (LYX_AUTOMOC)
endmacro (LYX_AUTOMOC)
# For all C++ sources a big source file which includes all the files
# is created.
# This is not done for the C sources, they are just gathered in a separate list
# because they are usually not written by KDE and as such not intended to be
# compiled all-in-one.
macro (KDE4_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile )
set(${_filesExcludedFromFinalFile})
file(WRITE ${_filenameCPP} "//autogenerated file\n")
foreach (_current_FILE ${ARGN})
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
# don't include any generated files in the final-file
# because then cmake will not know the dependencies
get_source_file_property(_isGenerated ${_abs_FILE} GENERATED)
if (_isGenerated)
list(APPEND ${_filesExcludedFromFinalFile} ${_abs_FILE})
else (_isGenerated)
# don't include c-files in the final-file, because they usually come
# from a 3rd party and as such are not intended to be compiled all-in-one
string(REGEX MATCH ".+\\.c$" _isCFile ${_abs_FILE})
if (_isCFile)
list(APPEND ${_filesExcludedFromFinalFile} ${_abs_FILE})
else (_isCFile)
file(APPEND ${_filenameCPP} "#include \"${_abs_FILE}\"\n")
endif (_isCFile)
endif (_isGenerated)
endforeach (_current_FILE)
endmacro (KDE4_CREATE_FINAL_FILES)
macro(lyx_merge_files _filename _list)
message("----- Generating merged file ${_filename}\n")
set(_tmp)
set(_content)
foreach(_current ${${_list}})
file(READ ${_current} _tmp)
set(_content ${_content} "\n\n\n\n//----------------------------------------\n/*\n file: ${_current} \n*/\n\n")
set(_content ${_content} ${_tmp})
endforeach(_current)
file(WRITE ${_filename} "${_content}")
KDE4_CREATE_FINAL_FILES(${_filename} _nix_nothing ${${_list}})
endmacro(lyx_merge_files _list _filename)

View File

@ -31,6 +31,7 @@ include_directories(
${TOP_SRC_DIR}/src/frontends/controllers
${CMAKE_CURRENT_BINARY_DIR})
#set(MERGE_FILES 0)
if(MERGE_FILES AND MSVC)
lyx_merge_files(${CMAKE_CURRENT_BINARY_DIR}/frontends_qt4_allinone.C frontends_qt4_sources)
set(depends_moc_uic ${frontends_qt4_headers} ${ui_files})

View File

@ -54,14 +54,14 @@ else(MSVC)
"-include ${TOP_SRC_DIR}/src/tex2lyx/lyxfont.h -include ${TOP_SRC_DIR}/src/tex2lyx/Spacing.h")
endif(MSVC)
if(NOT MERGE_FILES)
#TODO
#if(NOT MERGE_FILES)
add_executable(tex2lyx ${tex2lyx_sources} ${LINKED_FILES} ${tex2lyx_headers})
else(NOT MERGE_FILES)
set(tex2lyx_sources_all ${tex2lyx_sources} ${LINKED_FILES})
lyx_merge_files(${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C tex2lyx_sources_all)
add_executable(tex2lyx ${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C)
endif(NOT MERGE_FILES)
#else(NOT MERGE_FILES)
# set(tex2lyx_sources_all ${tex2lyx_sources} ${LINKED_FILES})
# lyx_merge_files(${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C tex2lyx_sources_all)
# add_executable(tex2lyx ${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C)
#endif(NOT MERGE_FILES)
target_link_libraries(tex2lyx

View File

@ -93,7 +93,7 @@ namespace {
it.top().pos() = 0;
DocIterator et = c;
et.top().pos() = et.top().asInsetMath()->cell(et.top().idx()).size();
for (size_t i = 0; ; ++i) {
for (size_t i = 0;; ++i) {
int xo;
int yo;
InsetBase const * inset = &it.inset();

View File

@ -753,7 +753,7 @@ getVectorFromStringT(String const & str, String const & delim)
if (str.empty())
return vec;
String keys = rtrim(str);
for(; ;) {
for(;;) {
typename String::size_type const idx = keys.find(delim);
if (idx == String::npos) {
vec.push_back(ltrim(keys));