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

include_directories(${ANN_INCLUDE_PATH}
        ${BOOST.FILESYSTEM_INCLUDE_PATH}
        ${BOOST.GRAPH_INCLUDE_PATH}
        ${BOOST.PROGRAMOPTIONS_INCLUDE_PATH}
        ${BOOST.RANDOM_INCLUDE_PATH}
        ${BOOST.REGEX_INCLUDE_PATH}
        ${BOOST.SYSTEM_INCLUDE_PATH}
        ${CGAL_INCLUDE_PATH}
        ${FFTW3_INCLUDE_PATH}
        ${GPERFTOOLS_INCLUDE_PATH}
        ${GSL_INCLUDE_PATH}
        ${HDF5_INCLUDE_PATH}
        ${OPENCV21_INCLUDE_PATH}
        ${OPENCV22_INCLUDE_PATH}
        ${RMF_INCLUDE_PATH}
        ${TCMALLOC_HEAPCHECKER_INCLUDE_PATH}
        ${TCMALLOC_HEAPPROFILER_INCLUDE_PATH})
link_directories(${ANN_LINK_PATH}
        ${BOOST.FILESYSTEM_LINK_PATH}
        ${BOOST.GRAPH_LINK_PATH}
        ${BOOST.PROGRAMOPTIONS_LINK_PATH}
        ${BOOST.RANDOM_LINK_PATH}
        ${BOOST.REGEX_LINK_PATH}
        ${BOOST.SYSTEM_LINK_PATH}
        ${CGAL_LINK_PATH}
        ${FFTW3_LINK_PATH}
        ${GPERFTOOLS_LINK_PATH}
        ${GSL_LINK_PATH}
        ${HDF5_LINK_PATH}
        ${OPENCV21_LINK_PATH}
        ${OPENCV22_LINK_PATH}
        ${RMF_LINK_PATH}
        ${TCMALLOC_HEAPCHECKER_LINK_PATH}
        ${TCMALLOC_HEAPPROFILER_LINK_PATH})
add_definitions("-DIMP_EXECUTABLE")

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


File(GLOB runtimepytests "${CMAKE_BINARY_DIR}/test/em2d/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/em2d/test/test_align2d.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_argminmax.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_clustering_of_models.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_collision_cross_section.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_csv_related.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_database.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_domino_filters.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_em2d_restraint.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_fft_operations.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_images_opencv.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_registration_results.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_sampling.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_selection_files.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/test_solutions_io.py)
  GET_FILENAME_COMPONENT(name ${test} NAME)
  add_test("IMP.em2d-${name}" ${IMP_TEST_SETUP} python ${test})
  set_tests_properties("IMP.em2d-${name}" PROPERTIES LABELS "IMP.em2d;test;length_short")
  set_tests_properties("IMP.em2d-${name}" PROPERTIES TIMEOUT ${short_timeout})
  set_tests_properties("IMP.em2d-${name}" PROPERTIES COST 1)
endforeach(test)

foreach (test ${CMAKE_SOURCE_DIR}/modules/em2d/test/medium_test_buildxlinks.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/medium_test_project.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/medium_test_projection_registration.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/medium_test_relative_mover.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/medium_test_rigid_bodies_image_fit.py
${CMAKE_SOURCE_DIR}/modules/em2d/test/medium_test_segmentation_routines.py)
  GET_FILENAME_COMPONENT(name ${test} NAME)
  add_test("IMP.em2d-${name}" ${IMP_TEST_SETUP} python ${test})
  set_tests_properties("IMP.em2d-${name}" PROPERTIES LABELS "IMP.em2d;test;length_medium")
  set_tests_properties("IMP.em2d-${name}" PROPERTIES TIMEOUT ${medium_timeout})
  set_tests_properties("IMP.em2d-${name}" PROPERTIES COST 2)
endforeach(test)

foreach (test )
  GET_FILENAME_COMPONENT(name ${test} NAME)
  add_test("IMP.em2d-${name}" ${IMP_TEST_SETUP} python ${test})
  set_tests_properties("IMP.em2d-${name}" PROPERTIES LABELS "IMP.em2d;test;length_expensive")
  set_tests_properties("IMP.em2d-${name}" PROPERTIES TIMEOUT ${expensive_timeout})
  set_tests_properties("IMP.em2d-${name}" PROPERTIES COST 3)
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.em2d-${name}" ${test})
   target_link_libraries("IMP.em2d-${name}"     IMP.em2d-lib
    ${IMP_base_LIBRARY};${IMP_cgal_LIBRARY};${IMP_algebra_LIBRARY};${IMP_kernel_LIBRARY};${IMP_display_LIBRARY};${IMP_gsl_LIBRARY};${IMP_score_functor_LIBRARY};${IMP_statistics_LIBRARY};${IMP_core_LIBRARY};${IMP_container_LIBRARY};${IMP_atom_LIBRARY};${IMP_em_LIBRARY};${IMP_rmf_LIBRARY};${IMP_domino_LIBRARY}
    ${FFTW3_LIBRARIES};${BOOST.PROGRAMOPTIONS_LIBRARIES};${BOOST.FILESYSTEM_LIBRARIES};${OPENCV21_LIBRARIES};${OPENCV22_LIBRARIES};${BOOST.SYSTEM_LIBRARIES};${GPERFTOOLS_LIBRARIES};${TCMALLOC_HEAPPROFILER_LIBRARIES};${TCMALLOC_HEAPCHECKER_LIBRARIES};${BOOST.RANDOM_LIBRARIES};${CGAL_LIBRARIES};${ANN_LIBRARIES};${GSL_LIBRARIES};${BOOST.REGEX_LIBRARIES};${RMF_LIBRARIES};${BOOST.GRAPH_LIBRARIES};${HDF5_LIBRARIES})
   set_target_properties("IMP.em2d-${name}" PROPERTIES
                         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/test/em2d/"
                         OUTPUT_NAME ${name_we})
   set_property(TARGET "IMP.em2d-${name}" PROPERTY FOLDER "IMP.em2d")

   add_test("IMP.em2d-${name}" ${IMP_TEST_SETUP}
            "${CMAKE_BINARY_DIR}/test/em2d/${name_we}${CMAKE_EXECUTABLE_SUFFIX}")
   set_tests_properties("IMP.em2d-${name}" PROPERTIES LABELS "IMP.em2d;test;length_short")
   set_tests_properties("IMP.em2d-${name}" PROPERTIES TIMEOUT ${short_timeout})
   set_tests_properties("IMP.em2d-${name}" PROPERTIES COST 1)
   set(executables ${executables} "IMP.em2d-${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.em2d-${name}" ${test})
   target_link_libraries("IMP.em2d-${name}"     IMP.em2d-lib
    ${IMP_base_LIBRARY};${IMP_cgal_LIBRARY};${IMP_algebra_LIBRARY};${IMP_kernel_LIBRARY};${IMP_display_LIBRARY};${IMP_gsl_LIBRARY};${IMP_score_functor_LIBRARY};${IMP_statistics_LIBRARY};${IMP_core_LIBRARY};${IMP_container_LIBRARY};${IMP_atom_LIBRARY};${IMP_em_LIBRARY};${IMP_rmf_LIBRARY};${IMP_domino_LIBRARY}
    ${FFTW3_LIBRARIES};${BOOST.PROGRAMOPTIONS_LIBRARIES};${BOOST.FILESYSTEM_LIBRARIES};${OPENCV21_LIBRARIES};${OPENCV22_LIBRARIES};${BOOST.SYSTEM_LIBRARIES};${GPERFTOOLS_LIBRARIES};${TCMALLOC_HEAPPROFILER_LIBRARIES};${TCMALLOC_HEAPCHECKER_LIBRARIES};${BOOST.RANDOM_LIBRARIES};${CGAL_LIBRARIES};${ANN_LIBRARIES};${GSL_LIBRARIES};${BOOST.REGEX_LIBRARIES};${RMF_LIBRARIES};${BOOST.GRAPH_LIBRARIES};${HDF5_LIBRARIES})
   set_target_properties("IMP.em2d-${name}" PROPERTIES
                         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/test/em2d/"
                         OUTPUT_NAME ${name_we})
   set_property(TARGET "IMP.em2d-${name}" PROPERTY FOLDER "IMP.em2d")

   add_test("IMP.em2d-${name}" ${IMP_TEST_SETUP}
            "${CMAKE_BINARY_DIR}/test/em2d/${name_we}${CMAKE_EXECUTABLE_SUFFIX}")
   set_tests_properties("IMP.em2d-${name}" PROPERTIES LABELS "IMP.em2d;test;length_medium")
   set_tests_properties("IMP.em2d-${name}" PROPERTIES TIMEOUT ${medium_timeout})
   set_tests_properties("IMP.em2d-${name}" PROPERTIES COST 1)
   set(executables ${executables} "IMP.em2d-${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.em2d-${name}" ${test})
   target_link_libraries("IMP.em2d-${name}"     IMP.em2d-lib
    ${IMP_base_LIBRARY};${IMP_cgal_LIBRARY};${IMP_algebra_LIBRARY};${IMP_kernel_LIBRARY};${IMP_display_LIBRARY};${IMP_gsl_LIBRARY};${IMP_score_functor_LIBRARY};${IMP_statistics_LIBRARY};${IMP_core_LIBRARY};${IMP_container_LIBRARY};${IMP_atom_LIBRARY};${IMP_em_LIBRARY};${IMP_rmf_LIBRARY};${IMP_domino_LIBRARY}
    ${FFTW3_LIBRARIES};${BOOST.PROGRAMOPTIONS_LIBRARIES};${BOOST.FILESYSTEM_LIBRARIES};${OPENCV21_LIBRARIES};${OPENCV22_LIBRARIES};${BOOST.SYSTEM_LIBRARIES};${GPERFTOOLS_LIBRARIES};${TCMALLOC_HEAPPROFILER_LIBRARIES};${TCMALLOC_HEAPCHECKER_LIBRARIES};${BOOST.RANDOM_LIBRARIES};${CGAL_LIBRARIES};${ANN_LIBRARIES};${GSL_LIBRARIES};${BOOST.REGEX_LIBRARIES};${RMF_LIBRARIES};${BOOST.GRAPH_LIBRARIES};${HDF5_LIBRARIES})
   set_target_properties("IMP.em2d-${name}" PROPERTIES
                         RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/test/em2d/"
                         OUTPUT_NAME ${name_we})
   set_property(TARGET "IMP.em2d-${name}" PROPERTY FOLDER "IMP.em2d")

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

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