# 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.REGEX_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.REGEX_LINK_PATH}
        ${BOOST.SYSTEM_LINK_PATH}
        ${CGAL_LINK_PATH}
        ${GPERFTOOLS_LINK_PATH}
        ${TCMALLOC_HEAPCHECKER_LINK_PATH}
        ${TCMALLOC_HEAPPROFILER_LINK_PATH})
add_definitions("-DIMP_EXECUTABLE")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ATOM_CXX_FLAGS}")


File(GLOB runtimepytests "${CMAKE_BINARY_DIR}/test/atom/test_*.py")

math(EXPR short_timeout "${IMP_TIMEOUT_FACTOR} * 5")
math(EXPR medium_timeout "${IMP_TIMEOUT_FACTOR} * 15")
math(EXPR expensive_timeout "${IMP_TIMEOUT_FACTOR} * 120")

# should make into function
foreach (test ${runtimepytests} ${CMAKE_SOURCE_DIR}/modules/atom/test/test_bd_singleton_score.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_bond_decorator_particle_pair_container.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_bond_refiner.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_bonds.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_ca_pdb.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_charged_decorator.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_charmm_atom.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_charmm_parameters.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_charmm_stereochemistry.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_clone.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_coulomb.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_cover.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_cover_bond.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_create_protein.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_dihedrals.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_distance.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_dna_simpl.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_element.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_estimates.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_ez_restraint.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_force_switch.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_fragment.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_free_model.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_get_residue.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_hierarchy.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_hierarchy_conversion.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_hierarchy_navigation.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_lennard_jones_decorator.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_lennard_jones_pair_score.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_load_pdb.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_md_optimizer.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_md_states.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_mol2.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_pattern.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_pdb.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_pdb_cleanup.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_pdb_frames.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_pdb_string.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_rb_bd.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_ref_optimizer_states.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_refcount_hierarchy.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_residue.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_residue_type.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_rg.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_rigid_alignment_with_rigid_bodies.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_rmsd_and_no.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_secondary_structure.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_selection.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_simplify.py
${CMAKE_SOURCE_DIR}/modules/atom/test/test_stereo_pair_filter.py)
  GET_FILENAME_COMPONENT(name ${test} NAME)
  add_test("IMP.atom-${name}" ${IMP_TEST_SETUP} python ${test})
  set_tests_properties("IMP.atom-${name}" PROPERTIES LABELS "IMP.atom;test;length_short")
  set_tests_properties("IMP.atom-${name}" PROPERTIES TIMEOUT ${short_timeout})
  set_tests_properties("IMP.atom-${name}" PROPERTIES COST 1)
endforeach(test)

foreach (test ${CMAKE_SOURCE_DIR}/modules/atom/test/medium_test_distance.py)
  GET_FILENAME_COMPONENT(name ${test} NAME)
  add_test("IMP.atom-${name}" ${IMP_TEST_SETUP} python ${test})
  set_tests_properties("IMP.atom-${name}" PROPERTIES LABELS "IMP.atom;test;length_medium")
  set_tests_properties("IMP.atom-${name}" PROPERTIES TIMEOUT ${medium_timeout})
  set_tests_properties("IMP.atom-${name}" PROPERTIES COST 2)
endforeach(test)

foreach (test ${CMAKE_SOURCE_DIR}/modules/atom/test/expensive_test_bd.py
${CMAKE_SOURCE_DIR}/modules/atom/test/expensive_test_charmm_topology.py
${CMAKE_SOURCE_DIR}/modules/atom/test/expensive_test_pdb.py
${CMAKE_SOURCE_DIR}/modules/atom/test/expensive_test_protein_ligand_score.py
${CMAKE_SOURCE_DIR}/modules/atom/test/expensive_test_rot_bd.py)
  GET_FILENAME_COMPONENT(name ${test} NAME)
  add_test("IMP.atom-${name}" ${IMP_TEST_SETUP} python ${test})
  set_tests_properties("IMP.atom-${name}" PROPERTIES LABELS "IMP.atom;test;length_expensive")
  set_tests_properties("IMP.atom-${name}" PROPERTIES TIMEOUT ${expensive_timeout})
  set_tests_properties("IMP.atom-${name}" PROPERTIES COST 3)
endforeach(test)

set(cpp_tests ${CMAKE_SOURCE_DIR}/modules/atom/test/test_patch_optimized.cpp)

foreach (test ${cpp_tests})
   GET_FILENAME_COMPONENT(name ${test} NAME)
   GET_FILENAME_COMPONENT(name_we ${test} NAME_WE)
   add_executable("IMP.atom-${name}" ${test})
   target_link_libraries("IMP.atom-${name}"     IMP.atom-lib
    ${IMP_base_LIBRARY};${IMP_cgal_LIBRARY};${IMP_algebra_LIBRARY};${IMP_kernel_LIBRARY};${IMP_display_LIBRARY};${IMP_score_functor_LIBRARY};${IMP_core_LIBRARY};${IMP_container_LIBRARY}
    ${BOOST.FILESYSTEM_LIBRARIES};${BOOST.REGEX_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.atom-${name}" PROPERTIES
                         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/test/atom/"
                         OUTPUT_NAME ${name_we})
   set_property(TARGET "IMP.atom-${name}" PROPERTY FOLDER "IMP.atom")

   add_test("IMP.atom-${name}" ${IMP_TEST_SETUP}
            "${CMAKE_BINARY_DIR}/test/atom/${name_we}${CMAKE_EXECUTABLE_SUFFIX}")
   set_tests_properties("IMP.atom-${name}" PROPERTIES LABELS "IMP.atom;test;length_short")
   set_tests_properties("IMP.atom-${name}" PROPERTIES TIMEOUT ${short_timeout})
   set_tests_properties("IMP.atom-${name}" PROPERTIES COST 1)
   set(executables ${executables} "IMP.atom-${name}")
endforeach(test)


set(mdcpp_tests )

foreach (test ${mdcpp_tests})
   GET_FILENAME_COMPONENT(name ${test} NAME)
   GET_FILENAME_COMPONENT(name_we ${test} NAME_WE)
   add_executable("IMP.atom-${name}" ${test})
   target_link_libraries("IMP.atom-${name}"     IMP.atom-lib
    ${IMP_base_LIBRARY};${IMP_cgal_LIBRARY};${IMP_algebra_LIBRARY};${IMP_kernel_LIBRARY};${IMP_display_LIBRARY};${IMP_score_functor_LIBRARY};${IMP_core_LIBRARY};${IMP_container_LIBRARY}
    ${BOOST.FILESYSTEM_LIBRARIES};${BOOST.REGEX_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.atom-${name}" PROPERTIES
                         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/test/atom/"
                         OUTPUT_NAME ${name_we})
   set_property(TARGET "IMP.atom-${name}" PROPERTY FOLDER "IMP.atom")

   add_test("IMP.atom-${name}" ${IMP_TEST_SETUP}
            "${CMAKE_BINARY_DIR}/test/atom/${name_we}${CMAKE_EXECUTABLE_SUFFIX}")
   set_tests_properties("IMP.atom-${name}" PROPERTIES LABELS "IMP.atom;test;length_medium")
   set_tests_properties("IMP.atom-${name}" PROPERTIES TIMEOUT ${medium_timeout})
   set_tests_properties("IMP.atom-${name}" PROPERTIES COST 1)
   set(executables ${executables} "IMP.atom-${name}")
endforeach(test)

set(excpp_tests )

foreach (test ${excpp_tests})
   GET_FILENAME_COMPONENT(name ${test} NAME)
   GET_FILENAME_COMPONENT(name_we ${test} NAME_WE)
   add_executable("IMP.atom-${name}" ${test})
   target_link_libraries("IMP.atom-${name}"     IMP.atom-lib
    ${IMP_base_LIBRARY};${IMP_cgal_LIBRARY};${IMP_algebra_LIBRARY};${IMP_kernel_LIBRARY};${IMP_display_LIBRARY};${IMP_score_functor_LIBRARY};${IMP_core_LIBRARY};${IMP_container_LIBRARY}
    ${BOOST.FILESYSTEM_LIBRARIES};${BOOST.REGEX_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.atom-${name}" PROPERTIES
                         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/test/atom/"
                         OUTPUT_NAME ${name_we})
   set_property(TARGET "IMP.atom-${name}" PROPERTY FOLDER "IMP.atom")

   add_test("IMP.atom-${name}" ${IMP_TEST_SETUP}
            "${CMAKE_BINARY_DIR}/test/atom/${name_we}${CMAKE_EXECUTABLE_SUFFIX}")
   set_tests_properties("IMP.atom-${name}" PROPERTIES LABELS "IMP.atom;test;length_expensive")
   set_tests_properties("IMP.atom-${name}" PROPERTIES TIMEOUT ${expensive_timeout})
   set_tests_properties("IMP.atom-${name}" PROPERTIES COST 1)
   set(executables ${executables} "IMP.atom-${name}")
endforeach(test)

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