Use PCH with Clang (#3546)

This commit is contained in:
tellowkrinkle 2020-07-15 00:57:11 -05:00 committed by GitHub
parent 18f5deede7
commit 1e1d455a4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View File

@ -117,3 +117,8 @@ set(UtilitiesFinalLibs
add_pcsx2_lib(${Output} "${UtilitiesFinalSources}" "${UtilitiesFinalLibs}" "${UtilitiesFinalFlags}")
add_pcsx2_lib(${Output}_NO_TLS "${UtilitiesFinalSources}" "${UtilitiesFinalLibs}" "${UtilitiesFinalFlags} -DPCSX2_THREAD_LOCAL=0")
if(COMMAND target_precompile_headers)
target_precompile_headers(${Output} PRIVATE PrecompiledHeader.h)
target_precompile_headers(${Output}_NO_TLS PRIVATE PrecompiledHeader.h)
endif()

View File

@ -73,3 +73,7 @@ set(x86emitterFinalLibs
)
add_pcsx2_lib(${Output} "${x86emitterFinalSources}" "${x86emitterFinalLibs}" "${x86emitterFinalFlags}")
if(COMMAND target_precompile_headers)
target_precompile_headers(${Output} PRIVATE PrecompiledHeader.h)
endif()

View File

@ -714,11 +714,9 @@ endif()
add_pcsx2_executable(${Output} "${pcsx2FinalSources}" "${pcsx2FinalLibs}" "${pcsx2FinalFlags}")
if(NOT USE_CLANG)
if(COMMAND target_precompile_headers)
message("Using precompiled headers.")
target_precompile_headers(${Output} PRIVATE PrecompiledHeader.h)
endif()
if(COMMAND target_precompile_headers)
message("Using precompiled headers.")
target_precompile_headers(${Output} PRIVATE PrecompiledHeader.h)
endif()
if (APPLE)