File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,32 @@ include ( "cmake/checkOutOfSource.cmake" )
36
36
#---------------------
37
37
project ( jsonfortran NONE )
38
38
39
+ #---------------------
40
+ # Real and Integer kinds
41
+ #---------------------
42
+
43
+ SET (JSON_REAL_KIND "REAL64" CACHE STRING "Real kind parameter" )
44
+ SET_PROPERTY (CACHE JSON_REAL_KIND PROPERTY STRINGS REAL32 REAL64 REAL128 )
45
+ if (${JSON_REAL_KIND} MATCHES "REAL32" )
46
+ add_definitions (-DREAL32 )
47
+ elseif (${JSON_REAL_KIND} MATCHES "REAL64" )
48
+ add_definitions (-DREAL64 )
49
+ elseif (${JSON_REAL_KIND} MATCHES "REAL128" )
50
+ add_definitions (-DREAL128 )
51
+ endif ()
52
+
53
+ SET (JSON_INT_KIND "INT32" CACHE STRING "Integer kind parameter" )
54
+ SET_PROPERTY (CACHE JSON_INT_KIND PROPERTY STRINGS INT8 INT16 INT32 INT64 )
55
+ if (${JSON_INT_KIND} MATCHES "INT8" )
56
+ add_definitions (-DINT8 )
57
+ elseif (${JSON_INT_KIND} MATCHES "INT16" )
58
+ add_definitions (-DINT16 )
59
+ elseif (${JSON_INT_KIND} MATCHES "INT32" )
60
+ add_definitions (-DINT32 )
61
+ elseif (${JSON_INT_KIND} MATCHES "INT64" )
62
+ add_definitions (-DINT64 )
63
+ endif ()
64
+
39
65
#----------------------------------
40
66
# Get version (semantic versioning)
41
67
# C.F. semver.org
You can’t perform that action at this time.
0 commit comments