find_package(hip) changes for clang
Change-Id: I9dc1be1dd5f9424e26ebcd2961207e1c4467550f
[ROCm/hip-tests commit: 14b060bfd3]
This commit is contained in:
committad av
Aaron Enye Shi
förälder
4204eab46a
incheckning
2e6ce97aa1
@@ -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
|
||||
|
||||
Referens i nytt ärende
Block a user