<commit_before>## Process this file with cmake
#==============================================================================
#  NeXus - Neutron & X-ray Common Data Format
#  
#  CMakeLists for building the NeXus library and applications.
#
#  Copyright (C) 2011 <NAME>
#  
#  This library is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by the
#  Free Software Foundation; either version 2 of the License, or (at your
#  option) any later version.
# 
#  This library is distributed in the hope that it will be useful, but WITHOUT
#  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
#  for more details.
# 
#  You should have received a copy of the GNU Lesser General Public License
#  along with this library; if not, write to the Free Software Foundation,
#  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#             
#  For further information, see <http://www.nexusformat.org>
#
#
#==============================================================================

set(NAPITESTSRC napi_test.c)

#------------------------------------------------------------------------------
# Need to copy the test data files 
#------------------------------------------------------------------------------
add_subdirectory(data)

include_directories(${PROJECT_SOURCE_DIR}/include )
link_directories(${HDF5_LIBRARY_DIRS} 
                 ${HDF4_LIBRARY_DIRS}
                 ${MXML_LIBRARY_DIRS})

#------------------------------------------------------------------------------
# In all cases we have to build the C-tests
#------------------------------------------------------------------------------
if(WITH_HDF5)
    add_executable(napi_test_hdf5 napi_test.c)
    target_link_libraries(napi_test_hdf5 NeXus_Shared_Library 
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NAPI-C-HDF5-test" COMMAND napi_test_hdf5)
endif()

if(WITH_HDF4)
    add_executable(napi_test_hdf4 napi_test.c)
    target_link_libraries(napi_test_hdf4 NeXus_Shared_Library 
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NPI-C-HDF4-test"
             COMMAND napi_test_hdf4)
endif()

if(WITH_MXML)
    add_executable(napi_test-xml napi_test.c)
    target_link_libraries(napi_test-xml NeXus_Shared_Library 
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NPI-C-MXML-test"
             COMMAND napi_test-xml)
    add_executable(napi_test-xml-table napi_test.c)
    target_link_libraries(napi_test-xml-table NeXus_Shared_Library 
                          ${NAPI_LINK_LIBS})
  add_test(NAME "NPI-C-MXML-TABLE-test"
             COMMAND napi_test-xml-table)
endif()

#------------------------------------------------------------------------------
# (most probably a) regression test 
#------------------------------------------------------------------------------
add_executable(leak_test1 leak_test1.c)
target_link_libraries(leak_test1 NeXus_Shared_Library ${NAPI_LINK_LIBS})
add_test(NAME "NAPI-C-leak-test-1"
         COMMAND leak_test1)

#------------------------------------------------------------------------------
# Add test for unlimited dimensions 
#------------------------------------------------------------------------------
add_executable(test_nxunlimited test_nxunlimited.c)
target_link_libraries(test_nxunlimited  NeXus_Shared_Library
                      ${NAPI_LINK_LIBS})
add_test(NAME "NAPI-C-test-nxunlimited"
         COMMAND test_nxunlimited)
         

#------------------------------------------------------------------------------
# Add tests relevant to C++ bindings
#------------------------------------------------------------------------------
if(ENABLE_CXX)
    list(APPEND NAPITESTSRC napi_test_cpp.cxx)
    include_directories(../bindings/cpp)

    if(WITH_HDF5)
        add_executable(napi_cpp_test-hdf5 napi_test_cpp.cxx)
        target_link_libraries(napi_cpp_test-hdf5 NeXus_CPP_Shared_Library
                              ${NAPI_LINK_LIBS})
        add_test(NAME "NAPI-C++-HDF5-test" COMMAND napi_cpp_test-hdf5)
    endif()

    if(WITH_HDF4)
        add_executable(napi_cpp_test-hdf4 napi_test_cpp.cxx)
        target_link_libraries(napi_cpp_test-hdf4 NeXus_CPP_Shared_Library
                              ${NAPI_LINK_LIBS})
        add_test(NAME "NAPI-C++-HDF4-test" COMMAND napi_cpp_test-hdf4)
    endif()

    if(WITH_MXML)
        add_executable(napi_cpp_test-xml napi_test_cpp.cxx)
        target_link_libraries(napi_cpp_test-xml NeXus_CPP_Shared_Library
                              ${NAPI_LINK_LIBS})
        add_test(NAME "NAPI-C++-MXML-test" COMMAND napi_cpp_test-xml)
        
        add_executable(napi_cpp_test-xml-table napi_test_cpp.cxx)
        target_link_libraries(napi_cpp_test-xml-table NeXus_CPP_Shared_Library
                              ${NAPI_LINK_LIBS})
        add_test(NAME "NAPI-C++-MXML-TABLE-test" 
                 COMMAND napi_cpp_test-xml-table)
    endif()

    #--------------------------------------------------------------------------
    # build leak tests
    #--------------------------------------------------------------------------
    add_executable(leak_test2 leak_test2.cxx)
    target_link_libraries(leak_test2 NeXus_CPP_Shared_Library 
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NAPI-C++-leak-test-2" 
             COMMAND leak_test2)

    add_executable(leak_test3 leak_test3.cxx)
    target_link_libraries(leak_test3 NeXus_CPP_Shared_Library
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NAPI-C++-leak-test-3"
             COMMAND leak_test3)
endif()

if(ENABLE_FORTRAN77)
    include_directories(${PROJECT_BINARY_DIR}/bindings/f77)<commit_msg>Removed XML-table from the C++ tests<commit_after>## Process this file with cmake
#==============================================================================
#  NeXus - Neutron & X-ray Common Data Format
#  
#  CMakeLists for building the NeXus library and applications.
#
#  Copyright (C) 2011 <NAME>
#  
#  This library is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by the
#  Free Software Foundation; either version 2 of the License, or (at your
#  option) any later version.
# 
#  This library is distributed in the hope that it will be useful, but WITHOUT
#  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
#  for more details.
# 
#  You should have received a copy of the GNU Lesser General Public License
#  along with this library; if not, write to the Free Software Foundation,
#  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#             
#  For further information, see <http://www.nexusformat.org>
#
#
#==============================================================================

set(NAPITESTSRC napi_test.c)

#------------------------------------------------------------------------------
# Need to copy the test data files 
#------------------------------------------------------------------------------
add_subdirectory(data)

include_directories(${PROJECT_SOURCE_DIR}/include )
link_directories(${HDF5_LIBRARY_DIRS} 
                 ${HDF4_LIBRARY_DIRS}
                 ${MXML_LIBRARY_DIRS})

#------------------------------------------------------------------------------
# In all cases we have to build the C-tests
#------------------------------------------------------------------------------
if(WITH_HDF5)
    add_executable(napi_test_hdf5 napi_test.c)
    target_link_libraries(napi_test_hdf5 NeXus_Shared_Library 
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NAPI-C-HDF5-test" COMMAND napi_test_hdf5)
endif()

if(WITH_HDF4)
    add_executable(napi_test_hdf4 napi_test.c)
    target_link_libraries(napi_test_hdf4 NeXus_Shared_Library 
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NPI-C-HDF4-test"
             COMMAND napi_test_hdf4)
endif()

if(WITH_MXML)
    add_executable(napi_test-xml napi_test.c)
    target_link_libraries(napi_test-xml NeXus_Shared_Library 
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NPI-C-MXML-test"
             COMMAND napi_test-xml)
    add_executable(napi_test-xml-table napi_test.c)
    target_link_libraries(napi_test-xml-table NeXus_Shared_Library 
                          ${NAPI_LINK_LIBS})
  add_test(NAME "NPI-C-MXML-TABLE-test"
             COMMAND napi_test-xml-table)
endif()

#------------------------------------------------------------------------------
# (most probably a) regression test 
#------------------------------------------------------------------------------
add_executable(leak_test1 leak_test1.c)
target_link_libraries(leak_test1 NeXus_Shared_Library ${NAPI_LINK_LIBS})
add_test(NAME "NAPI-C-leak-test-1"
         COMMAND leak_test1)

#------------------------------------------------------------------------------
# Add test for unlimited dimensions 
#------------------------------------------------------------------------------
add_executable(test_nxunlimited test_nxunlimited.c)
target_link_libraries(test_nxunlimited  NeXus_Shared_Library
                      ${NAPI_LINK_LIBS})
add_test(NAME "NAPI-C-test-nxunlimited"
         COMMAND test_nxunlimited)
         

#------------------------------------------------------------------------------
# Add tests relevant to C++ bindings
#------------------------------------------------------------------------------
if(ENABLE_CXX)
    list(APPEND NAPITESTSRC napi_test_cpp.cxx)
    include_directories(../bindings/cpp)

    if(WITH_HDF5)
        add_executable(napi_test_cpp-hdf5 napi_test_cpp.cxx)
        target_link_libraries(napi_test_cpp-hdf5 NeXus_CPP_Shared_Library
                              ${NAPI_LINK_LIBS})
        add_test(NAME "NAPI-C++-HDF5-test" COMMAND napi_test_cpp-hdf5)
    endif()

    if(WITH_HDF4)
        add_executable(napi_test_cpp-hdf4 napi_test_cpp.cxx)
        target_link_libraries(napi_test_cpp-hdf4 NeXus_CPP_Shared_Library
                              ${NAPI_LINK_LIBS})
        add_test(NAME "NAPI-C++-HDF4-test" COMMAND napi_test_cpp-hdf4)
    endif()

    if(WITH_MXML)
        add_executable(napi_test_cpp-xml napi_test_cpp.cxx)
        target_link_libraries(napi_test_cpp-xml NeXus_CPP_Shared_Library
                              ${NAPI_LINK_LIBS})
        add_test(NAME "NAPI-C++-MXML-test" COMMAND napi_test_cpp-xml)
        
#        add_executable(napi_test_cpp-xml-table napi_test_cpp.cxx)
#        target_link_libraries(napi_test_cpp-xml-table NeXus_CPP_Shared_Library
#                              ${NAPI_LINK_LIBS})
#        add_test(NAME "NAPI-C++-MXML-TABLE-test" 
#                 COMMAND napi_test_cpp-xml-table)
    endif()

    #--------------------------------------------------------------------------
    # build leak tests
    #--------------------------------------------------------------------------
    add_executable(leak_test2 leak_test2.cxx)
    target_link_libraries(leak_test2 NeXus_CPP_Shared_Library 
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NAPI-C++-leak-test-2" 
             COMMAND leak_test2)

    add_executable(leak_test3 leak_test3.cxx)
    target_link_libraries(leak_test3 NeXus_CPP_Shared_Library
                          ${NAPI_LINK_LIBS})
    add_test(NAME "NAPI-C++-leak-test-3"
             COMMAND leak_test3)
endif()

if(ENABLE_FORTRAN77)
    include_directories(${PROJECT_BINARY_DIR}/bindings/f77)
{'fraction_non_alphanumeric': 0.25258442453480356, 'fraction_numerical': 0.010337698139214336, 'mean_word_length': 1.7373261023343551, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 24}, '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': '7444961', 'n_tokens_mistral': 3527, 'n_tokens_neox': 3394, 'n_words': 634}