<commit_before>find_path (NODE_ROOT_DIR "node/node.h")

set (NODE_INCLUDE_DIRS
  ${NODE_ROOT_DIR}/src 
  ${NODE_ROOT_DIR}/node
  ${NODE_ROOT_DIR}/deps/v8/include
  ${NODE_ROOT_DIR}/deps/uv/include
)

include_directories (
  ${NODE_INCLUDE_DIRS}                                                                                                                                                        
  ${CMAKE_CURRENT_SOURCE_DIR}/..
)

set_source_files_properties (maajs.i PROPERTIES SWIG_FLAGS "-node")
set_source_files_properties (maajs.i PROPERTIES CPLUSPLUS ON)

swig_add_module (maajs javascript maajs.i ${maa_LIB_SRCS})
swig_link_libraries (maajs ${NODE_LIBRARIES})

if (DOXYGEN_FOUND)
  foreach (_file ${DOCFILES})
    add_dependencies (${SWIG_MODULE_maajs_REAL_NAME} ${_file}doc_i)
  endforeach ()
endif ()

set_target_properties (maajs PROPERTIES
  PREFIX ""<commit_msg>nodejs: define BUILDING_NODE_EXTENSION in CXXFLAGS for upstream swig<commit_after>find_path (NODE_ROOT_DIR "node/node.h")

set (NODE_INCLUDE_DIRS
  ${NODE_ROOT_DIR}/src 
  ${NODE_ROOT_DIR}/node
  ${NODE_ROOT_DIR}/deps/v8/include
  ${NODE_ROOT_DIR}/deps/uv/include
)

include_directories (
  ${NODE_INCLUDE_DIRS}                                                                                                                                                        
  ${CMAKE_CURRENT_SOURCE_DIR}/..
)

set (CMAKE_CXX_FLAGS -DBUILDING_NODE_EXTENSION)
set_source_files_properties (maajs.i PROPERTIES SWIG_FLAGS "-node")
set_source_files_properties (maajs.i PROPERTIES CPLUSPLUS ON)

swig_add_module (maajs javascript maajs.i ${maa_LIB_SRCS})
swig_link_libraries (maajs ${NODE_LIBRARIES})

if (DOXYGEN_FOUND)
  foreach (_file ${DOCFILES})
    add_dependencies (${SWIG_MODULE_maajs_REAL_NAME} ${_file}doc_i)
  endforeach ()
endif ()

set_target_properties (maajs PROPERTIES
  PREFIX ""
{'fraction_non_alphanumeric': 0.09272237196765498, 'fraction_numerical': 0.001078167115902965, 'mean_word_length': 2.6679841897233203, '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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5976139', 'n_tokens_mistral': 652, 'n_tokens_neox': 618, 'n_words': 98}