From: Peter Kümmel Date: Fri, 23 Mar 2007 23:56:27 +0000 (+0000) Subject: final compilation: wheel was already invented :( X-Git-Tag: 1.6.10~10525 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=65870c3168718d341b1e4f49e5cf91e6f5cf0c69;p=features.git final compilation: wheel was already invented :( git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17529 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/boost/boost/spirit/utility/loops.hpp b/boost/boost/spirit/utility/loops.hpp index f42776a029..65cc4a3065 100644 --- a/boost/boost/spirit/utility/loops.hpp +++ b/boost/boost/spirit/utility/loops.hpp @@ -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); diff --git a/boost/libs/filesystem/src/operations.cpp b/boost/libs/filesystem/src/operations.cpp index c51f5246fc..e42e7a7f50 100644 --- a/boost/libs/filesystem/src/operations.cpp +++ b/boost/libs/filesystem/src/operations.cpp @@ -680,7 +680,7 @@ namespace boost { std::string narrow_short_form; std::wstring short_form; - for ( DWORD buf_sz( static_cast( ph.size()+1 )); ; ) + for ( DWORD buf_sz( static_cast( ph.size()+1 ));; ) { boost::scoped_array 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 buf( new char[static_cast(path_max)] ); diff --git a/development/cmake/modules/LyXMacros.cmake b/development/cmake/modules/LyXMacros.cmake index 7a946e3a14..3b157a322b 100644 --- a/development/cmake/modules/LyXMacros.cmake +++ b/development/cmake/modules/LyXMacros.cmake @@ -126,16 +126,36 @@ MACRO (LYX_AUTOMOC) endmacro (LYX_AUTOMOC) -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}") -endmacro(lyx_merge_files _list _filename) +# 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) + KDE4_CREATE_FINAL_FILES(${_filename} _nix_nothing ${${_list}}) +endmacro(lyx_merge_files _list _filename) \ No newline at end of file diff --git a/development/cmake/src/frontends/qt4/CMakeLists.txt b/development/cmake/src/frontends/qt4/CMakeLists.txt index 4d07fd83f5..dfc1e03009 100644 --- a/development/cmake/src/frontends/qt4/CMakeLists.txt +++ b/development/cmake/src/frontends/qt4/CMakeLists.txt @@ -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}) diff --git a/development/cmake/src/tex2lyx/CMakeLists.txt b/development/cmake/src/tex2lyx/CMakeLists.txt index e206f44ecf..8c4cc874e7 100644 --- a/development/cmake/src/tex2lyx/CMakeLists.txt +++ b/development/cmake/src/tex2lyx/CMakeLists.txt @@ -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 diff --git a/src/cursor.C b/src/cursor.C index 5d72bfff89..387fb087df 100644 --- a/src/cursor.C +++ b/src/cursor.C @@ -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(); diff --git a/src/support/lstrings.C b/src/support/lstrings.C index 2ed7d93e4c..fe161be991 100644 --- a/src/support/lstrings.C +++ b/src/support/lstrings.C @@ -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));