Skip to content

Commit 9a48789

Browse files
committed
Improve CMakeLists to not warn if build type was manually set to Release
1 parent 1993c83 commit 9a48789

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ if (NOT CMAKE_BUILD_TYPE)
99
set(CMAKE_BUILD_TYPE Release)
1010
message(STATUS "Build type: Release")
1111
else()
12-
message(WARNING "CMake build type is set to ${CMAKE_BUILD_TYPE}! This might result in bad performance!")
12+
if (NOT CMAKE_BUILD_TYPE STREQUAL "Release")
13+
message(WARNING "CMake build type is set to ${CMAKE_BUILD_TYPE}! This might result in bad performance!")
14+
else()
15+
message(STATUS "Build type: Release")
16+
endif()
1317
endif()
1418

1519
if (UNIX)

0 commit comments

Comments
 (0)