From 1de720e3deac25c0aa1b5effa0a6cf93bd45aa42 Mon Sep 17 00:00:00 2001 From: Simon Haegler Date: Sat, 3 Aug 2024 15:05:02 +0200 Subject: [PATCH] Build: disable PCH by default if MSVC and Ninja generator PCH currently does not work (not sure if caused by USD build system or CMake itself) Ideally, this should be fixed but until then this default change saves people a few minutes when setting up a local USD dev env. --- cmake/defaults/Options.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/defaults/Options.cmake b/cmake/defaults/Options.cmake index 6c118a9479..5c2a78cb31 100644 --- a/cmake/defaults/Options.cmake +++ b/cmake/defaults/Options.cmake @@ -72,7 +72,7 @@ option(PXR_ENABLE_GL_SUPPORT "Enable OpenGL based components" ON) # Precompiled headers are a win on Windows, not on gcc. set(pxr_enable_pch "OFF") -if(MSVC) +if(MSVC AND NOT CMAKE_GENERATOR STREQUAL "Ninja") set(pxr_enable_pch "ON") endif() option(PXR_ENABLE_PRECOMPILED_HEADERS "Enable precompiled headers." "${pxr_enable_pch}")