File tree 2 files changed +13
-2
lines changed
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)
6
6
SET (JSONCPP_LIB_TYPE STATIC )
7
7
ENDIF (JSONCPP_LIB_BUILD_SHARED)
8
8
9
-
10
9
if ( 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 ()
12
18
endif ( CMAKE_COMPILER_IS_GNUCXX )
13
19
14
20
SET ( JSONCPP_INCLUDE_DIR ../../include )
Original file line number Diff line number Diff line change 26
26
#pragma warning(disable : 4996)
27
27
#endif
28
28
29
+ #if defined(__sun) && defined(__SVR4) // Solaris
30
+ #include < ieeefp.h>
31
+ #define isfinite finite
32
+ #endif
33
+
29
34
namespace Json {
30
35
31
36
static bool containsControlCharacter (const char * str) {
You can’t perform that action at this time.
0 commit comments