fix rvs build issue by using yaml-cpp spack recipe (#26000)
This commit is contained in:
parent
3484434fe2
commit
1d09474975
2 changed files with 55 additions and 1 deletions
|
@ -0,0 +1,50 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ff77558..278a732 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -207,36 +207,7 @@ if ( NOT DEFINED CMAKE_PACKAGING_INSTALL_PREFIX )
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
-# Download and unpack yaml-cpp at configure time
|
||||
-configure_file(CMakeYamlDownload.cmake yaml-download/CMakeLists.txt)
|
||||
-execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
|
||||
- RESULT_VARIABLE result
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download )
|
||||
-if(result)
|
||||
- message(FATAL_ERROR "CMake step for yaml-download failed: ${result}")
|
||||
-endif()
|
||||
-execute_process(COMMAND ${CMAKE_COMMAND} --build .
|
||||
- RESULT_VARIABLE result
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download )
|
||||
-if(result)
|
||||
- message(FATAL_ERROR "Build step for yaml-download failed: ${result}")
|
||||
-endif()
|
||||
-execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/yaml-src -B${CMAKE_BINARY_DIR}/yaml-build
|
||||
- RESULT_VARIABLE result
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src )
|
||||
-if(result)
|
||||
- message(FATAL_ERROR "Config step for yaml-src failed: ${result}")
|
||||
-endif()
|
||||
|
||||
-add_custom_target(rvs_yaml_target
|
||||
- DEPENDS ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a
|
||||
-)
|
||||
-
|
||||
-add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a
|
||||
- COMMAND make -C ${CMAKE_BINARY_DIR}/yaml-build
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src
|
||||
- COMMENT "Generating yaml-cpp targets"
|
||||
- VERBATIM)
|
||||
|
||||
################################################################################
|
||||
## GOOGLE TEST
|
||||
@@ -446,7 +417,7 @@ if (RVS_BUILD_TESTS)
|
||||
add_subdirectory(testif.so)
|
||||
endif()
|
||||
|
||||
-add_dependencies(rvshelper rvs_bin_folder rvs_doc rvs_yaml_target)
|
||||
+add_dependencies(rvshelper rvs_bin_folder rvs_doc)
|
||||
|
||||
|
||||
add_dependencies(pesm rvslib rvslibrt)
|
|
@ -35,9 +35,11 @@ class RocmValidationSuite(CMakePackage):
|
|||
patch('001-fixes-for-rocblas-rocm-smi-install-prefix-path.patch')
|
||||
patch('002-remove-force-setting-hip-inc-path.patch', when='@4.1.0:')
|
||||
patch('003-cmake-change-to-remove-installs-and-sudo.patch', when='@4.1.0:')
|
||||
patch('004-remove-git-download-yaml-cpp-use-yaml-cpp-recipe.patch', when='@4.3.0:')
|
||||
|
||||
depends_on('cmake@3.5:', type='build')
|
||||
depends_on('zlib', type='link')
|
||||
depends_on('yaml-cpp~shared')
|
||||
|
||||
def setup_build_environment(self, build_env):
|
||||
spec = self.spec
|
||||
|
@ -55,5 +57,7 @@ def cmake_args(self):
|
|||
return [
|
||||
self.define('HIP_INC_DIR', self.spec['hip'].prefix),
|
||||
self.define('ROCM_SMI_DIR', self.spec['rocm-smi-lib'].prefix),
|
||||
self.define('ROCBLAS_DIR', self.spec['rocblas'].prefix)
|
||||
self.define('ROCBLAS_DIR', self.spec['rocblas'].prefix),
|
||||
self.define('YAML_INC_DIR', self.spec['yaml-cpp'].prefix.include),
|
||||
self.define('YAML_LIB_DIR', self.spec['yaml-cpp'].libs.directories[0])
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue