mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-25 22:49:46 +01:00
Fix: [CMake] CMake may use || at the end of custom commands
This commit is contained in:
parent
ec9d1a6b8f
commit
b67245d71e
@ -16,11 +16,18 @@ endif()
|
|||||||
set(ARGC 1)
|
set(ARGC 1)
|
||||||
set(ARG_READ NO)
|
set(ARG_READ NO)
|
||||||
|
|
||||||
|
# For MSVC CMake runs this script from a batch file using || to detect errors,
|
||||||
|
# depending on source path it may quote args, and cause cmd to not understand ||
|
||||||
|
# and pass it as argument to ourself.
|
||||||
# Read all the arguments given to CMake; we are looking for -- and everything
|
# Read all the arguments given to CMake; we are looking for -- and everything
|
||||||
# that follows. Those are our api files.
|
# that follows, until ||. Those are our api files.
|
||||||
while(ARGC LESS CMAKE_ARGC)
|
while(ARGC LESS CMAKE_ARGC)
|
||||||
set(ARG ${CMAKE_ARGV${ARGC}})
|
set(ARG ${CMAKE_ARGV${ARGC}})
|
||||||
|
|
||||||
|
if(ARG STREQUAL "||")
|
||||||
|
set(ARG_READ NO)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ARG_READ)
|
if(ARG_READ)
|
||||||
list(APPEND SCRIPT_API_BINARY_FILES "${ARG}")
|
list(APPEND SCRIPT_API_BINARY_FILES "${ARG}")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user