Skip to content

Commit

Permalink
Improve CMakeLists to not warn if build type was manually set to Release
Browse files Browse the repository at this point in the history
  • Loading branch information
schnaader committed Oct 1, 2020
1 parent 1993c83 commit 9a48789
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9a48789

Please sign in to comment.