<commit_before># Matlab bindings for tigl
# @author <NAME>

find_package(MATLAB)
find_package(PythonInterp)

if(MATLAB_FOUND AND PYTHONINTERP_FOUND)

message(STATUS "Found MATLAB. Create matlab bindings.")

#run python to create the tiglmatlab.c
add_custom_command(
	OUTPUT tiglmatlab.c
	DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_tigl_matlab.py ${PROJECT_SOURCE_DIR}/src/tigl.h
	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
	COMMAND ${PYTHON_EXECUTABLE}
	ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_tigl_matlab.py
)

# c wrapper code
set(TMAT_SRC tiglmatlab.c common.h)

# add def for exports
if(MSVC)
  set(TMAT_SRC ${TMAT_SRC} exports.def)
endif()

include_directories(${PROJECT_SOURCE_DIR}/src ${MATLAB_INCLUDE_DIR} ${TIXI_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})

add_library(tigl_matlab SHARED ${TMAT_SRC})
target_link_libraries(tigl_matlab ${MATLAB_mat_LIBRARY} ${MATLAB_mx_LIBRARY} ${MATLAB_mex_LIBRARY} TIGL)
set_target_properties(tigl_matlab PROPERTIES SUFFIX ${MATLAB_MEX_SUFFIX} PREFIX "")

install(TARGETS tigl_matlab DESTINATION share/tigl/matlab
	COMPONENT interfaces)
	
	
file(GLOB MFILES ${CMAKE_CURRENT_BINARY_DIR}/*.m)
	
install(FILES ${MFILES} DESTINATION share/tigl/matlab
		COMPONENT interfaces
		)

endif() # matlab found<commit_msg>Fixed matlab bindings install script<commit_after># Matlab bindings for tigl
# @author <NAME>

find_package(MATLAB)
find_package(PythonInterp)

if(MATLAB_FOUND AND PYTHONINTERP_FOUND)

message(STATUS "Found MATLAB. Create matlab bindings.")

#run python to create the tiglmatlab.c
add_custom_command(
	OUTPUT tiglmatlab.c
	DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_tigl_matlab.py ${PROJECT_SOURCE_DIR}/src/tigl.h
	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
	COMMAND ${PYTHON_EXECUTABLE}
	ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_tigl_matlab.py
)

# c wrapper code
set(TMAT_SRC tiglmatlab.c common.h)

# add def for exports
if(MSVC)
  set(TMAT_SRC ${TMAT_SRC} exports.def)
endif()

include_directories(${PROJECT_SOURCE_DIR}/src ${MATLAB_INCLUDE_DIR} ${TIXI_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})

add_library(tigl_matlab SHARED ${TMAT_SRC})
target_link_libraries(tigl_matlab ${MATLAB_mat_LIBRARY} ${MATLAB_mx_LIBRARY} ${MATLAB_mex_LIBRARY} TIGL)
set_target_properties(tigl_matlab PROPERTIES SUFFIX ${MATLAB_MEX_SUFFIX} PREFIX "")

install(TARGETS tigl_matlab DESTINATION share/tigl/matlab
	COMPONENT interfaces)
		
install(
    CODE "file( GLOB MFILES ${CMAKE_CURRENT_BINARY_DIR}/*.m )"
    CODE "file( INSTALL \${MFILES} DESTINATION share/tigl/matlab )"
	COMPONENT interfaces
)

endif() # matlab found
{'fraction_non_alphanumeric': 0.0990990990990991, 'fraction_numerical': 0.0, 'mean_word_length': 7.5993265993265995, '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': '4202837', 'n_tokens_mistral': 1065, 'n_tokens_neox': 985, 'n_words': 180}