<commit_before>#==============================================================================
# Copyright (c) 2011 <NAME> <<EMAIL>>
#==============================================================================

MESSAGE(STATUS "CREATE  RDO_PARSER  LIBRARY")

# Find Boost
SET(Boost_USE_STATIC_LIBS   ON)
SET(Boost_USE_MULTITHREADED ON)
FIND_PACKAGE(Boost COMPONENTS system filesystem thread date_time REQUIRED)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})

FIND_PACKAGE(BISON)
FIND_PACKAGE(FLEX)

IF(NOT BISON_FOUND)
	MESSAGE(ERROR "Bison can not be found")
ENDIF(NOT BISON_FOUND)
IF(NOT FLEX_FOUND)
	MESSAGE(ERROR "Flex can not be found")
ENDIF(NOT FLEX_FOUND)

SET(GENERATED_FILES)

IF(PROJECT_OS_LINUX)

	FLEX_TARGET(lexer_scaner rdo_lexer.l  ${CMAKE_CURRENT_SOURCE_DIR}/rdolex.cpp)

	#ADD_CUSTOM_COMMAND(TARGET rdortp.y PRE_BUILD COMMAND ${BISON_EXECUTABLE} ARGS -g -v --defines=rdogramma.h -prtp -ordogramrtp.cpp rdortp.y)
	#BISON_TARGET(rdodpt rdodpt.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramdpt.cpp COMPILE_FLAGS "-g -pdpt -o")
	#BISON_TARGET(rdoevn rdoevn.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramevn.cpp COMPILE_FLAGS "-g -pevn -o")
	#BISON_TARGET(rdoevn_preparse rdoevn_preparse.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramevn_preparse.cpp COMPILE_FLAGS "-g -pevn_preparse_ -o")
	#BISON_TARGET(rdofrm rdofrm.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramfrm.cpp COMPILE_FLAGS "-g -pfrm -o")
	#BISON_TARGET(rdofun rdofun.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramfun.cpp COMPILE_FLAGS "-g -pfun -o")
	#BISON_TARGET(rdopat rdopat.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogrampat.cpp COMPILE_FLAGS "-g -ppat -o")
	#BISON_TARGET(rdopmd rdopmd.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogrampmd.cpp COMPILE_FLAGS "-g -ppmd -o")
	#BISON_TARGET(rdoproc_opr rdoproc_opr.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_opr.cpp COMPILE_FLAGS "-g -pproc_opr_ -o")
	#BISON_TARGET(rdoproc_rss rdoproc_rss.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_rss.cpp COMPILE_FLAGS "-g -pproc_rss_ -o")
	#BISON_TARGET(rdoproc_rtp rdoproc_rtp.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_rtp.cpp COMPILE_FLAGS "-g -pproc_rtp_ -o")
	#BISON_TARGET(rdorss rdorss.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramrss.cpp COMPILE_FLAGS "-g -prss -o")
	#BISON_TARGET(rdortp rdortp.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramrtp.cpp COMPILE_FLAGS "-g -v --defines=rdogramma.h -prtp -ordogramrtp.cpp")
	#BISON_TARGET(rdosmr_file rdosmr_file.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramsmr_file.cpp COMPILE_FLAGS "-g -psmr_file_ -o")
	#BISON_TARGET(rdosmr_sim rdosmr_sim.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramsmr_sim.cpp COMPILE_FLAGS "-g -psmr_sim_ -o")

SET(GENERATED_FILES
	${FLEX_lexer_scaner_OUTPUTS})
	#${BISON_rdodpt_OUTPUTS}
	#${BISON_rdoevn_OUTPUTS}
	#${BISON_rdoevn_preparse_OUTPUTS}
	#${BISON_rdofrm_OUTPUTS}
	#${BISON_rdofun_OUTPUTS}
	#${BISON_rdopat_OUTPUTS}
	#${BISON_rdopmd_OUTPUTS}
	#${BISON_rdoproc_opr_OUTPUTS}
	#${BISON_rdoproc_rss_OUTPUTS}
	#${BISON_rdoproc_rtp_OUTPUTS}
	#${BISON_rdorss_OUTPUTS}
	#${BISON_rdortp_OUTPUTS}
	#${BISON_rdosmr_file_OUTPUTS}
	#${BISON_rdosmr_sim_OUTPUTS})
	
	#CONFIGURE_FILE(${CMAKE_MODULE_PATH}/rdogramma.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/rdogramma.h)

ENDIF(PROJECT_OS_LINUX)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/parser)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/context)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/type)

SET(GENERATED_FILES
	${GENERATED_FILES}
	rdogramma.h)

SET(HEADER_FILES
	expression.h
	local_variable.h
	namespace.h
	param.h
	pch.h
	rdo_array.h
	rdobison.h
	rdodpt.h
	rdofrm.h
	rdofun.h
	rdo_logic.h
	rdo_object.h<commit_msg> - updated cmake for parser library<commit_after>#==============================================================================
# Copyright (c) 2011 <NAME> <<EMAIL>>
#==============================================================================

MESSAGE(STATUS "CREATE  RDO_PARSER  LIBRARY")

# Find Boost
SET(Boost_USE_STATIC_LIBS   ON)
SET(Boost_USE_MULTITHREADED ON)
FIND_PACKAGE(Boost COMPONENTS system filesystem thread date_time REQUIRED)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})

FIND_PACKAGE(BISON)
FIND_PACKAGE(FLEX)

IF(NOT BISON_FOUND)
	MESSAGE(ERROR "Bison can not be found")
ENDIF(NOT BISON_FOUND)
IF(NOT FLEX_FOUND)
	MESSAGE(ERROR "Flex can not be found")
ENDIF(NOT FLEX_FOUND)

SET(GENERATED_FILES)

IF(PROJECT_OS_LINUX)

	FLEX_TARGET(lexer_scaner rdo_lexer.l  ${CMAKE_CURRENT_SOURCE_DIR}/rdolex.cpp)

	SET(BISON_TEMP_FILES
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramdpt.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramevn.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramevn_preparse.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramfrm.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramfun.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogrampat.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogrampmd.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_opr.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_rss.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_rtp.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramrss.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramrtp.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramsmr_file.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/rdogramsmr_sim.cpp)

	#ADD_CUSTOM_COMMAND(TARGET rdortp.y PRE_BUILD COMMAND ${BISON_EXECUTABLE} ARGS -g -v --defines=rdogramma.h -prtp -ordogramrtp.cpp rdortp.y)
	#BISON_TARGET(rdodpt rdodpt.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramdpt.cpp COMPILE_FLAGS "-g -pdpt -o")
	#BISON_TARGET(rdoevn rdoevn.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramevn.cpp COMPILE_FLAGS "-g -pevn -o")
	#BISON_TARGET(rdoevn_preparse rdoevn_preparse.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramevn_preparse.cpp COMPILE_FLAGS "-g -pevn_preparse_ -o")
	#BISON_TARGET(rdofrm rdofrm.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramfrm.cpp COMPILE_FLAGS "-g -pfrm -o")
	#BISON_TARGET(rdofun rdofun.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramfun.cpp COMPILE_FLAGS "-g -pfun -o")
	#BISON_TARGET(rdopat rdopat.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogrampat.cpp COMPILE_FLAGS "-g -ppat -o")
	#BISON_TARGET(rdopmd rdopmd.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogrampmd.cpp COMPILE_FLAGS "-g -ppmd -o")
	#BISON_TARGET(rdoproc_opr rdoproc_opr.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_opr.cpp COMPILE_FLAGS "-g -pproc_opr_ -o")
	#BISON_TARGET(rdoproc_rss rdoproc_rss.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_rss.cpp COMPILE_FLAGS "-g -pproc_rss_ -o")
	#BISON_TARGET(rdoproc_rtp rdoproc_rtp.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramproc_rtp.cpp COMPILE_FLAGS "-g -pproc_rtp_ -o")
	#BISON_TARGET(rdorss rdorss.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramrss.cpp COMPILE_FLAGS "-g -prss -o")
	#BISON_TARGET(rdortp rdortp.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramrtp.cpp COMPILE_FLAGS "-g -v --defines=rdogramma.h -prtp -ordogramrtp.cpp")
	#BISON_TARGET(rdosmr_file rdosmr_file.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramsmr_file.cpp COMPILE_FLAGS "-g -psmr_file_ -o")
	#BISON_TARGET(rdosmr_sim rdosmr_sim.y ${CMAKE_CURRENT_SOURCE_DIR}/rdogramsmr_sim.cpp COMPILE_FLAGS "-g -psmr_sim_ -o")

SET(GENERATED_FILES
	${FLEX_lexer_scaner_OUTPUTS}
	${BISON_TEMP_FILES}
	rdogramma.h)
	#${BISON_rdodpt_OUTPUTS}
	#${BISON_rdoevn_OUTPUTS}
	#${BISON_rdoevn_preparse_OUTPUTS}
	#${BISON_rdofrm_OUTPUTS}
	#${BISON_rdofun_OUTPUTS}
	#${BISON_rdopat_OUTPUTS}
	#${BISON_rdopmd_OUTPUTS}
	#${BISON_rdoproc_opr_OUTPUTS}
	#${BISON_rdoproc_rss_OUTPUTS}
	#${BISON_rdoproc_rtp_OUTPUTS}
	#${BISON_rdorss_OUTPUTS}
	#${BISON_rdortp_OUTPUTS}
	#${BISON_rdosmr_file_OUTPUTS}
	#${BISON_rdosmr_sim_OUTPUTS})
	
	#CONFIGURE_FILE(${CMAKE_MODULE_PATH}/rdogramma.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/rdogramma.h)

ENDIF(PROJECT_OS_LINUX)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/parser)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/context)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/type)

SET(GENERATED_FILES
	${GENERATED_FILES})

SET(HEADER_FILES
	expression.h
	local_variable.h
	namespace.h
	param.h
	pch.h
	rdo_array.h
	rdobison.h
	rdodpt.h
	rdofrm.h
	rdofun.h
	rdo_logic.h
	rdo_object.h
{'fraction_non_alphanumeric': 0.1505349589450112, 'fraction_numerical': 0.0009952724558347848, 'mean_word_length': 8.166476624857468, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2767950', 'n_tokens_mistral': 3677, 'n_tokens_neox': 3387, 'n_words': 428}