Skip to content

PCH: disable by default on all platforms except MSVC#15195

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
mshabunin:disable-pch
Aug 1, 2019
Merged

PCH: disable by default on all platforms except MSVC#15195
opencv-pushbot merged 1 commit intoopencv:3.4from
mshabunin:disable-pch

Conversation

@mshabunin
Copy link
Copy Markdown
Contributor

@mshabunin mshabunin commented Jul 31, 2019

resolves #15157
resolves #14868

This pullrequest changes

Precompiled headers support is very limited and does not give notable compilation speedup on UNIX platforms. Curren PCH generation mechanism does not support targets-based dependencies cmake approach.

@paroj
Copy link
Copy Markdown
Contributor

paroj commented Aug 1, 2019

just wanted to note that with on gcc/ linux this reduces the compile time by about 40% for clean build for me. However, this does not work with clang and I also noticed PCH related issues when doing incremental builds (working on opencv).

@opencv-pushbot opencv-pushbot merged commit 1275248 into opencv:3.4 Aug 1, 2019
@mshabunin
Copy link
Copy Markdown
Contributor Author

Yes, clang documentation states that source files must not include PCH header explicitly (#include "precomp.hpp" line).

There is some recent related activity in cmake: https://gitlab.kitware.com/cmake/cmake/merge_requests/3553

On *NIX platforms ccache is the best way to speed up repetitive and incremental builds. Our CI can complete clean build in ~1:30-2:00 min in most cases.

This was referenced Aug 5, 2019
@mshabunin mshabunin deleted the disable-pch branch September 4, 2019 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants