mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-04 18:26:20 +02:00
Use internal CMake compiler version directly
This commit is contained in:
parent
524234e479
commit
3f0d63b5a9
@ -1,14 +1,7 @@
|
|||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.1.2)
|
||||||
#Get compiler version.
|
|
||||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
|
|
||||||
OUTPUT_VARIABLE GNUCXX_VERSION
|
|
||||||
)
|
|
||||||
|
|
||||||
#-Werror=* was introduced -after- GCC 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")
|
add_compile_options("-Werror=strict-aliasing")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
include(CheckIncludeFileCXX)
|
include(CheckIncludeFileCXX)
|
||||||
include(CheckTypeSize)
|
include(CheckTypeSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user