mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[CMAKE/CLANG-CL] Don't pass /TP twice when we're dealing with a clang-cl c++ PCH. Pass -nostdinc instead of /X on clang-cl builds.
This commit is contained in:
parent
43e1d6f177
commit
9f85ef6712
1 changed files with 10 additions and 2 deletions
|
@ -224,7 +224,9 @@ if(PCH)
|
|||
|
||||
if(IS_CPP)
|
||||
set(_pch_language CXX)
|
||||
set(_cl_lang_flag "/TP")
|
||||
if(NOT USE_CLANG_CL)
|
||||
set(_cl_lang_flag "/TP")
|
||||
endif()
|
||||
else()
|
||||
set(_pch_language C)
|
||||
set(_cl_lang_flag "/TC")
|
||||
|
@ -443,9 +445,15 @@ function(CreateBootSectorTarget _target_name _asm_file _binary_file _base_addres
|
|||
set(_object_file ${_binary_file}.obj)
|
||||
set(_temp_file ${_binary_file}.tmp)
|
||||
|
||||
if(USE_CLANG_CL)
|
||||
set(_no_std_includes_flag "-nostdinc")
|
||||
else()
|
||||
set(_no_std_includes_flag "/X")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${_temp_file}
|
||||
COMMAND ${CMAKE_C_COMPILER} /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /I${REACTOS_SOURCE_DIR}/boot/freeldr /D__ASM__ /D_USE_ML /EP /c ${_asm_file} > ${_temp_file}
|
||||
COMMAND ${CMAKE_C_COMPILER} /nologo ${_no_std_includes_flag} /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /I${REACTOS_SOURCE_DIR}/boot/freeldr /D__ASM__ /D_USE_ML /EP /c ${_asm_file} > ${_temp_file}
|
||||
DEPENDS ${_asm_file})
|
||||
|
||||
if(ARCH STREQUAL "arm")
|
||||
|
|
Loading…
Reference in a new issue