2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 00:12:11 +00:00

- fix "rm is not recognized" error when compiling with Clang on Windows

This commit is contained in:
SSE4
2017-09-03 09:41:42 +07:00
committed by Rene Rivera
parent 3ee82c2c1a
commit f5a9ca0afc

View File

@@ -5,6 +5,7 @@
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)
import os ;
import toolset ;
import feature ;
import toolset : flags ;
@@ -146,11 +147,20 @@ actions compile.c.with-pch bind PCH_FILE
###############################################################################
# PCH emission
if [ os.name ] = NT
{
RM = del /f /q ;
}
else
{
RM = rm -f ;
}
rule compile.c++.pch ( targets * : sources * : properties * ) {
}
actions compile.c++.pch {
rm -f "$(<)" && "$(CONFIG_COMMAND)" -c -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pth -o "$(<)" "$(>)"
$(RM) -f "$(<)" && "$(CONFIG_COMMAND)" -c -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pth -o "$(<)" "$(>)"
}
rule compile.c.pch ( targets * : sources * : properties * ) {
@@ -158,7 +168,7 @@ rule compile.c.pch ( targets * : sources * : properties * ) {
actions compile.c.pch
{
rm -f "$(<)" && "$(CONFIG_COMMAND)" -c -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pth -o "$(<)" "$(>)"
$(RM) -f "$(<)" && "$(CONFIG_COMMAND)" -c -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pth -o "$(<)" "$(>)"
}
###############################################################################