diff --git a/CMakeLists.txt b/CMakeLists.txt index e90744ba76..8507b7fb15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,6 +150,10 @@ endif() if (CMAKE_VERSION VERSION_LESS "3.16") OCCT_CHECK_AND_UNSET (BUILD_USE_PCH) +elseif (NOT BUILD_USE_PCH) + set (CMAKE_DISABLE_PRECOMPILE_HEADERS ON) +else () + set (CMAKE_DISABLE_PRECOMPILE_HEADERS OFF) endif() if (NOT DEFINED BUILD_INCLUDE_SYMLINK)