2020-06-26 13:26:54 +02:00
|
|
|
function(adaptive_brightness_add_compile_flags target)
|
|
|
|
if(MSVC)
|
|
|
|
target_compile_options(${target} PUBLIC /MP)
|
|
|
|
endif()
|
2020-07-05 00:13:20 +02:00
|
|
|
target_compile_definitions(${target} PUBLIC $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG_OUTPUT>)
|
2020-06-26 13:26:54 +02:00
|
|
|
endfunction()
|
|
|
|
|
|
|
|
function(adaptive_brightness_enable_warnings target)
|
|
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
|
|
|
target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic)
|
|
|
|
elseif(MSVC)
|
|
|
|
target_compile_options(${target} PRIVATE /W3)
|
|
|
|
endif()
|
|
|
|
endfunction()
|
2020-07-05 11:38:48 +02:00
|
|
|
|
|
|
|
function(adaptive_brightness_enable_source_file_log target)
|
|
|
|
target_compile_definitions(${target} PUBLIC LOG_SOURCE_LOCATION)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
function(adaptive_brightness_enable_function_name_log target)
|
|
|
|
target_compile_definitions(${target} PUBLIC LOG_FUNCTION_LOCATION)
|
|
|
|
endfunction()
|