File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,9 @@ function(ADD_PRECOMPILED_HEADER Target)
415415 set (Header ${COMMON_DIR} /Common.h)
416416
417417 # Compiler-specific PCH support
418- if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" OR NACL)
418+ try_c_cxx_flag(PCH "-pch" )
419+
420+ if (PCH)
419421 add_custom_command (OUTPUT "${OBJ_DIR} /${Target} .h.gch"
420422 COMMAND ${PNACLPYTHON_PREFIX2} ${CMAKE_CXX_COMPILER} ${Defs} ${Flags} -x c++-header ${Header} -o "${OBJ_DIR} /${Target} .h.gch"
421423 DEPENDS ${Header}
@@ -426,7 +428,7 @@ function(ADD_PRECOMPILED_HEADER Target)
426428 add_dependencies (${Target} ${Target} -pch)
427429
428430 # PNaCl clang doesn't support -include-pch properly
429- if (" ${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" AND NOT NACL )
431+ if (NOT DAEMON_CXX_COMPILER_NAME STREQUAL "PNaCl" )
430432 set_property (TARGET ${Target} APPEND PROPERTY COMPILE_OPTIONS "-include-pch;${OBJ_DIR} /${Target} .h.gch" )
431433 else ()
432434 set_property (TARGET ${Target} APPEND PROPERTY COMPILE_OPTIONS "-include;${OBJ_DIR} /${Target} .h;-Winvalid-pch" )
You can’t perform that action at this time.
0 commit comments