Improve CMakeLists to not warn if build type was manually set to Release

This commit is contained in:
Christian Schneider 2020-10-01 15:28:08 +02:00
parent 1993c83173
commit 9a48789323

View file

@ -9,7 +9,11 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
message(STATUS "Build type: Release")
else()
message(WARNING "CMake build type is set to ${CMAKE_BUILD_TYPE}! This might result in bad performance!")
if (NOT CMAKE_BUILD_TYPE STREQUAL "Release")
message(WARNING "CMake build type is set to ${CMAKE_BUILD_TYPE}! This might result in bad performance!")
else()
message(STATUS "Build type: Release")
endif()
endif()
if (UNIX)