Remove compiler warnings from the CMakeLists
The existing compiler warnings expected either clang/GCC or MSVC, thus making CMakeLists less future proof.
This commit is contained in:
@@ -199,13 +199,6 @@ target_link_libraries(BHLib PUBLIC m)
|
|||||||
configure_file(Config.cmake Config.h @ONLY)
|
configure_file(Config.cmake Config.h @ONLY)
|
||||||
target_include_directories(BHLib PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
target_include_directories(BHLib PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
# Enable all compiler warnings
|
|
||||||
if(MSVC)
|
|
||||||
target_compile_options(BHLib PRIVATE /W4 /WX)
|
|
||||||
else()
|
|
||||||
target_compile_options(BHLib PRIVATE -Wall -Wextra -Wpedantic -Werror -fstrict-aliasing)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Coverage
|
# Coverage
|
||||||
if(ENABLE_COVERAGE)
|
if(ENABLE_COVERAGE)
|
||||||
target_compile_options(BHLib PRIVATE -coverage)
|
target_compile_options(BHLib PRIVATE -coverage)
|
||||||
|
|||||||
@@ -16,13 +16,6 @@ foreach(TEST_FILENAME ${TEST_FILES})
|
|||||||
target_link_libraries("${TEST_NAME}" BHLib BHUnit)
|
target_link_libraries("${TEST_NAME}" BHLib BHUnit)
|
||||||
add_test(NAME "${TEST_NAME}" COMMAND "${TEST_NAME}")
|
add_test(NAME "${TEST_NAME}" COMMAND "${TEST_NAME}")
|
||||||
|
|
||||||
# Enable all compiler warnings
|
|
||||||
if(MSVC)
|
|
||||||
target_compile_options("${TEST_NAME}" PRIVATE /W4 /WX)
|
|
||||||
else()
|
|
||||||
target_compile_options("${TEST_NAME}" PRIVATE -Wall -Wextra -Wpedantic -Werror -fstrict-aliasing)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Enable coverage
|
# Enable coverage
|
||||||
if(ENABLE_COVERAGE)
|
if(ENABLE_COVERAGE)
|
||||||
target_compile_options("${TEST_NAME}" PRIVATE -coverage)
|
target_compile_options("${TEST_NAME}" PRIVATE -coverage)
|
||||||
|
|||||||
@@ -20,10 +20,3 @@ set(BHUNIT_HEADER
|
|||||||
# Library
|
# Library
|
||||||
add_library(BHUnit STATIC ${BHUNIT_SOURCE} ${BHUNIT_HEADER})
|
add_library(BHUnit STATIC ${BHUNIT_SOURCE} ${BHUNIT_HEADER})
|
||||||
target_include_directories(BHUnit PUBLIC include)
|
target_include_directories(BHUnit PUBLIC include)
|
||||||
|
|
||||||
# Enable all compiler warnings
|
|
||||||
if(MSVC)
|
|
||||||
target_compile_options(BHUnit PRIVATE /W4 /WX)
|
|
||||||
else()
|
|
||||||
target_compile_options(BHUnit PRIVATE -Wall -Wextra -Wpedantic -Werror -fstrict-aliasing)
|
|
||||||
endif()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user