Duckstation/CMakeModules/CheckCXXFlag.cmake

9 lines
230 B
CMake
Raw Normal View History

2020-02-12 19:20:11 +00:00
include(CheckCXXCompilerFlag)
function(check_cxx_flag flag var)
CHECK_CXX_COMPILER_FLAG("-Werror ${flag}" ${var})
if(${var})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
endif()
endfunction()