also speed up compiling touched files under Linux

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17576 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2007-03-26 18:03:56 +00:00
parent e44591e1a5
commit 6ca10b4750
12 changed files with 7 additions and 18 deletions

View File

@ -21,7 +21,6 @@ else(NOT MERGE_FILES)
add_definitions(-D_WIN32_WINNT=0x500) add_definitions(-D_WIN32_WINNT=0x500)
lyx_merge_files(allinone boost_filesystem_sources) lyx_merge_files(allinone boost_filesystem_sources)
add_library(boost_filesystem STATIC add_library(boost_filesystem STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)
endif(NOT MERGE_FILES) endif(NOT MERGE_FILES)

View File

@ -21,7 +21,6 @@ if(NOT MERGE_FILES)
else(NOT MERGE_FILES) else(NOT MERGE_FILES)
lyx_merge_files(allinone boost_iostreams_sources) lyx_merge_files(allinone boost_iostreams_sources)
add_library(boost_iostreams STATIC add_library(boost_iostreams STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)

View File

@ -21,7 +21,6 @@ if(NOT MERGE_FILES)
else(NOT MERGE_FILES) else(NOT MERGE_FILES)
lyx_merge_files(allinone boost_signals_sources) lyx_merge_files(allinone boost_signals_sources)
add_library(boost_signals STATIC add_library(boost_signals STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)
endif(NOT MERGE_FILES) endif(NOT MERGE_FILES)

View File

@ -135,13 +135,13 @@ macro (LYX_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile )
set(${_filesExcludedFromFinalFile}) set(${_filesExcludedFromFinalFile})
file(WRITE ${_filenameCPP} "//autogenerated file\n") file(WRITE ${_filenameCPP} "//autogenerated file\n")
set(_file_macros ${CMAKE_CURRENT_BINARY_DIR}/${_filenameCPP}.h)
set(_file_const ${CMAKE_CURRENT_BINARY_DIR}/${_filenameCPP}_const.C) set(_file_const ${CMAKE_CURRENT_BINARY_DIR}/${_filenameCPP}_const.C)
set(_file_touched ${CMAKE_CURRENT_BINARY_DIR}/${_filenameCPP}_touched.C) set(_file_touched ${CMAKE_CURRENT_BINARY_DIR}/${_filenameCPP}_touched.C)
file(WRITE ${_file_macros} "// undef the macro when working on this file \n\n\n") file(WRITE ${_file_touched} "// touched files\n\n")
file(WRITE ${_file_const} "// const files\n#include \"${_file_macros}\" \n\n\n") file(APPEND ${_file_touched} "// look for non-const files\n")
file(WRITE ${_file_touched} "// touched files\n#include \"${_file_macros}\"\n\n\n") file(APPEND ${_file_touched} "#define DONT_INCLUDE_CONST_FILES\n")
file(APPEND ${_file_touched} "#include \"${_file_const}\"\n\n\n")
foreach (_current_FILE ${ARGN}) foreach (_current_FILE ${ARGN})
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE) get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
@ -161,10 +161,10 @@ macro (LYX_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile )
GET_FILENAME_COMPONENT(_file_name ${_abs_FILE} NAME_WE) GET_FILENAME_COMPONENT(_file_name ${_abs_FILE} NAME_WE)
STRING(REGEX REPLACE "-" "_" _file_name "${_file_name}" ) STRING(REGEX REPLACE "-" "_" _file_name "${_file_name}" )
set(__macro_name ASSUME_CONST_____${_file_name}) set(__macro_name ${_file_name}___ASSUME_CONST)
file(APPEND ${_file_macros} "#define ${__macro_name}\n")
file(APPEND ${_file_const} "#ifdef ${__macro_name}\n") file(APPEND ${_file_const} "#define ${__macro_name}\n")
file(APPEND ${_file_const} "#if defined(${__macro_name}) && !defined(DONT_INCLUDE_CONST_FILES)\n")
file(APPEND ${_file_const} "#include \"${_abs_FILE}\"\n") file(APPEND ${_file_const} "#include \"${_abs_FILE}\"\n")
file(APPEND ${_file_const} "#endif\n\n") file(APPEND ${_file_const} "#endif\n\n")

View File

@ -45,7 +45,6 @@ if(NOT MERGE_FILES)
else(NOT MERGE_FILES) else(NOT MERGE_FILES)
lyx_merge_files(allinone lyx_sources) lyx_merge_files(allinone lyx_sources)
set(lyx_sources set(lyx_sources
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C
${CMAKE_CURRENT_BINARY_DIR}/version.C ${CMAKE_CURRENT_BINARY_DIR}/version.C

View File

@ -23,7 +23,6 @@ if(NOT MERGE_FILES)
else(NOT MERGE_FILES) else(NOT MERGE_FILES)
lyx_merge_files(allinone frontends_sources) lyx_merge_files(allinone frontends_sources)
add_library(frontends STATIC add_library(frontends STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)
endif(NOT MERGE_FILES) endif(NOT MERGE_FILES)

View File

@ -18,7 +18,6 @@ if(NOT MERGE_FILES)
else(NOT MERGE_FILES) else(NOT MERGE_FILES)
lyx_merge_files(allinone controllers_sources) lyx_merge_files(allinone controllers_sources)
add_library(controllers STATIC add_library(controllers STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)
endif(NOT MERGE_FILES) endif(NOT MERGE_FILES)

View File

@ -42,7 +42,6 @@ if(MERGE_FILES)
SET_SOURCE_FILES_PROPERTIES(allinone_const.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}") SET_SOURCE_FILES_PROPERTIES(allinone_const.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
SET_SOURCE_FILES_PROPERTIES(allinone_touched.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}") SET_SOURCE_FILES_PROPERTIES(allinone_touched.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
add_library(frontend_qt4 STATIC add_library(frontend_qt4 STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C
${frontends_qt4_headers} ${frontends_qt4_headers}

View File

@ -19,7 +19,6 @@ if(NOT MERGE_FILES)
else(NOT MERGE_FILES) else(NOT MERGE_FILES)
lyx_merge_files(allinone graphics_sources) lyx_merge_files(allinone graphics_sources)
add_library(graphics STATIC add_library(graphics STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)
endif(NOT MERGE_FILES) endif(NOT MERGE_FILES)

View File

@ -21,7 +21,6 @@ if(NOT MERGE_FILES)
else(NOT MERGE_FILES) else(NOT MERGE_FILES)
lyx_merge_files(allinone insets_sources) lyx_merge_files(allinone insets_sources)
add_library(insets STATIC add_library(insets STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)
endif(NOT MERGE_FILES) endif(NOT MERGE_FILES)

View File

@ -22,7 +22,6 @@ if(NOT MERGE_FILES)
else(NOT MERGE_FILES) else(NOT MERGE_FILES)
lyx_merge_files(allinone mathed_sources) lyx_merge_files(allinone mathed_sources)
add_library(mathed STATIC add_library(mathed STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)
endif(NOT MERGE_FILES) endif(NOT MERGE_FILES)

View File

@ -37,7 +37,6 @@ else(NOT MERGE_FILES)
list(REVERSE support_sources) list(REVERSE support_sources)
lyx_merge_files(allinone support_sources) lyx_merge_files(allinone support_sources)
add_library(support STATIC add_library(support STATIC
${CMAKE_CURRENT_BINARY_DIR}/allinone.h
${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C ${CMAKE_CURRENT_BINARY_DIR}/allinone_const.C
${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C) ${CMAKE_CURRENT_BINARY_DIR}/allinone_touched.C)