Add cmake support
This commit is contained in:
13
cmake/compile_flags.cmake
Normal file
13
cmake/compile_flags.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
function(adaptive_brightness_add_compile_flags target)
|
||||
if(MSVC)
|
||||
target_compile_options(${target} PUBLIC /MP)
|
||||
endif()
|
||||
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()
|
||||
Reference in New Issue
Block a user