Merge "find_package(hip) changes for clang" into amd-master-next
[ROCm/hip-tests commit: 6c98a12a9b]
Этот коммит содержится в:
+2
-1
@@ -22,7 +22,8 @@ set(MY_SOURCE_FILES MatrixTranspose.cpp)
|
||||
set(MY_TARGET_NAME MatrixTranspose)
|
||||
set(MY_HIPCC_OPTIONS)
|
||||
set(MY_HCC_OPTIONS)
|
||||
set(MY_CLANG_OPTIONS)
|
||||
set(MY_NVCC_OPTIONS)
|
||||
|
||||
set_source_files_properties(${MY_SOURCE_FILES} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1)
|
||||
hip_add_executable(${MY_TARGET_NAME} ${MY_SOURCE_FILES} HIPCC_OPTIONS ${MY_HIPCC_OPTIONS} HCC_OPTIONS ${MY_HCC_OPTIONS} NVCC_OPTIONS ${MY_NVCC_OPTIONS})
|
||||
hip_add_executable(${MY_TARGET_NAME} ${MY_SOURCE_FILES} HIPCC_OPTIONS ${MY_HIPCC_OPTIONS} HCC_OPTIONS ${MY_HCC_OPTIONS} CLANG_OPTIONS ${MY_CLANG_OPTIONS} NVCC_OPTIONS ${MY_NVCC_OPTIONS})
|
||||
|
||||
@@ -28,8 +28,8 @@ If your project already modifies ```CMAKE_MODULE_PATH```, you will need to appen
|
||||
## Using the hip_add_executable macro
|
||||
FindHIP provides the ```hip_add_executable``` macro that is similar to the ```cuda_add_executable``` macro that is provided by FindCUDA.
|
||||
The syntax is also similar. The ```hip_add_executable``` macro uses the hipcc wrapper as the compiler.
|
||||
The macro supports specifying HCC-specific, NVCC-specific compiler options using the ```HCC_OPTIONS``` and ```NVCC_OPTIONS``` keywords.
|
||||
Common options targeting both compilers can be specificed after the ```HIPCC_OPTIONS``` keyword.
|
||||
The macro supports specifying HCC-specific, CLANG-specific, NVCC-specific compiler options using the ```HCC_OPTIONS```, ```CLANG_OPTIONS``` and ```NVCC_OPTIONS``` keywords.
|
||||
Common options targeting both compilers can be specificed after the ```HIPCC_OPTIONS``` keyword.
|
||||
|
||||
## How to build and run:
|
||||
Use the following commands to build and execute the sample
|
||||
|
||||
Ссылка в новой задаче
Block a user