CMake Code Cleaning
The big CCC
After !544 (merged) I have looked over the whole CMake code and I propose some modification. This code is quiet hard to read whereas it is really not that complicated.
- Delete FindGLEW.cmake FindOpenThreads.cmake and use find_package( GLEW )
- Status of FindAgg, FindICUUC, FindKWStyle, FindLTDL, FindMercurial. Are we still using those?
- Status of DeployQtConf.cmake, DeployQtConfScript.cmake, Qt.conf.in. Those file are not used anymore in OTB.
- Status of MinGWPackage.cmake. Not used in OTB.
- Status of UseSWIGLocal.cmake. Include once but no macro defined in that file is used in OTB.
- Status on CPP check and Mem check, this code seems obsolete. It can be deleted or update to be functional again.
- Status of CtestCustom.cmake.in. Used in OTB for MemCheck and to filter warnings... Not sure if it is helpful or if it hide real problems!
OTB_GENERATE_SUBPROJECTS_CMAKEin OTBModuleEnablement.cmake. Never set in OTB.
CreateTestDriver_SupportBuildInIOFactoriesin OTBModuleTest.cmake. Not used in OTB.
- Use cmake_host_system_information. This will make code about flag much lighter, and cleaner (SSE, arch, CFlag, CXXFlag)
- Replace isfile_symlink.cmake by built in CMake functionalities.
- Replace setif_value_in_list.cmake by built in CMake funcitonalities
- Status of Utilities/InstallTest. This folder defines a test never run in OTB.
Remove the dummy target
OTB-Package. It's okay if packages are created only when installing the project.
Also, something should be done for the Optical Calibration CMakeLists.txt, and I quote:
#FIXME Those tests have performing local copies of header, baselines...They were migrate "as it" for now in version 5.0 but # something cleaner could be done in the future. #TODO Rewrite those tests and ban local copy and cmake trickery