SWDEV-273235 - Linux: catch2 shared lib to executable (#2421)

Change-Id: I17101e39fd05eb35c087ebdf3cb005d428d9f206

[ROCm/hip commit: 6c24531156]
这个提交包含在:
agunashe
2021-11-25 21:32:29 -08:00
提交者 GitHub
父节点 a4d0f06eb7
当前提交 6a5e1ea51e
修改 26 个文件,包含 121 行新增183 行删除
@@ -28,15 +28,12 @@ set(AMD_TEST_SRC
if(HIP_PLATFORM MATCHES "amd")
set(TEST_SRC ${TEST_SRC} ${AMD_TEST_SRC})
set_source_files_properties(floatTM.cc PROPERTIES COMPILE_FLAGS -std=c++17)
hip_add_exe_to_target(NAME UnitDeviceTests
TEST_SRC ${TEST_SRC}
TEST_TARGET_NAME build_tests)
elseif(HIP_PLATFORM MATCHES "nvidia")
hip_add_exe_to_target(NAME UnitDeviceTests
TEST_SRC ${TEST_SRC}
TEST_TARGET_NAME build_tests
COMPILE_OPTIONS --Wno-deprecated-declarations)
endif()
# Create shared lib of all tests
add_library(UnitDeviceTests SHARED EXCLUDE_FROM_ALL ${TEST_SRC})
if(HIP_PLATFORM MATCHES "nvidia")
target_compile_options(UnitDeviceTests PUBLIC --Wno-deprecated-declarations)
endif()
# Add dependency on build_tests to build it on this custom target
add_dependencies(build_tests UnitDeviceTests)