<commit_before># Note: 3.13 is required to install targets from other directories.
cmake_minimum_required(VERSION 3.13...3.16)

project( MartCommon
	VERSION 3.0
	LANGUAGES CXX
)
# guard against multiple inclusions in a single super project as we have sometimes in the mart project
if(TARGET mart-common )
	get_target_property(PREV_SOURCE_DIR mart-netlib SOURCE_DIR) # NOTE: mart-common is an interface library and hence doesn't have the property SOURCE_DIR
	message(WARNING "[MART-COMMON] -- \"${PROJECT_NAME}\" included multiple times --\n-- Only one directory will be built --\n-- Selected dir: ${PREV_SOURCE_DIR}")
	return()
endif()


option( MART_COMMON_INCLUDE_TESTS "Build tests" OFF )
option( MART_COMMON_INCLUDE_EXAMPLES "Build examples" OFF)
option( MART_COMMON_INCLUDE_NET_LIB "Also build netlib components (Those are not header only)" ON)

####### im_str is a separately devoped library that was copied into mart common for convenience
#
add_subdirectory( im_str )
add_library( Mart::im_str ALIAS mart_im_str )

####### create mart-common library
#
add_library( mart-common INTERFACE )
add_library( Mart::common ALIAS mart-common )
set_target_properties( mart-common PROPERTIES EXPORT_NAME common )
target_link_libraries( mart-common INTERFACE Mart::im_str )

target_include_directories( mart-common
	INTERFACE
		$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
target_compile_features( mart-common INTERFACE cxx_std_17 )


####### create mart-netlib library<commit_msg>Build allow to ignore the presence of parallel algorithms to circumvent broken implementations<commit_after># Note: 3.13 is required to install targets from other directories.
cmake_minimum_required(VERSION 3.13...3.16)

project( MartCommon
	VERSION 3.0
	LANGUAGES CXX
)
# guard against multiple inclusions in a single super project as we have sometimes in the mart project
if(TARGET mart-common )
	get_target_property(PREV_SOURCE_DIR mart-netlib SOURCE_DIR) # NOTE: mart-common is an interface library and hence doesn't have the property SOURCE_DIR
	message(WARNING "[MART-COMMON] -- \"${PROJECT_NAME}\" included multiple times --\n-- Only one directory will be built --\n-- Selected dir: ${PREV_SOURCE_DIR}")
	return()
endif()


option( MART_COMMON_INCLUDE_TESTS "Build tests" OFF )
option( MART_COMMON_INCLUDE_EXAMPLES "Build examples" OFF)
option( MART_COMMON_INCLUDE_NET_LIB "Also build netlib components (Those are not header only)" ON)
option( MART_COMMON_IGNORE_STD_PARALLEL_ALGORITHMS ON)

####### im_str is a separately devoped library that was copied into mart common for convenience
#
add_subdirectory( im_str )
add_library( Mart::im_str ALIAS mart_im_str )

####### create mart-common library
#
add_library( mart-common INTERFACE )
add_library( Mart::common ALIAS mart-common )
set_target_properties( mart-common PROPERTIES EXPORT_NAME common )
target_link_libraries( mart-common INTERFACE Mart::im_str )

target_include_directories( mart-common
	INTERFACE
		$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
target_compile_features( mart-common INTERFACE cxx_std_17 )


####### create mart-netlib library
{'fraction_non_alphanumeric': 0.08863198458574181, 'fraction_numerical': 0.008349389852280027, 'mean_word_length': 6.0157657657657655, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '54162', 'n_tokens_mistral': 1001, 'n_tokens_neox': 946, 'n_words': 304}