@@ -70,18 +70,14 @@ endif()
7070# FIXME: this reports an unused architecture if only vms are built.
7171# We may not be able to avoid this for now without doing a huge rewrite
7272# of this file.
73- if (NOT (BUILD_CLIENT OR BUILD_TTY_CLIENT OR BUILD_SERVER OR BUILD_DUMMY_APP))
74- message (NOTICE "You can safely ignore the following reported architecture, it is not used." )
75- endif ()
76- include (DaemonPlatform)
77-
7873# FIXME: this reports an unused compiler if only vms are built.
7974# We cannot avoid this for now without doing a huge rewrite of this files
8075# since we also set useless flags using informations provided by this.
8176if (NOT (BUILD_CLIENT OR BUILD_TTY_CLIENT OR BUILD_SERVER OR BUILD_DUMMY_APP))
77+ message (NOTICE "You can safely ignore the following reported architecture, it is not used." )
8278 message (NOTICE "You can safely ignore the following reported compilers, they are unused." )
8379endif ()
84- include (DaemonCompiler )
80+ include (DaemonPlatform )
8581
8682if (Daemon_OUT)
8783 set (CMAKE_CURRENT_BINARY_DIR ${Daemon_OUT} )
@@ -438,9 +434,11 @@ function(ADD_PRECOMPILED_HEADER Target)
438434 set (Header ${COMMON_DIR} /Common.h)
439435
440436 # Compiler-specific PCH support
441- if (DAEMON_COMPILER_IS_GNUCXX OR DAEMON_COMPILER_IS_CLANGCXX OR NACL)
437+ if (DAEMON_CXX_COMPILER_GCC_COMPATIBILITY OR DAEMON_CXX_COMPILER_Clang_COMPATIBILITY)
438+ # There is a bug in CMake: if we set CMAKE_CXX_COMPILER to "zig;c++",
439+ # only "zig" is returned when using the ${CMAKE_CXX_COMPILER} variable.
442440 add_custom_command (OUTPUT "${OBJ_DIR} /${Target} .h.gch"
443- COMMAND ${PNACLPYTHON_PREFIX2} ${CMAKE_CXX_COMPILER} ${CUSTOM_CXX_COMPILER_SUBCOMMAND }
441+ COMMAND ${PNACLPYTHON_PREFIX2} ${CMAKE_CXX_COMPILER} ${DAEMON_CXX_COMPILER_SUBCOMMAND }
444442 ${Defs} ${Flags} -x c++-header ${Header} -o "${OBJ_DIR} /${Target} .h.gch"
445443 DEPENDS ${Header}
446444 IMPLICIT_DEPENDS CXX ${Header}
@@ -450,7 +448,7 @@ function(ADD_PRECOMPILED_HEADER Target)
450448 add_dependencies (${Target} ${Target} -pch)
451449
452450 # PNaCl clang doesn't support -include-pch properly
453- if (DAEMON_COMPILER_IS_CLANGCXX AND NOT NACL )
451+ if (NOT DAEMON_CXX_COMPILER_NAME STREQUAL "PNaCl" )
454452 set_property (TARGET ${Target} APPEND PROPERTY COMPILE_OPTIONS "-include-pch;${OBJ_DIR} /${Target} .h.gch" )
455453 else ()
456454 set_property (TARGET ${Target} APPEND PROPERTY COMPILE_OPTIONS "-include;${OBJ_DIR} /${Target} .h;-Winvalid-pch" )
0 commit comments