diff --git a/projects/hip-tests/samples/2_Cookbook/12_cmake_hip_add_executable/CMakeLists.txt b/projects/hip-tests/samples/2_Cookbook/12_cmake_hip_add_executable/CMakeLists.txt index 99409724d3..c2a6d60cf3 100644 --- a/projects/hip-tests/samples/2_Cookbook/12_cmake_hip_add_executable/CMakeLists.txt +++ b/projects/hip-tests/samples/2_Cookbook/12_cmake_hip_add_executable/CMakeLists.txt @@ -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}) diff --git a/projects/hip-tests/samples/2_Cookbook/12_cmake_hip_add_executable/Readme.md b/projects/hip-tests/samples/2_Cookbook/12_cmake_hip_add_executable/Readme.md index 937da30af0..4e322fd83e 100644 --- a/projects/hip-tests/samples/2_Cookbook/12_cmake_hip_add_executable/Readme.md +++ b/projects/hip-tests/samples/2_Cookbook/12_cmake_hip_add_executable/Readme.md @@ -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