Adding PCH for MINGW to cmake
I am working on adding PCH when building with MINGW GCC under Msys2, and I will need to edit over half of the cmake CMakeLists.txt files to do it.
I am using the cmake target_precompile_headers() that was added in 3.16.
I added this for now to the root CMakeLists.txt.
Code: Select all
if ( USE_PCH AND MINGW )
if( CMAKE_VERSION VERSION_LESS "3.16" )
message(FATAL_ERROR "MinGW with PCH requires CMake version 3.16 or higher")
endif()
endif()
Would you want me instead to change the cmake_minimum_required() value?
I plan to remove all trailing spaces and run "dos2unix" on each CMakeLists.txt file.
Do you wish me to also run "clang-format --style=file" on each CMakeLists.txt file?
My computer is too old to be certain that adding PCH helps in building CodeLite with MinGW GCC under MSys2.
So, you will have to test if the changes are worth while.
The build time is too heavily influenced by my slow hard drive access time.
I learned this doing PCH tests while building Code::Blocks I see no reason the same will not be true for CodeLite.
Tim S.