mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Restore rm_precomp_header custom target for makefile / ninja command line builds
This commit is contained in:
parent
ace8829cda
commit
0c7f8be44e
1 changed files with 18 additions and 7 deletions
|
@ -1817,13 +1817,24 @@ else()
|
|||
set(remove_command "rm")
|
||||
endif()
|
||||
|
||||
# make sure precompiled header is deleted after executable is compiled
|
||||
add_custom_command(TARGET RBDoom3BFG POST_BUILD
|
||||
COMMAND ${remove_command} "idlib/precompiled.h.gch"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "remove idlib/precompiled.h.gch"
|
||||
)
|
||||
endif()
|
||||
# delete precompiled header file after executable is compiled: command line build case
|
||||
if(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
|
||||
add_custom_target(rm_precomp_header ALL
|
||||
COMMAND ${remove_command} "idlib/precompiled.h.gch"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "remove idlib/precompiled.h.gch"
|
||||
)
|
||||
add_dependencies(rm_precomp_header RBDoom3BFG)
|
||||
|
||||
# delete precompiled header file after executable is compiled: IDE build case (e.g. Xcode)
|
||||
else()
|
||||
add_custom_command(TARGET RBDoom3BFG POST_BUILD
|
||||
COMMAND ${remove_command} "idlib/precompiled.h.gch"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "remove idlib/precompiled.h.gch"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
if(NOT APPLE)
|
||||
|
|
Loading…
Reference in a new issue