Use non-version checked add_compile_options

Commit aebc7fa added version checks for CMake compatibility. In reality,
only the add_compile_definitions need the check - add_compile_options
itself has been supported since 3.0. Tested and confirmed built
successfully with CMake 3.8.0.
This commit is contained in:
Joel Johnson
2020-01-20 13:21:14 -07:00
parent 9abf11935c
commit 524234e479
3 changed files with 12 additions and 52 deletions

View File

@@ -6,7 +6,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
#-Werror=* was introduced -after- GCC 4.1.2
if(GNUCXX_VERSION VERSION_GREATER 4.1.2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing")
add_compile_options("-Werror=strict-aliasing")
endif()
endif()