Skip to content

Target Options

1
2
3
4
5
6
# Set warning levels to about the same level for MSVC, GCC, and Clang
if (MSVC)
    target_compile_options(${TARGET_NAME} PRIVATE /W4 /WX)
else ()
    target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -pedantic -Werror)
endif ()

1
2
3
4
5
6
# Set warning levels to about the same level for MSVC, GCC, and Clang
if (MSVC)
    target_compile_options(${TARGET_NAME} PRIVATE /W4 /WX)
else ()
    target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -pedantic -Werror)
endif ()

Share Snippets