提交 3f0d63b5 编写于 作者: J Joel Johnson

Use internal CMake compiler version directly

上级 524234e4
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
#Get compiler version.
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
OUTPUT_VARIABLE GNUCXX_VERSION
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.1.2)
#-Werror=* was introduced -after- GCC 4.1.2
if(GNUCXX_VERSION VERSION_GREATER 4.1.2)
add_compile_options("-Werror=strict-aliasing")
endif()
add_compile_options("-Werror=strict-aliasing")
endif()
include(CheckIncludeFileCXX)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册