Changeset View
Changeset View
Standalone View
Standalone View
test/CMakeLists.txt
Show All 19 Lines | |||||
# Create build ini file | # Create build ini file | ||||
configure_file(config.ini.in config.ini @ONLY) | configure_file(config.ini.in config.ini @ONLY) | ||||
### | ### | ||||
# Setup symlinks for testing | # Setup symlinks for testing | ||||
### | ### | ||||
macro(make_link src dest) | include(SanitizeHelper) | ||||
function(make_link src dest) | |||||
add_custom_command( | add_custom_command( | ||||
OUTPUT "${dest}" | OUTPUT "${dest}" | ||||
COMMAND ${CMAKE_COMMAND} -E create_symlink "${src}" "${dest}" | COMMAND ${CMAKE_COMMAND} -E create_symlink "${src}" "${dest}" | ||||
COMMENT "make_link ${src} -> ${dest}" | COMMENT "make_link ${src} -> ${dest}" | ||||
MAIN_DEPENDENCY "${src}" | MAIN_DEPENDENCY "${src}" | ||||
) | ) | ||||
endmacro() | # Add a phony target to make sure the files are linked by default. | ||||
sanitize_target_name("link-" "${dest}" NAME) | |||||
add_custom_target(${NAME} ALL DEPENDS "${dest}") | |||||
endfunction() | |||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional/) | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional/) | ||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/util/) | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/util/) | ||||
make_link( | make_link( | ||||
${CMAKE_CURRENT_SOURCE_DIR}/functional/test_runner.py | ${CMAKE_CURRENT_SOURCE_DIR}/functional/test_runner.py | ||||
${CMAKE_CURRENT_BINARY_DIR}/functional/test_runner.py | ${CMAKE_CURRENT_BINARY_DIR}/functional/test_runner.py | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |