Fix CMAKE_BUILD_TYPE comparison

This commit is contained in:
Zero-One101 2015-12-27 06:29:57 +00:00
parent da630143b6
commit e88a5c936f
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
include_directories(/usr/local/include)
endif()
if(${CMAKE_BUILD_TYPE} STREQUAL "Release" AND ${CMAKE_SYSTEM_NAME} STREQUAL Linux)
if(${CMAKE_BUILD_TYPE} AND ${CMAKE_BUILD_TYPE} STREQUAL "Release" AND ${CMAKE_SYSTEM_NAME} STREQUAL Linux)
option(USE_LD_GOLD "Link with GNU Gold and enable LTO" ON)
else()
option(USE_LD_GOLD "Link with GNU Gold and enable LTO" OFF)