Update CMakeLists.txt
This commit is contained in:
@@ -15,13 +15,13 @@ include(cmake/Summary.cmake)
|
|||||||
include(cmake/OptionalSource.cmake)
|
include(cmake/OptionalSource.cmake)
|
||||||
include(cmake/ParseArguments.cmake)
|
include(cmake/ParseArguments.cmake)
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
set(LINUX ON)
|
set(LINUX ON)
|
||||||
endif()
|
endif()
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
set(FREEBSD ON)
|
set(FREEBSD ON)
|
||||||
endif()
|
endif()
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
||||||
set(OPENBSD ON)
|
set(OPENBSD ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -71,16 +71,15 @@ else()
|
|||||||
$<$<COMPILE_LANGUAGE:CXX>:-Woverloaded-virtual>
|
$<$<COMPILE_LANGUAGE:CXX>:-Woverloaded-virtual>
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:-Wold-style-cast>
|
$<$<COMPILE_LANGUAGE:CXX>:-Wold-style-cast>
|
||||||
)
|
)
|
||||||
endif()
|
option(BUILD_WERROR "Build with -Werror" OFF)
|
||||||
|
if(BUILD_WERROR)
|
||||||
option(BUILD_WERROR "Build with -Werror" OFF)
|
list(APPEND COMPILE_OPTIONS -Werror)
|
||||||
if(BUILD_WERROR)
|
endif()
|
||||||
list(APPEND COMPILE_OPTIONS -Werror)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_compile_options(${COMPILE_OPTIONS})
|
add_compile_options(${COMPILE_OPTIONS})
|
||||||
|
|
||||||
if(${CMAKE_BUILD_TYPE} MATCHES "Release")
|
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
add_definitions(-DNDEBUG)
|
add_definitions(-DNDEBUG)
|
||||||
add_definitions(-DQT_NO_DEBUG_OUTPUT)
|
add_definitions(-DQT_NO_DEBUG_OUTPUT)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user