<commit_before>
cmake_minimum_required(VERSION 2.6)

set(project-name "CoolProp")
project(${project-name})

#Check for the required packaes
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
FIND_PACKAGE(Octave REQUIRED)

set(INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../../include")             # source reside in src/
file(GLOB_RECURSE APP_SOURCES "${CMAKE_SOURCE_DIR}/../../src/*.cpp")             # source reside in src/

SET(OCTAVE_WRAP_INCLUDE_DIRS ${INCLUDE_DIR})

foreach(ITR ${OCTAVE_INCLUDE_DIRS})
  list(APPEND OCTAVE_WRAP_INCLUDE_DIRS ${ITR})
endforeach()
    
include_directories(${OCTAVE_WRAP_INCLUDE_DIRS})

message(STATUS ${OCTAVE_INCLUDE_DIRS})

set(INTERFACE_FILE ${PROJECT_SOURCE_DIR}/../../src/CoolProp.i)

SET_SOURCE_FILES_PROPERTIES(${INTERFACE_FILE} PROPERTIES CPLUSPLUS ON)
SWIG_ADD_MODULE(CoolProp octave ${INTERFACE_FILE} ${APP_SOURCES})

find_library(OCTAVE_LIB octave PATHS ${OCTAVE_LINK_DIRS})
SWIG_LINK_LIBRARIES(CoolProp ${OCTAVE_LIB})

#~ get_cmake_property(_variableNames VARIABLES)
#~ foreach (_variableName ${_variableNames})
#~     message(STATUS "${_variableName}=${${_variableName}}")
#~ endforeach()

message(STATUS ${OCTAVE_LIB})

#~ find_program(MKOCTFILE_EXECUTABLE mkoctfile)
#~ if(NOT MKOCTFILE_EXECUTABLE)<commit_msg>Cmake file for Octave works, but seg faults on ubuntu (?)<commit_after>
cmake_minimum_required(VERSION 2.6)
set(CMAKE_USE_ABSOLUTE_PATHS ON)
set(project-name "CoolProp")
project(${project-name})

#Check for the required packaes
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
FIND_PACKAGE(Octave REQUIRED)

set(INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../../include")             # source reside in src/
file(GLOB_RECURSE APP_SOURCES "${CMAKE_SOURCE_DIR}/../../src/*.cpp")             # source reside in src/

SET(OCTAVE_WRAP_INCLUDE_DIRS ${INCLUDE_DIR})
find_library(OCTAVE_LIB octave PATHS ${OCTAVE_LINK_DIRS})

foreach(ITR ${OCTAVE_INCLUDE_DIRS})
  list(APPEND OCTAVE_WRAP_INCLUDE_DIRS ${ITR})
endforeach()
    
include_directories(${OCTAVE_WRAP_INCLUDE_DIRS})

message(STATUS ${OCTAVE_INCLUDE_DIRS})

set(I_FILE "CoolProp.i")

SET_SOURCE_FILES_PROPERTIES(${I_FILE} PROPERTIES CPLUSPLUS ON)
SWIG_ADD_MODULE(CoolProp octave ${I_FILE} ${APP_SOURCES})
SWIG_LINK_LIBRARIES(CoolProp ${OCTAVE_LIB})

set_target_properties(CoolProp PROPERTIES SUFFIX ".oct" PREFIX "")

message(STATUS ${OCTAVE_LIB})

#~ get_cmake_property(_variableNames VARIABLES)
#~ foreach (_variableName ${_variableNames})
#~     message(STATUS "${_variableName}=${${_variableName}}")
#~ endforeach()

#~ find_program(MKOCTFILE_EXECUTABLE mkoctfile)
#~ if(NOT MKOCTFILE_EXECUTABLE)
{'fraction_non_alphanumeric': 0.13174544101228136, 'fraction_numerical': 0.00148864905098623, 'mean_word_length': 7.321981424148607, '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': '4715183', 'n_tokens_mistral': 1109, 'n_tokens_neox': 980, 'n_words': 160}