From 5d364789afb0d653ff4eba3f6fa41a86aae071b6 Mon Sep 17 00:00:00 2001 From: John-Gee Date: Sun, 6 Jan 2019 05:51:44 -0800 Subject: [PATCH] Fixed checking for build type --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ac81aaf..5944545c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -183,10 +183,9 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -if(CMAKE_BUILD_TYPE EQUAL Debug) +if(CMAKE_BUILD_TYPE STREQUAL Debug) set(CMAKE_CXX_FLAGS "-g") -endif() -if(CMAKE_BUILD_TYPE EQUAL Release) +elseif(CMAKE_BUILD_TYPE STREQUAL Release) set(CMAKE_CXX_FLAGS "-O3 -flto") endif()