File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ include (CheckSourceCompiles)
2+ # Compiler capability test
3+ check_source_compiles(Fortran
4+ "program test
5+ character(kind=selected_char_kind('ISO_10646')) :: c
6+ end program"
7+ HAS_Fortran_UTF8
8+ )
9+
110# compiler flags for gfortran
211if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
312
Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ ${_src}/json_module.F90
2323)
2424
2525add_library (jsonfortran ${JF_LIB_SRCS} )
26- target_compile_definitions (jsonfortran PRIVATE ${JSON_REAL_KIND} ${JSON_INT_KIND} )
26+ target_compile_definitions (jsonfortran PRIVATE
27+ ${JSON_REAL_KIND} ${JSON_INT_KIND}
28+ $<$<BOOL :${HAS_Fortran_UTF8} >:USE_UCS4>
29+ )
2730target_include_directories (jsonfortran PUBLIC
2831$<BUILD_INTERFACE:${CMAKE_BINARY_DIR} /include >
2932$<INSTALL_INTERFACE:include >
You can’t perform that action at this time.
0 commit comments