From 0df6483cbb7fd59b8b2cc7595d5f716c4f2cedfa Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Sun, 9 Jun 2019 13:52:51 +0200 Subject: [PATCH] Fix build when CMAKE_BUILD_TYPE is not specified If CMAKE_BUILD_TYPE is not specified, cmake aborts with CMake Error at CMakeLists.txt:22 (if): if given arguments: "STREQUAL" "Debug" "OR" "STREQUAL" "DebugFull" Unknown arguments specified --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12fb2ed..be6165f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ else (USE_SYSTEM_LIBGIT2) set(libgit_link_name git24kup) endif (USE_SYSTEM_LIBGIT2) -if(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "DebugFull") +if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "DebugFull") message(WARNING "enabling debug output!") add_definitions(-DDEBUG) else()