diff options
Diffstat (limited to 'cmake/libgav1_flags.cmake')
-rw-r--r-- | cmake/libgav1_flags.cmake | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cmake/libgav1_flags.cmake b/cmake/libgav1_flags.cmake index 2d8d9a6..a5408e2 100644 --- a/cmake/libgav1_flags.cmake +++ b/cmake/libgav1_flags.cmake @@ -205,7 +205,7 @@ macro(libgav1_test_exe_linker_flag) # Restore cached global exe linker flags. if(cached_CMAKE_EXE_LINKER_FLAGS) - set(CMAKE_EXE_LINKER_FLAGS cached_CMAKE_EXE_LINKER_FLAGS) + set(CMAKE_EXE_LINKER_FLAGS ${cached_CMAKE_EXE_LINKER_FLAGS}) else() unset(CMAKE_EXE_LINKER_FLAGS) endif() @@ -249,3 +249,15 @@ macro(libgav1_set_cxx_flags) libgav1_test_cxx_flag(FLAG_LIST_VAR_NAMES ${cxx_flag_lists}) endmacro() + +# Sets LIBGAV1_TEST_C_FLAGS and LIBGAV1_TEST_CXX_FLAGS. +# +# Note: libgav1_set_cxx_flags() must be called before this macro. Furthermore, +# the call to this macro should be made after all additions to LIBGAV1_CXX_FLAGS +# are complete. +macro(libgav1_set_test_flags) + if(LIBGAV1_ENABLE_TESTS) + set(LIBGAV1_TEST_CXX_FLAGS ${LIBGAV1_CXX_FLAGS}) + list(FILTER LIBGAV1_TEST_CXX_FLAGS EXCLUDE REGEX "-Wframe-larger-than") + endif() +endmacro() |