05-20-2010, 07:14 PM
Hi,
May be you already have something similar. Anyway I attach a small script that detects missing .cpp/.h file in CMakeLists.txt. It is propably not perfect but it could be handy for maintainning the cmake file.
Example of use:
% detect_missing_file_in_cmake.sh -h
This script detects '.cpp/.h' files that are in directory (and sub) but not in the current cmake.
options:
-dir : give the directory to check. Default '.'
-help : print this help message and exit
-max_depth : how many depth to check missing file. Default 1
-skip : skip the check of '.h' file. Disable by default
% detect_missing_file_in_cmake.sh -m 3 -dir $PWD/pcsx2 -skip
....../pcsx2/gui/CpuUsageProviderMSW.cpp is missing in CMakeLists.txt
....../pcsx2/IopModuleNames.cpp is missing in CMakeLists.txt
Note All options have default values. To select the option you can use either the full name (-help) or the first letter (-h).
Enjoy.
May be you already have something similar. Anyway I attach a small script that detects missing .cpp/.h file in CMakeLists.txt. It is propably not perfect but it could be handy for maintainning the cmake file.
Example of use:
% detect_missing_file_in_cmake.sh -h
This script detects '.cpp/.h' files that are in directory (and sub) but not in the current cmake.
options:
-dir
-help : print this help message and exit
-max_depth
-skip : skip the check of '.h' file. Disable by default
% detect_missing_file_in_cmake.sh -m 3 -dir $PWD/pcsx2 -skip
....../pcsx2/gui/CpuUsageProviderMSW.cpp is missing in CMakeLists.txt
....../pcsx2/IopModuleNames.cpp is missing in CMakeLists.txt
Note All options have default values. To select the option you can use either the full name (-help) or the first letter (-h).
Enjoy.