Bug 5133197: Add cmake toolchain and and update the CMakeList of some sample for tegra linux cross build

This commit is contained in:
shawnz
2025-03-19 18:17:17 +08:00
parent ab9166a6b2
commit bd0f630bf4
20 changed files with 205 additions and 176 deletions

View File

@@ -33,12 +33,18 @@ set_tests_properties(ptxgenTest PROPERTIES FIXTURES_SETUP PTXGENTEST)
target_link_libraries(ptxgen ${NVVM_LIB})
if (DEFINED RUNTIME_LIBNVVM_PATH)
get_filename_component(_LIBNVVM_HOME "${RUNTIME_LIBNVVM_PATH}" DIRECTORY)
else ()
set(_LIBNVVM_HOME "${LIBNVVM_HOME}")
endif ()
if (WIN32)
set_target_properties(ptxgen PROPERTIES
COMPILE_FLAGS "/wd4996 -DLIBNVVM_HOME=\"${LIBNVVM_HOME}\"")
else (WIN32)
set_target_properties(ptxgen PROPERTIES
COMPILE_FLAGS "-DLIBNVVM_HOME=\"${LIBNVVM_HOME}\""
COMPILE_FLAGS "-DLIBNVVM_HOME=\"${_LIBNVVM_HOME}\""
LINK_FLAGS "-Wl,-rpath,${LIBNVVM_RPATH}")
endif (WIN32)