From 78067fedf1ca4cb800fbc3ebc53fc8d07e36afda Mon Sep 17 00:00:00 2001 From: Alper Sekerci Date: Fri, 14 May 2021 19:55:31 +0300 Subject: [PATCH] Fix cmake build type error --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44e9752..4762e50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,14 +28,14 @@ endif() if (MSVC) - if (defined ${CMAKE_BUILD_TYPE}) + if (DEFINED CMAKE_BUILD_TYPE) message("============================ CMake_Build_Type is ${CMAKE_BUILD_TYPE}") set(BUILD_TYPE ${CMAKE_BUILD_TYPE}) else() set(BUILD_TYPE ${CMAKE_CONFIGURATION_TYPES}) endif() - if (${BUILD_TYPE} STREQUAL "Debug") + if ("${BUILD_TYPE}" STREQUAL "Debug") set(TorchCpuCache ${CMAKE_SOURCE_DIR}/.torch/cpu/debug) set(TorchCpuUrl https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.8.1%2Bcu102.zip)