File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,15 @@ ELSE(JSONCPP_LIB_BUILD_SHARED)
66 SET (JSONCPP_LIB_TYPE STATIC )
77ENDIF (JSONCPP_LIB_BUILD_SHARED)
88
9-
109if ( CMAKE_COMPILER_IS_GNUCXX )
11- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing" )
10+ #Get compiler version.
11+ execute_process ( COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
12+ OUTPUT_VARIABLE GNUCXX_VERSION )
13+
14+ #-Werror=* was introduced -after- GCC 4.1.2
15+ if ( GNUCXX_VERSION VERSION_GREATER 4.1.2 )
16+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing" )
17+ endif ()
1218endif ( CMAKE_COMPILER_IS_GNUCXX )
1319
1420SET ( JSONCPP_INCLUDE_DIR ../../include )
Original file line number Diff line number Diff line change 2626#pragma warning(disable : 4996)
2727#endif
2828
29+ #if defined(__sun) && defined(__SVR4) // Solaris
30+ #include < ieeefp.h>
31+ #define isfinite finite
32+ #endif
33+
2934namespace Json {
3035
3136static bool containsControlCharacter (const char * str) {
You can’t perform that action at this time.
0 commit comments