<commit_before>cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_BUILD_TYPE Debug)

project(XCFun CXX C Fortran)

set (XCFun_VERSION_MAJOR 1)
set (XCFun_VERSION_MINOR 0)

option(XCFUN_NO_STDC++ "Disable libsrdc++" OFF)
option(XCFUN_ENABLE_TESTS "Disable libsrdc++" ON)

include(ConfigCompilerFlags)
if (CMAKE_COMPILER_IS_GNUCXX)
	set (CMAKE_CXX_FLAGS "-Wall -Wno-unknown-pragmas -Wno-sign-compare -fno-rtti -fno-exceptions ")
	set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -DDEBUG")
	set (CMAKE_CXX_FLAGS_RELEASE "-g -O2 -DNDEBUG -Wno-unused")

	if (XCFUN_NO_STDC++)
		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")
	endif()
elseif (CMAKE_CXX_COMPILER_ID MATCHES Intel)
	set (CMAKE_CXX_FLAGS "-wd981 -wd279 -wd383 -vec-report0 -wd1572 -wd177 -fno-rtti -fno-exceptions")
	set (CMAKE_CXX_FLAGS_DEBUG "-g -O0")
	set (CMAKE_CXX_FLAGS_RELEASE "-g -O2 -DNDEBUG")
	set (CMAKE_CXX_LINKER_FLAGS "-shared-intel")
endif ()
config_compiler_flags(C++)

if (CMAKE_COMPILER_IS_GNUC)
	set (CMAKE_C_FLAGS "-Wall")
	set (CMAKE_C_FLAGS_DEBUG "-O0 -g3 -DDEBUG")
	set (CMAKE_C_FLAGS_RELEASE "-g -O2 -DNDEBUG -Wno-unused")
elseif (CMAKE_C_COMPILER_ID MATCHES Intel)
	set (CMAKE_C_FLAGS "-wd981 -wd279 -wd383 -vec-report0 -wd1572 -wd177")
	set (CMAKE_C_FLAGS_DEBUG "-g -O0")
	set (CMAKE_C_FLAGS_RELEASE "-g -O2 -DNDEBUG")
	set (CMAKE_C_LINKER_FLAGS "-shared-intel")
endif ()
config_compiler_flags(C)

if (CMAKE_COMPILER_IS_GNUFORTRAN)
	set (CMAKE_Fortran_FLAGS "-Wall -Jfortran")
	set (CMAKE_Fortran_FLAGS_DEBUG "-g -O0")
	set (CMAKE_Fortran_FLAGS_RELEASE "-g -O2")
elseif (CMAKE_Fortran_COMPILER_ID MATCHES Intel)
	set (CMAKE_Fortran_FLAGS "")
	set (CMAKE_Fortran_FLAGS_DEBUG "-g -O0")
	set (CMAKE_Fortran_FLAGS_RELEASE "-g -O2")
endif ()
config_compiler_flags(Fortran)

include_directories(${PROJECT_BINARY_DIR})

add_subdirectory(src)
if (XCFUN_ENABLE_TESTS)
	enable_testing()
	add_subdirectory(fortran)
	add_subdirectory(test)
endif()

find_package(Doxygen)
if (DOXYGEN_FOUND)
	add_custom_target(docs
		COMMAND ${DOXYGEN_EXECUTABLE}
		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}<commit_msg>Added missing linker flag for intel.<commit_after>cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_BUILD_TYPE Debug)

project(XCFun CXX C Fortran)

set (XCFun_VERSION_MAJOR 1)
set (XCFun_VERSION_MINOR 0)

option(XCFUN_NO_STDC++ "Disable libsrdc++" OFF)
option(XCFUN_ENABLE_TESTS "Disable libsrdc++" ON)

include(ConfigCompilerFlags)
if (CMAKE_COMPILER_IS_GNUCXX)
	set (CMAKE_CXX_FLAGS "-Wall -Wno-unknown-pragmas -Wno-sign-compare -fno-rtti -fno-exceptions ")
	set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -DDEBUG")
	set (CMAKE_CXX_FLAGS_RELEASE "-g -O2 -DNDEBUG -Wno-unused")

	if (XCFUN_NO_STDC++)
		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")
	endif()
elseif (CMAKE_CXX_COMPILER_ID MATCHES Intel)
	set (CMAKE_CXX_FLAGS "-wd981 -wd279 -wd383 -vec-report0 -wd1572 -wd177 -fno-rtti -fno-exceptions")
	set (CMAKE_CXX_FLAGS_DEBUG "-g -O0")
	set (CMAKE_CXX_FLAGS_RELEASE "-g -O2 -DNDEBUG")
	set (CMAKE_CXX_LINKER_FLAGS "-shared-intel")
endif ()
config_compiler_flags(C++)

if (CMAKE_COMPILER_IS_GNUC)
	set (CMAKE_C_FLAGS "-Wall")
	set (CMAKE_C_FLAGS_DEBUG "-O0 -g3 -DDEBUG")
	set (CMAKE_C_FLAGS_RELEASE "-g -O2 -DNDEBUG -Wno-unused")
elseif (CMAKE_C_COMPILER_ID MATCHES Intel)
	set (CMAKE_C_FLAGS "-wd981 -wd279 -wd383 -vec-report0 -wd1572 -wd177")
	set (CMAKE_C_FLAGS_DEBUG "-g -O0")
	set (CMAKE_C_FLAGS_RELEASE "-g -O2 -DNDEBUG")
	set (CMAKE_C_LINKER_FLAGS "-shared-intel")
endif ()
config_compiler_flags(C)

if (CMAKE_COMPILER_IS_GNUFORTRAN)
	set (CMAKE_Fortran_FLAGS "-Wall -Jfortran")
	set (CMAKE_Fortran_FLAGS_DEBUG "-g -O0")
	set (CMAKE_Fortran_FLAGS_RELEASE "-g -O2")
elseif (CMAKE_Fortran_COMPILER_ID MATCHES Intel)
	set (CMAKE_Fortran_FLAGS "")
	set (CMAKE_Fortran_FLAGS_DEBUG "-g -O0")
	set (CMAKE_Fortran_FLAGS_RELEASE "-g -O2")
	set (CMAKE_Fortran_LINKER_FLAGS "-shared-intel")
endif ()
config_compiler_flags(Fortran)

include_directories(${PROJECT_BINARY_DIR})

add_subdirectory(src)
if (XCFUN_ENABLE_TESTS)
	enable_testing()
	add_subdirectory(fortran)
	add_subdirectory(test)
endif()

find_package(Doxygen)
if (DOXYGEN_FOUND)
	add_custom_target(docs
		COMMAND ${DOXYGEN_EXECUTABLE}
		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
{'fraction_non_alphanumeric': 0.12055109070034443, 'fraction_numerical': 0.023880597014925373, 'mean_word_length': 6.345699831365936, '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': '6045977', 'n_tokens_mistral': 2026, 'n_tokens_neox': 1845, 'n_words': 345}