|
|
@ -30,6 +30,7 @@ option(SPELL_CHECK "Enable spell cheching support" ON) |
|
|
|
option(SVGZ_ICON "Compress the SVG icon of qTox" ON) |
|
|
|
option(SVGZ_ICON "Compress the SVG icon of qTox" ON) |
|
|
|
option(ASAN "Compile with AddressSanitizer" OFF) |
|
|
|
option(ASAN "Compile with AddressSanitizer" OFF) |
|
|
|
option(DESKTOP_NOTIFICATIONS "Use snorenotify for desktop notifications" OFF) |
|
|
|
option(DESKTOP_NOTIFICATIONS "Use snorenotify for desktop notifications" OFF) |
|
|
|
|
|
|
|
option(STRICT_OPTIONS "Enable strict compile options, used by CI" OFF) |
|
|
|
|
|
|
|
|
|
|
|
# process generated files if cmake >= 3.10 |
|
|
|
# process generated files if cmake >= 3.10 |
|
|
|
if(POLICY CMP0071) |
|
|
|
if(POLICY CMP0071) |
|
|
@ -84,12 +85,16 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") |
|
|
|
set(POSITION_INDEPENDENT_CODE True) |
|
|
|
set(POSITION_INDEPENDENT_CODE True) |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-overflow") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-overflow") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-aliasing") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-aliasing") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") |
|
|
|
|
|
|
|
|
|
|
|
# Extra-strict compile options that we don't want to subject all users to by default |
|
|
|
|
|
|
|
if (STRICT_OPTIONS) |
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
# avoid timestamps in binary for reproducible builds, not added until GCC 4.9 |
|
|
|
# avoid timestamps in binary for reproducible builds, not added until GCC 4.9 |
|
|
|
include(CheckCXXCompilerFlag) |
|
|
|
include(CheckCXXCompilerFlag) |
|
|
|
CHECK_CXX_COMPILER_FLAG(-Wdate-time COMPILER_SUPPORTS_WDATE_TIME) |
|
|
|
CHECK_CXX_COMPILER_FLAG(-Wdate-time COMPILER_SUPPORTS_WDATE_TIME) |
|
|
|
if(COMPILER_SUPPORTS_WDATE_TIME) |
|
|
|
if (COMPILER_SUPPORTS_WDATE_TIME) |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdate-time") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdate-time") |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|