mirror of
https://github.com/android/ndk-samples
synced 2025-11-10 18:41:39 +08:00
I assume I'll want to make more "global" changes at some point, so rather than copying the same add_compile_options into every project, create add_app_library() as a wrapper around add_library() which handles the common stuff.
16 lines
354 B
CMake
16 lines
354 B
CMake
include_guard()
|
|
|
|
# Wrapper for add_library which enables common options we want for all
|
|
# libraries.
|
|
function(add_app_library name)
|
|
cmake_parse_arguments(PARSE_ARGV 1 arg "" "" "")
|
|
add_library(${name} ${arg_UNPARSED_ARGUMENTS})
|
|
|
|
target_compile_options(${name}
|
|
PRIVATE
|
|
-Wall
|
|
-Wextra
|
|
-Werror
|
|
)
|
|
endfunction()
|