diff options
author | glx22 <glx@openttd.org> | 2021-02-22 19:01:21 +0100 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-02-22 23:17:45 +0100 |
commit | ec9d1a6b8f906b098b89b168174805a0de234927 (patch) | |
tree | 4fc46702fb8e07e3f2fbb69e76f04ac6036d5070 | |
parent | 06ca147a8274a8d9434e9d59b76dbe502be74fb9 (diff) | |
download | openttd-ec9d1a6b8f906b098b89b168174805a0de234927.tar.xz |
Fix: [CMake] CMAKE_SOURCE_DIR may contain regex commands
-rw-r--r-- | cmake/CreateRegression.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/CreateRegression.cmake b/cmake/CreateRegression.cmake index 3da3438b4..8e3865bc5 100644 --- a/cmake/CreateRegression.cmake +++ b/cmake/CreateRegression.cmake @@ -10,8 +10,8 @@ macro(create_regression) # build folder before we can run the regression file(GLOB_RECURSE REGRESSION_SOURCE_FILES ${CMAKE_SOURCE_DIR}/regression/*) foreach(REGRESSION_SOURCE_FILE IN LISTS REGRESSION_SOURCE_FILES) - string(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/regression/" "${CMAKE_BINARY_DIR}/ai/" REGRESSION_BINARY_FILE "${REGRESSION_SOURCE_FILE}") - string(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/regression/" "" REGRESSION_SOURCE_FILE_NAME "${REGRESSION_SOURCE_FILE}") + string(REPLACE "${CMAKE_SOURCE_DIR}/regression/" "" REGRESSION_SOURCE_FILE_NAME "${REGRESSION_SOURCE_FILE}") + string(CONCAT REGRESSION_BINARY_FILE "${CMAKE_BINARY_DIR}/ai/" "${REGRESSION_SOURCE_FILE_NAME}") if("${REGRESSION_SOURCE_FILE_NAME}" STREQUAL "regression.cfg") continue() |