forked from OpenTTD/OpenTTD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: [CMake] Use explicit list for regression (OpenTTD#11541)
- Loading branch information
Showing
5 changed files
with
70 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copy the regression configuration in a special folder, so all autogenerated | ||
# folders end up in the same place after running regression. | ||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/regression.cfg | ||
COMMAND ${CMAKE_COMMAND} -E copy | ||
${CMAKE_CURRENT_SOURCE_DIR}/regression.cfg | ||
${CMAKE_CURRENT_BINARY_DIR}/regression.cfg | ||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/regression.cfg | ||
COMMENT "Copying regression.cfg regression file" | ||
) | ||
|
||
# Create a new target which copies all regression files | ||
# Subdirectory targets will add themselves as dependencies | ||
add_custom_target(regression_files | ||
ALL # this is needed because 'make test' doesn't resolve dependencies, and otherwise this is never executed | ||
DEPENDS | ||
${CMAKE_BINARY_DIR}/regression/regression.cfg | ||
) | ||
|
||
# Create a new target which runs the regression | ||
# Subdirectory targets will add themselves as dependencies | ||
add_custom_target(regression) | ||
|
||
add_subdirectory(regression) | ||
add_subdirectory(stationlist) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
include(CreateRegression) | ||
create_regression( | ||
${CMAKE_CURRENT_SOURCE_DIR}/info.nut | ||
${CMAKE_CURRENT_SOURCE_DIR}/main.nut | ||
${CMAKE_CURRENT_SOURCE_DIR}/require.nut | ||
${CMAKE_CURRENT_SOURCE_DIR}/result.txt | ||
${CMAKE_CURRENT_SOURCE_DIR}/test.sav | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include(CreateRegression) | ||
create_regression( | ||
${CMAKE_CURRENT_SOURCE_DIR}/info.nut | ||
${CMAKE_CURRENT_SOURCE_DIR}/main.nut | ||
${CMAKE_CURRENT_SOURCE_DIR}/result.txt | ||
${CMAKE_CURRENT_SOURCE_DIR}/test.sav | ||
) |