mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
Linux: port the emulator to a working state on Linux (#117)
Linux: port the emulator to a working state
This commit is contained in:
+12
-4
@@ -1,20 +1,28 @@
|
||||
# Keep the existing Linux IWYU warnings non-fatal.
|
||||
set(KYTY_IWYU_COMMON "-Xiwyu;--cxx17ns;-Qunused-arguments")
|
||||
if (LINUX)
|
||||
set(KYTY_IWYU_STRICT "")
|
||||
else()
|
||||
set(KYTY_IWYU_STRICT ";-Werror")
|
||||
endif()
|
||||
|
||||
function(include_what_you_use target dirs)
|
||||
if (NOT LINUX AND CLANG AND ("${target}" IN_LIST KYTY_IWYU))
|
||||
if (CLANG AND ("${target}" IN_LIST KYTY_IWYU))
|
||||
find_program (CLANG_IWYU_EXE NAMES "include-what-you-use")
|
||||
if (CLANG_IWYU_EXE)
|
||||
set_target_properties(${target} PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${CLANG_IWYU_EXE};-Xiwyu;--cxx17ns;-Qunused-arguments;-Werror")
|
||||
set_target_properties(${target} PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${CLANG_IWYU_EXE};${KYTY_IWYU_COMMON}${KYTY_IWYU_STRICT}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(include_what_you_use_with_mappings target dirs mappings)
|
||||
if (NOT LINUX AND CLANG AND ("${target}" IN_LIST KYTY_IWYU))
|
||||
if (CLANG AND ("${target}" IN_LIST KYTY_IWYU))
|
||||
find_program (CLANG_IWYU_EXE NAMES "include-what-you-use")
|
||||
if (CLANG_IWYU_EXE)
|
||||
foreach(map ${mappings})
|
||||
list(APPEND mapdirs ";-Xiwyu;--mapping_file=${map}")
|
||||
endforeach()
|
||||
set_target_properties(${target} PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${CLANG_IWYU_EXE};${mapdirs};-Xiwyu;--cxx17ns;-Qunused-arguments;-Werror")
|
||||
set_target_properties(${target} PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${CLANG_IWYU_EXE};${mapdirs};${KYTY_IWYU_COMMON}${KYTY_IWYU_STRICT}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user