Xcode Indexing Causing Cascading Errors
When opening a freshly scaffolded c++ project in Xcode 12.2 indexing is failing on every file. I found this by enabling logs in Xcode below is a excerpt of the logged errors.
In file included from :1:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Editor/UnrealEd/Public/UnrealEd.h:5:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/MonolithicHeaderBoilerplate.h:3:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/CoreTypes.h:9:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/HAL/Platform.h:5:
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/Build.h:45:3: error: Exactly one of [UE_BUILD_DEBUG UE_BUILD_DEVELOPMENT UE_BUILD_TEST UE_BUILD_SHIPPING] should be defined to be 1
#error Exactly one of [UE_BUILD_DEBUG UE_BUILD_DEVELOPMENT UE_BUILD_TEST UE_BUILD_SHIPPING] should be defined to be 1
^
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/Build.h:67:3: error: UBT should always define WITH_EDITOR to be 0 or 1
#error UBT should always define WITH_EDITOR to be 0 or 1
^
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/Build.h:75:3: error: UBT should always define WITH_ENGINE to be 0 or 1
#error UBT should always define WITH_ENGINE to be 0 or 1
^
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/Build.h:83:3: error: UBT should always define WITH_UNREAL_DEVELOPER_TOOLS to be 0 or 1
#error UBT should always define WITH_UNREAL_DEVELOPER_TOOLS to be 0 or 1
^
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/Build.h:91:3: error: UBT should always define WITH_PLUGIN_SUPPORT to be 0 or 1
#error UBT should always define WITH_PLUGIN_SUPPORT to be 0 or 1
^
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/Build.h:132:3: error: UBT should always define IS_MONOLITHIC to be 0 or 1
#error UBT should always define IS_MONOLITHIC to be 0 or 1
^
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/Build.h:140:3: error: UBT should always define IS_PROGRAM to be 0 or 1
#error UBT should always define IS_PROGRAM to be 0 or 1
^
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/Build.h:317:3: error: Exactly one of [UE_BUILD_DEBUG UE_BUILD_DEVELOPMENT UE_BUILD_TEST UE_BUILD_SHIPPING] should be defined to be 1
#error Exactly one of [UE_BUILD_DEBUG UE_BUILD_DEVELOPMENT UE_BUILD_TEST UE_BUILD_SHIPPING] should be defined to be 1
^
In file included from :1:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Editor/UnrealEd/Public/UnrealEd.h:5:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/MonolithicHeaderBoilerplate.h:3:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/CoreTypes.h:9:
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/HAL/Platform.h:81:10: fatal error: 'UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerPreSetup.h' file not found
#include COMPILED_PLATFORM_HEADER(PlatformCompilerPreSetup.h)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from :1:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Editor/UnrealEd/Public/UnrealEd.h:5:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Misc/MonolithicHeaderBoilerplate.h:3:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/CoreTypes.h:9:
In file included from /Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/HAL/Platform.h:80:
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/HAL/PreprocessorHelpers.h:57:42: note: expanded from macro 'COMPILED_PLATFORM_HEADER'
#define COMPILED_PLATFORM_HEADER(Suffix) PREPROCESSOR_TO_STRING(PREPROCESSOR_JOIN(PLATFORM_HEADER_NAME/PLATFORM_HEADER_NAME, Suffix))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/HAL/PreprocessorHelpers.h:6:35: note: expanded from macro 'PREPROCESSOR_TO_STRING'
#define PREPROCESSOR_TO_STRING(x) PREPROCESSOR_TO_STRING_INNER(x)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/HAL/PreprocessorHelpers.h:7:41: note: expanded from macro 'PREPROCESSOR_TO_STRING_INNER'
#define PREPROCESSOR_TO_STRING_INNER(x) #x
^~
:3:1: note: expanded from here
"UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerPreSetup.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 errors generated.
error: Command failed with exit code 1
Is there a way to fix this?
Like some file I need to configure or create some config file that I was unaware of.