Use -ansi to build when using GCC/Clang
This commit is contained in:
parent
23c313d9cf
commit
a04af496f0
@ -13,10 +13,13 @@ target_include_directories(minitar PUBLIC ${CMAKE_CURRENT_LIST_DIR}) # for minit
|
|||||||
|
|
||||||
set_target_properties(minitar PROPERTIES OUTPUT_NAME mtar)
|
set_target_properties(minitar PROPERTIES OUTPUT_NAME mtar)
|
||||||
|
|
||||||
|
set_target_properties(minitar PROPERTIES C_STANDARD 11)
|
||||||
|
set_target_properties(minitar PROPERTIES C_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_compile_options(minitar PRIVATE /W4 /WX)
|
target_compile_options(minitar PRIVATE /W4 /WX)
|
||||||
else()
|
else()
|
||||||
target_compile_options(minitar PRIVATE -Wall -Wextra -pedantic -Werror)
|
target_compile_options(minitar PRIVATE -Wall -Wextra -pedantic -Werror -ansi)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS minitar DESTINATION lib)
|
install(TARGETS minitar DESTINATION lib)
|
||||||
|
Loading…
Reference in New Issue
Block a user