mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 10:03:51 +01:00
Use internal CMake compiler version directly
This commit is contained in:
parent
524234e479
commit
3f0d63b5a9
@ -1,13 +1,6 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user