<commit_before>include(BoostUtils)
set(RDKit_VERSION "${RDKit_ABI}.${RDKit_Year}${RDKit_Quarter}")
set(RDKit_RELEASENAME "${RDKit_Year}Q${RDKit_Quarter}")
if (RDKit_Revision)
  set(RDKit_RELEASENAME "${RDKit_RELEASENAME}_${RDKit_Revision}")
  set(RDKit_VERSION "${RDKit_VERSION}.${RDKit_Revision}")
else(RDKit_Revision)
  set(RDKit_VERSION "${RDKit_VERSION}.0")
endif(RDKit_Revision)

macro(rdkit_library)
  PARSE_ARGUMENTS(RDKLIB
    "LINK_LIBRARIES;DEST"
    "SHARED"
    ${ARGN})
  CAR(RDKLIB_NAME ${RDKLIB_DEFAULT_ARGS})
  CDR(RDKLIB_SOURCES ${RDKLIB_DEFAULT_ARGS})
  if(MSVC)
    add_library(${RDKLIB_NAME} ${RDKLIB_SOURCES})
    INSTALL(TARGETS ${RDKLIB_NAME} 
            DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
  else(MSVC)
    # we're going to always build in shared mode since we
    # need exceptions to be (correctly) catchable across
    # boundaries. As of now (June 2010), this doesn't work
    # with g++ unless libraries are shared.
    #IF(RDKLIB_SHARED)
      add_library(${RDKLIB_NAME} SHARED ${RDKLIB_SOURCES})
      INSTALL(TARGETS ${RDKLIB_NAME} 
              DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
    #ELSE(RDKLIB_SHARED)        
    #  add_library(${RDKLIB_NAME} ${RDKLIB_SOURCES})
    #  INSTALL(TARGETS ${RDKLIB_NAME} 
    #          DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
    #ENDIF(RDKLIB_SHARED)        
    IF(RDKLIB_LINK_LIBRARIES)
      target_link_libraries(${RDKLIB_NAME} ${RDKLIB_LINK_LIBRARIES})
    ENDIF(RDKLIB_LINK_LIBRARIES)
  endif(MSVC)
  if(WIN32)
    set_target_properties(${RDKLIB_NAME} PROPERTIES 
                          OUTPUT_NAME "${RDKLIB_NAME}" 
                          VERSION "${RDKit_ABI}.${RDKit_Year}.${RDKit_Quarter}")
  else(WIN32)
    set_target_properties(${RDKLIB_NAME} PROPERTIES 
                          OUTPUT_NAME ${RDKLIB_NAME} 
                          VERSION ${RDKit_VERSION} 
                          SOVERSION ${RDKit_ABI} )
  endif(WIN32)			  
  set_target_properties(${RDKLIB_NAME} PROPERTIES 
                        ARCHIVE_OUTPUT_DIRECTORY ${RDK_ARCHIVE_OUTPUT_DIRECTORY}
                        RUNTIME_OUTPUT_DIRECTORY ${RDK_RUNTIME_OUTPUT_DIRECTORY}
                        LIBRARY_OUTPUT_DIRECTORY ${RDK_LIBRARY_OUTPUT_DIRECTORY})
endmacro(rdkit_library)
  
macro(rdkit_headers)
  if (NOT RDK_INSTALL_INTREE)
    PARSE_ARGUMENTS(RDKHDR
      "DEST"
      ""
      ${ARGN})
    # RDKHDR_DEFAULT_ARGS -> RDKHDR_DEST
    install(FILES ${RDKHDR_DEFAULT_ARGS} DESTINATION ${RDKit_HdrDir}/${RDKHDR_DEST})
  endif(NOT RDK_INSTALL_INTREE)
endmacro(rdkit_headers)

macro(rdkit_python_extension)
  PARSE_ARGUMENTS(RDKPY
    "LINK_LIBRARIES;DEPENDS;DEST"
    ""
    ${ARGN})
  CAR(RDKPY_NAME ${RDKPY_DEFAULT_ARGS})
  CDR(RDKPY_SOURCES ${RDKPY_DEFAULT_ARGS})
  if(RDK_BUILD_PYTHON_WRAPPERS)
    PYTHON_ADD_MODULE(${RDKPY_NAME} ${RDKPY_SOURCES})
    set_target_properties(${RDKPY_NAME} PROPERTIES PREFIX "")
if(WIN32)
    set_target_properties(${RDKPY_NAME} PROPERTIES SUFFIX ".pyd"
                          RUNTIME_OUTPUT_DIRECTORY
                          ${RDK_PYTHON_OUTPUT_DIRECTORY}/${RDKPY_DEST})
else(WIN32)
    set_target_properties(${RDKPY_NAME} PROPERTIES 
                          LIBRARY_OUTPUT_DIRECTORY
                          ${RDK_PYTHON_OUTPUT_DIRECTORY}/${RDKPY_DEST})
endif(WIN32)  
    target_link_libraries(${RDKPY_NAME} ${RDKPY_LINK_LIBRARIES} 
                          ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})

    INSTALL(TARGETS ${RDKPY_NAME} 
            LIBRARY DESTINATION ${RDKit_PythonDir}/${RDKPY_DEST})<commit_msg>get this building on the mac<commit_after>include(BoostUtils)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Mac OS X specific code
  set(RDKit_VERSION "${RDKit_Year}${RDKit_Quarter}")
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  set(RDKit_VERSION "${RDKit_ABI}.${RDKit_Year}${RDKit_Quarter}")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(RDKit_RELEASENAME "${RDKit_Year}Q${RDKit_Quarter}")
if (RDKit_Revision)
  set(RDKit_RELEASENAME "${RDKit_RELEASENAME}_${RDKit_Revision}")
  set(RDKit_VERSION "${RDKit_VERSION}.${RDKit_Revision}")
else(RDKit_Revision)
  set(RDKit_VERSION "${RDKit_VERSION}.0")
endif(RDKit_Revision)

macro(rdkit_library)
  PARSE_ARGUMENTS(RDKLIB
    "LINK_LIBRARIES;DEST"
    "SHARED"
    ${ARGN})
  CAR(RDKLIB_NAME ${RDKLIB_DEFAULT_ARGS})
  CDR(RDKLIB_SOURCES ${RDKLIB_DEFAULT_ARGS})
  if(MSVC)
    add_library(${RDKLIB_NAME} ${RDKLIB_SOURCES})
    INSTALL(TARGETS ${RDKLIB_NAME} 
            DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
  else(MSVC)
    # we're going to always build in shared mode since we
    # need exceptions to be (correctly) catchable across
    # boundaries. As of now (June 2010), this doesn't work
    # with g++ unless libraries are shared.
    #IF(RDKLIB_SHARED)
      add_library(${RDKLIB_NAME} SHARED ${RDKLIB_SOURCES})
      INSTALL(TARGETS ${RDKLIB_NAME} 
              DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
    #ELSE(RDKLIB_SHARED)        
    #  add_library(${RDKLIB_NAME} ${RDKLIB_SOURCES})
    #  INSTALL(TARGETS ${RDKLIB_NAME} 
    #          DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST})
    #ENDIF(RDKLIB_SHARED)        
    IF(RDKLIB_LINK_LIBRARIES)
      target_link_libraries(${RDKLIB_NAME} ${RDKLIB_LINK_LIBRARIES})
    ENDIF(RDKLIB_LINK_LIBRARIES)
  endif(MSVC)
  if(WIN32)
    set_target_properties(${RDKLIB_NAME} PROPERTIES 
                          OUTPUT_NAME "${RDKLIB_NAME}" 
                          VERSION "${RDKit_ABI}.${RDKit_Year}.${RDKit_Quarter}")
  else(WIN32)
    set_target_properties(${RDKLIB_NAME} PROPERTIES 
                          OUTPUT_NAME ${RDKLIB_NAME} 
                          VERSION ${RDKit_VERSION} 
                          SOVERSION ${RDKit_ABI} )
  endif(WIN32)			  
  set_target_properties(${RDKLIB_NAME} PROPERTIES 
                        ARCHIVE_OUTPUT_DIRECTORY ${RDK_ARCHIVE_OUTPUT_DIRECTORY}
                        RUNTIME_OUTPUT_DIRECTORY ${RDK_RUNTIME_OUTPUT_DIRECTORY}
                        LIBRARY_OUTPUT_DIRECTORY ${RDK_LIBRARY_OUTPUT_DIRECTORY})
endmacro(rdkit_library)
  
macro(rdkit_headers)
  if (NOT RDK_INSTALL_INTREE)
    PARSE_ARGUMENTS(RDKHDR
      "DEST"
      ""
      ${ARGN})
    # RDKHDR_DEFAULT_ARGS -> RDKHDR_DEST
    install(FILES ${RDKHDR_DEFAULT_ARGS} DESTINATION ${RDKit_HdrDir}/${RDKHDR_DEST})
  endif(NOT RDK_INSTALL_INTREE)
endmacro(rdkit_headers)

macro(rdkit_python_extension)
  PARSE_ARGUMENTS(RDKPY
    "LINK_LIBRARIES;DEPENDS;DEST"
    ""
    ${ARGN})
  CAR(RDKPY_NAME ${RDKPY_DEFAULT_ARGS})
  CDR(RDKPY_SOURCES ${RDKPY_DEFAULT_ARGS})
  if(RDK_BUILD_PYTHON_WRAPPERS)
    PYTHON_ADD_MODULE(${RDKPY_NAME} ${RDKPY_SOURCES})
    set_target_properties(${RDKPY_NAME} PROPERTIES PREFIX "")
if(WIN32)
    set_target_properties(${RDKPY_NAME} PROPERTIES SUFFIX ".pyd"
                          RUNTIME_OUTPUT_DIRECTORY
                          ${RDK_PYTHON_OUTPUT_DIRECTORY}/${RDKPY_DEST})
else(WIN32)
    set_target_properties(${RDKPY_NAME} PROPERTIES 
                          LIBRARY_OUTPUT_DIRECTORY
                          ${RDK_PYTHON_OUTPUT_DIRECTORY}/${RDKPY_DEST})
endif(WIN32)  
    target_link_libraries(${RDKPY_NAME} ${RDKPY_LINK_LIBRARIES} 
                          ${PYTHON_LIBRARIES} ${Boost_LIBRARIES} )

    INSTALL(TARGETS ${RDKPY_NAME} 
            LIBRARY DESTINATION ${RDKit_PythonDir}/${RDKPY_DEST})
{'fraction_non_alphanumeric': 0.10851441847751811, 'fraction_numerical': 0.004646713133798005, 'mean_word_length': 3.435151515151515, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5697230', 'n_tokens_mistral': 2905, 'n_tokens_neox': 2676, 'n_words': 346}