cmake: overwrite allinone files on each cmake run

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17579 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2007-03-26 20:03:31 +00:00
parent e667f92c11
commit b0cb0eaa25

View File

@ -133,12 +133,14 @@ endmacro (LYX_AUTOMOC)
# compiled all-in-one. # compiled all-in-one.
macro (LYX_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile ) macro (LYX_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile )
set(${_filesExcludedFromFinalFile}) set(${_filesExcludedFromFinalFile})
file(WRITE ${_filenameCPP} "//autogenerated file\n")
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_touched} "// touched files\n\n") file(WRITE ${_file_const} "//autogenerated file\n")
file(WRITE ${_file_touched} "//autogenerated file\n")
file(APPEND ${_file_touched} "// touched files\n\n")
file(APPEND ${_file_touched} "// look for non-const files\n") file(APPEND ${_file_touched} "// look for non-const files\n")
file(APPEND ${_file_touched} "#define DONT_INCLUDE_CONST_FILES\n") file(APPEND ${_file_touched} "#define DONT_INCLUDE_CONST_FILES\n")
file(APPEND ${_file_touched} "#include \"${_file_const}\"\n\n\n") file(APPEND ${_file_touched} "#include \"${_file_const}\"\n\n\n")
@ -175,7 +177,6 @@ macro (LYX_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile )
endif (_isCFile) endif (_isCFile)
endif (_isGenerated) endif (_isGenerated)
endforeach (_current_FILE) endforeach (_current_FILE)
endmacro (LYX_CREATE_FINAL_FILES) endmacro (LYX_CREATE_FINAL_FILES)