Updating the FOLDER filtering in the LyTestWrappers.cmake custom targets to remove leading '..' from the VS folder filter
This commit is contained in:
@@ -213,8 +213,14 @@ function(ly_add_test)
|
||||
add_custom_target(${unaliased_test_name} COMMAND ${CMAKE_COMMAND} -E true ${args_TEST_COMMAND} ${args_TEST_ARGUMENTS})
|
||||
|
||||
file(RELATIVE_PATH project_path ${LY_ROOT_FOLDER} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(ide_path ${project_path})
|
||||
# Visual Studio doesn't support a folder layout that starts with ".."
|
||||
# So strip away the parent directory of a relative path
|
||||
if (${project_path} MATCHES [[^(\.\./)+(.*)]])
|
||||
set(ide_path "${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
set_target_properties(${unaliased_test_name} PROPERTIES
|
||||
FOLDER "${project_path}"
|
||||
FOLDER "${ide_path}"
|
||||
VS_DEBUGGER_COMMAND ${test_command}
|
||||
VS_DEBUGGER_COMMAND_ARGUMENTS "${test_arguments_line}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user