<commit_before>include( CheckC11 )
include( CheckCCompilerFlag )

set( WSH_EXE_COMPILER_FLAGS "" )
set( WSH_LIB_COMPILER_FLAGS "" )
set( WSH_EXE_LINKER_FLAGS "" )
set( WSH_LIB_LINKER_FLAGS "" )

if( CMAKE_COMPILER_IS_GNUCC )
	set( GCC 1 )
endif (CMAKE_COMPILER_IS_GNUCC )

if( __COMPILER_CLANG )
	set( CLANG 1 )
endif( __COMPILER_CLANG )

if( CMAKE_C_COMPILER_ID EQUAL SunPro )
	set( SUNSTUDIO 1 )
endif( CMAKE_C_COMPILER_ID EQUAL SunPro )

if( CLANG OR GCC )
	check_c11( )
	if( HAVE_C11 )
		add_definitions( -std=c11 )
	else( HAVE_C11 )
		add_definitions( -std=c99 )
	endif( HAVE_C11 )

	add_definitions( -Wall -pedantic )

	check_c_compiler_flag( -fPIC HAVE_FPIC )
	if( HAVE_FPIC )
		set( WSH_LIB_COMPILER_FLAGS "${WSH_LIB_COMPILER_FLAGS} -fPIC" )
	endif( HAVE_FPIC )

	check_c_compiler_flag( -pic HAVE_PIC )
	if( HAVE_PIC )
		set( WSH_LIB_LINKER_FLAGS "${WSH_LIB_LINKER_FLAGS} -pic" )
	endif( HAVE_PIC )
<commit_msg>Hoist c11 support out of gcc / clang guard, since sunstudio supports it<commit_after>include( CheckC11 )
include( CheckCCompilerFlag )

set( WSH_EXE_COMPILER_FLAGS "" )
set( WSH_LIB_COMPILER_FLAGS "" )
set( WSH_EXE_LINKER_FLAGS "" )
set( WSH_LIB_LINKER_FLAGS "" )

if( CMAKE_COMPILER_IS_GNUCC )
	set( GCC 1 )
endif (CMAKE_COMPILER_IS_GNUCC )

if( __COMPILER_CLANG )
	set( CLANG 1 )
endif( __COMPILER_CLANG )

if( CMAKE_C_COMPILER_ID EQUAL SunPro )
	set( SUNSTUDIO 1 )
endif( CMAKE_C_COMPILER_ID EQUAL SunPro )

check_c11( )
if( HAVE_C11 )
	list( APPEND CMAKE_REQUIRED_FLAGS -std=c11 )
else( HAVE_C11 )
	list( APPEND CMAKE_REQUIRED_FLAGS -std=c99 )
endif( HAVE_C11 )

list( APPEND CMAKE_REQUIRED_DEFINITIONS -Wall )

if( CLANG OR GCC )
	list( APPEND CMAKE_REQUIRED_FLAGS -pedantic )

	check_c_compiler_flag( -fPIC HAVE_FPIC )
	if( HAVE_FPIC )
		set( WSH_LIB_COMPILER_FLAGS "${WSH_LIB_COMPILER_FLAGS} -fPIC" )
	endif( HAVE_FPIC )

	check_c_compiler_flag( -pic HAVE_PIC )
	if( HAVE_PIC )
		set( WSH_LIB_LINKER_FLAGS "${WSH_LIB_LINKER_FLAGS} -pic" )
	endif( HAVE_PIC )

{'fraction_non_alphanumeric': 0.09576612903225806, 'fraction_numerical': 0.018145161290322582, 'mean_word_length': 5.222570532915361, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4864419', 'n_tokens_mistral': 945, 'n_tokens_neox': 883, 'n_words': 174}