Skip to content

Commit

Permalink
CMake: Disable PCH for mm files
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed Apr 1, 2022
1 parent be49de6 commit 0a11b58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pcsx2/CMakeLists.txt
Expand Up @@ -1737,12 +1737,17 @@ if (APPLE)
)
add_dependencies(pcsx2-postprocess-bundle PCSX2)

# Set the right file types for .inl files in Xcode
get_target_property(PCSX2_SOURCES PCSX2 SOURCES)
foreach(source IN LISTS PCSX2_SOURCES)
# Set the right file types for .inl files in Xcode
if("${source}" MATCHES "\\.(inl|h)$")
set_source_files_properties("${source}" PROPERTIES XCODE_EXPLICIT_FILE_TYPE sourcecode.cpp.h)
endif()
# CMake makefile and ninja generators will attempt to share one PCH for both cpp and mm files
# That's not actually OK
if("${source}" MATCHES "\\.mm$")
set_source_files_properties("${source}" PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
endif()
endforeach()
endif()

Expand Down

0 comments on commit 0a11b58

Please sign in to comment.