Change __HIP_ENABLE_PCH to be an option
Currently all the logic checks if __HIP_ENABLE_PCH is set, so setting it to OFF will still enable PCH. Switching __HIP_ENABLE_PCH to be a CMake option will enable correct build behaviour. Change-Id: I77a663589ffb5f2595c6ad3d144eb9466adcf250
This commit is contained in:
@@ -156,7 +156,7 @@ endif()
|
||||
|
||||
# Short-Term solution for pre-compiled headers for online compilation
|
||||
# Enable pre compiled header
|
||||
if(${__HIP_ENABLE_PCH})
|
||||
if(__HIP_ENABLE_PCH)
|
||||
execute_process(COMMAND sh -c "${CMAKE_CURRENT_SOURCE_DIR}/../bin/hip_embed_pch.sh ${LLVM_DIR}")
|
||||
add_definitions(-D__HIP_ENABLE_PCH)
|
||||
endif()
|
||||
@@ -223,7 +223,7 @@ add_library(device INTERFACE)
|
||||
target_link_libraries(device INTERFACE host)
|
||||
|
||||
# Short-Term solution for pre-compiled headers for online compilation
|
||||
if(${__HIP_ENABLE_PCH})
|
||||
if(__HIP_ENABLE_PCH)
|
||||
target_link_libraries(amdhip64 PRIVATE ${CMAKE_BINARY_DIR}/hip_pch.o)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user