Ask Your Question
0

What is the problem with precompiled headers in a project that includes both C and C++ code using CMake?

asked 2022-10-27 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-02-05 19:00:00 +0000

bukephalos gravatar image

The problem with precompiled headers in a project that includes both C and C++ code using CMake is that precompiled headers are language-specific and cannot be shared between C and C++. This means that if a project includes both C and C++ code, separate precompiled headers must be created for each language, which can lead to longer build times and increased complexity in the build system. Additionally, CMake does not have built-in support for creating precompiled headers, so it may require custom scripts or build rules.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-10-27 11:00:00 +0000

Seen: 8 times

Last updated: Feb 05 '23