# Autogenerated file, run tools/build/setup_cmake.py to regenerate

include_directories(${ANN_INCLUDE_PATH}
        ${BOOST.FILESYSTEM_INCLUDE_PATH}
        ${BOOST.PROGRAMOPTIONS_INCLUDE_PATH}
        ${BOOST.RANDOM_INCLUDE_PATH}
        ${BOOST.SYSTEM_INCLUDE_PATH}
        ${CGAL_INCLUDE_PATH}
        ${GPERFTOOLS_INCLUDE_PATH}
        ${TCMALLOC_HEAPCHECKER_INCLUDE_PATH}
        ${TCMALLOC_HEAPPROFILER_INCLUDE_PATH})
link_directories(${ANN_LINK_PATH}
        ${BOOST.FILESYSTEM_LINK_PATH}
        ${BOOST.PROGRAMOPTIONS_LINK_PATH}
        ${BOOST.RANDOM_LINK_PATH}
        ${BOOST.SYSTEM_LINK_PATH}
        ${CGAL_LINK_PATH}
        ${GPERFTOOLS_LINK_PATH}
        ${TCMALLOC_HEAPCHECKER_LINK_PATH}
        ${TCMALLOC_HEAPPROFILER_LINK_PATH})

set(pytests ${CMAKE_SOURCE_DIR}/modules/container/examples/bipartite_nonbonded_interactions.py
${CMAKE_SOURCE_DIR}/modules/container/examples/connectivity.py
${CMAKE_SOURCE_DIR}/modules/container/examples/filter_close_pairs.py
${CMAKE_SOURCE_DIR}/modules/container/examples/nonbonded_interactions.py
${CMAKE_SOURCE_DIR}/modules/container/examples/restrain_in_sphere.py)

math(EXPR timeout "${IMP_TIMEOUT_FACTOR} * 180")

if (${IMP_MAX_CHECKS} MATCHES "INTERNAL")
set(testarg "--run_quick_test" "--deprecation_exceptions")
else()
set(testarg "--deprecation_exceptions")
endif()

foreach (test ${pytests})
 GET_FILENAME_COMPONENT(name ${test} NAME)
 add_test("IMP.container-${name}" ${IMP_TEST_SETUP} python ${test} ${testarg})
 set_tests_properties("IMP.container-${name}" PROPERTIES LABELS "IMP.container;example")
 set_tests_properties("IMP.container-${name}" PROPERTIES TIMEOUT ${timeout})
 set_tests_properties("IMP.container-${name}" PROPERTIES COST 3)
  #add_dependencies(${name} RMFPython)
endforeach(test)

set(cpp_tests )

foreach (test ${cpp_tests})
   GET_FILENAME_COMPONENT(name ${test} NAME)
   GET_FILENAME_COMPONENT(name_we ${test} NAME_WE)
   add_executable("IMP.container-${name_we}" ${test})
   target_link_libraries("IMP.container-${name_we}"
    IMP.container-lib
    ${IMP_base_LIBRARY};${IMP_cgal_LIBRARY};${IMP_algebra_LIBRARY};${IMP_kernel_LIBRARY};${IMP_display_LIBRARY};${IMP_score_functor_LIBRARY};${IMP_core_LIBRARY}
    ${BOOST.FILESYSTEM_LIBRARIES};${BOOST.PROGRAMOPTIONS_LIBRARIES};${BOOST.SYSTEM_LIBRARIES};${GPERFTOOLS_LIBRARIES};${TCMALLOC_HEAPPROFILER_LIBRARIES};${TCMALLOC_HEAPCHECKER_LIBRARIES};${BOOST.RANDOM_LIBRARIES};${CGAL_LIBRARIES};${ANN_LIBRARIES})
   set_target_properties("IMP.container-${name_we}" PROPERTIES
                         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/doc/examples/container/"
                         OUTPUT_NAME "${name_we}")
  set_property(TARGET "IMP.container-${name_we}" PROPERTY FOLDER "IMP.container")

   add_test("IMP.container-${name_we}" ${IMP_TEST_SETUP}
            "${CMAKE_BINARY_DIR}/doc/examples/container/${name_we}${CMAKE_EXECUTABLE_SUFFIX}" ${testarg})
   set_tests_properties("IMP.container-${name_we}" PROPERTIES LABELS "IMP.container;example")
   set_tests_properties("IMP.container-${name_we}" PROPERTIES TIMEOUT ${timeout})
   set_tests_properties("IMP.container-${name_we}" PROPERTIES COST 3)
   set(executables ${executables} "IMP.container-${name_we}")
endforeach(test)

set(IMP_container_EXAMPLES ${executables} CACHE INTERNAL "" FORCE)
