mirror of https://github.com/WerWolv/ImHex.git
build: Disable restrict warning
This commit is contained in:
parent
12547a7c8c
commit
5a41be48c3
|
@ -366,4 +366,8 @@ function(downloadImHexPatternsFiles dest)
|
|||
endforeach ()
|
||||
endif ()
|
||||
|
||||
endfunction()
|
||||
endfunction()
|
||||
|
||||
macro(setupCompilerWarnings target)
|
||||
target_compile_options(${target} PRIVATE -Wall -Wextra -Werror -Wno-restrict)
|
||||
endmacro()
|
|
@ -155,7 +155,7 @@ add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
|
|||
|
||||
add_library(libimhex SHARED ${LIBIMHEX_SOURCES})
|
||||
set_target_properties(libimhex PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
target_compile_options(libimhex PRIVATE -Wall -Wextra -Werror)
|
||||
setupCompilerWarnings(libimhex)
|
||||
|
||||
target_include_directories(libimhex PUBLIC include ${XDGPP_INCLUDE_DIRS} ${MBEDTLS_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} ${MAGIC_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS} ${FMT_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${YARA_INCLUDE_DIRS})
|
||||
target_link_directories(libimhex PUBLIC ${MBEDTLS_LIBRARY_DIR} ${CAPSTONE_LIBRARY_DIRS} ${MAGIC_LIBRARY_DIRS})
|
||||
|
|
|
@ -15,7 +15,7 @@ add_executable(main ${APPLICATION_TYPE}
|
|||
)
|
||||
|
||||
target_include_directories(main PUBLIC include)
|
||||
target_compile_options(main PRIVATE -Wall -Wextra -Werror)
|
||||
setupCompilerWarnings(main)
|
||||
|
||||
set_target_properties(main PROPERTIES
|
||||
OUTPUT_NAME "imhex"
|
||||
|
|
|
@ -81,4 +81,4 @@ endif()
|
|||
|
||||
add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror)
|
||||
setupCompilerWarnings(${PROJECT_NAME})
|
||||
|
|
|
@ -27,4 +27,4 @@ endif()
|
|||
|
||||
add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror)
|
||||
setupCompilerWarnings(${PROJECT_NAME})
|
|
@ -39,6 +39,6 @@ if (WIN32)
|
|||
|
||||
add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror)
|
||||
setupCompilerWarnings(${PROJECT_NAME})
|
||||
|
||||
endif ()
|
Loading…
Reference in New Issue