mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-14 02:02:46 +00:00
Initial Setup for CI (#86)
* add docker file and make default target buildable
* add Jenkinsfile
* remove empty env block
* fix package stage
* remove render group from docker run
* clean up Jenkins file
* add cppcheck as dev dependency
* update cmake file
* Add profiler build stage
* add hip_version config file for reduction operator
* correct jenkins var name
* Build release instead of debug
* clean up
Co-authored-by: Chao Liu <chao.liu2@amd.com>
[ROCm/composable_kernel commit: 2778e99758]
This commit is contained in:
50
cmake/TargetFlags.cmake
Normal file
50
cmake/TargetFlags.cmake
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
function(get_target_property2 VAR TARGET PROPERTY)
|
||||
get_target_property(_pflags ${TARGET} ${PROPERTY})
|
||||
if(_pflags)
|
||||
set(${VAR} ${_pflags} PARENT_SCOPE)
|
||||
else()
|
||||
set(${VAR} "" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
macro(append_flags FLAGS TARGET PROPERTY PREFIX)
|
||||
get_target_property2(_pflags ${TARGET} ${PROPERTY})
|
||||
foreach(FLAG ${_pflags})
|
||||
if(TARGET ${FLAG})
|
||||
target_flags(_pflags2 ${FLAG})
|
||||
string(APPEND ${FLAGS} " ${_pflags2}")
|
||||
else()
|
||||
string(APPEND ${FLAGS} " ${PREFIX}${FLAG}")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(append_link_flags FLAGS TARGET PROPERTY)
|
||||
get_target_property2(_pflags ${TARGET} ${PROPERTY})
|
||||
foreach(FLAG ${_pflags})
|
||||
if(TARGET ${FLAG})
|
||||
target_flags(_pflags2 ${FLAG})
|
||||
string(APPEND ${FLAGS} " ${_pflags2}")
|
||||
elseif(FLAG MATCHES "^-.*")
|
||||
string(APPEND ${FLAGS} " ${FLAG}")
|
||||
elseif(EXISTS ${FLAG})
|
||||
string(APPEND ${FLAGS} " ${FLAG}")
|
||||
else()
|
||||
string(APPEND ${FLAGS} " -l${FLAG}")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
function(target_flags FLAGS TARGET)
|
||||
set(_flags)
|
||||
append_flags(_flags ${TARGET} "INTERFACE_COMPILE_OPTIONS" "")
|
||||
append_flags(_flags ${TARGET} "INTERFACE_COMPILE_DEFINITIONS" "-D")
|
||||
append_flags(_flags ${TARGET} "INTERFACE_INCLUDE_DIRECTORIES" "-isystem ")
|
||||
append_flags(_flags ${TARGET} "INTERFACE_LINK_DIRECTORIES" "-L ")
|
||||
append_flags(_flags ${TARGET} "INTERFACE_LINK_OPTIONS" "")
|
||||
append_link_flags(_flags ${TARGET} "INTERFACE_LINK_LIBRARIES" "")
|
||||
# message("_flags: ${_flags}")
|
||||
set(${FLAGS} ${_flags} PARENT_SCOPE)
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user