Adding PCH for MINGW to cmake

Discussion about CodeLite development process and patches
CodeLite Enthusiast
Posts: 39
Joined: Thu Dec 29, 2011 10:07 pm
Genuine User: Yes
IDE Question: C++

Adding PCH for MINGW to cmake

Post by stahta01 »

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

        message(FATAL_ERROR "MinGW with PCH requires CMake version 3.16 or higher")

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.

User avatar
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++

Re: Adding PCH for MINGW to cmake

Post by eranif »

I am fine with increasing the minimum CMake value

Make sure you have read the HOW TO POST thread
Post Reply