From d9d5f2f206b53edb2894f1e68f4e2dd4ca55fd92 Mon Sep 17 00:00:00 2001 From: Krishnaraj Bhat Date: Sun, 6 Feb 2022 21:02:22 +0530 Subject: [PATCH] Pass cmake build type to external project --- cmake/BuildSdk.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/BuildSdk.cmake b/cmake/BuildSdk.cmake index f685a49..e58c854 100644 --- a/cmake/BuildSdk.cmake +++ b/cmake/BuildSdk.cmake @@ -26,8 +26,8 @@ set(DEPS "${CMAKE_CURRENT_BINARY_DIR}/opencl_sdk") set(DEPS_BUILD "${DEPS}/build") file(MAKE_DIRECTORY ${DEPS} ${DEPS_BUILD}) file(WRITE "${DEPS}/CMakeLists.txt" "${CMAKE_LIST_CONTENT}") -execute_process(WORKING_DIRECTORY "${DEPS_BUILD}" COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} ..) -execute_process(WORKING_DIRECTORY "${DEPS_BUILD}" COMMAND ${CMAKE_COMMAND} --build .) +execute_process(WORKING_DIRECTORY "${DEPS_BUILD}" COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ..) +execute_process(WORKING_DIRECTORY "${DEPS_BUILD}" COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE}) set(ENV{OCL_ROOT} "${SDK_ROOT}")