1
0

CMake: generates a list of all source files.

This will be used for the style-checking script.
This commit is contained in:
madmaxoft 2014-07-21 17:35:09 +02:00
parent 9e7b9a4ebe
commit 5194eef07d
2 changed files with 21 additions and 0 deletions

1
.gitignore vendored
View File

@ -65,6 +65,7 @@ lib/tolua++/tolua
src/Bindings/Bindings.*
src/Bindings/BindingDependecies.txt
MCServer.dir/
src/AllFiles.lst
#win32 cmake stuff
*.vcxproj

View File

@ -228,6 +228,26 @@ else ()
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /DEBUG")
endif()
# Generate a list of all source files:
set(ALLFILES "")
foreach(folder ${FOLDERS})
get_directory_property(FOLDER_SRCS DIRECTORY ${folder} DEFINITION SRCS)
foreach (src ${FOLDER_SRCS})
list(APPEND ALLFILES "${folder}/${src}")
endforeach(src)
get_directory_property(FOLDER_HDRS DIRECTORY ${folder} DEFINITION HDRS)
foreach (hdr ${FOLDER_HDRS})
list(APPEND ALLFILES "${folder}/${hdr}")
endforeach(hdr)
endforeach(folder)
foreach(arg ${ALLFILES})
set(ALLFILESLINES "${ALLFILESLINES}${arg}\n")
endforeach()
FILE(WRITE "AllFiles.lst" "${ALLFILESLINES}")
set(EXECUTABLE MCServer)
if (MSVC)