Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 0100a576 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

[CMake] Adding CERES and NLOPT tests

parent 484597b9
...@@ -177,7 +177,9 @@ target_link_libraries(rational_fitter_parallel quadprog) ...@@ -177,7 +177,9 @@ target_link_libraries(rational_fitter_parallel quadprog)
# TODO: Add check before compiling CERES, NLOPT and IPOPT # TODO: Add check before compiling CERES, NLOPT and IPOPT
alta_add_plugin(nonlinear_fitter_ceres nonlinear_fitter_ceres/fitter.cpp) alta_add_plugin(nonlinear_fitter_ceres nonlinear_fitter_ceres/fitter.cpp)
target_link_libraries(nonlinear_fitter_ceres ceres)
alta_add_plugin(nonlinear_fitter_nlopt nonlinear_fitter_nlopt/fitter.cpp) alta_add_plugin(nonlinear_fitter_nlopt nonlinear_fitter_nlopt/fitter.cpp)
target_link_libraries(nonlinear_fitter_nlopt nlopt)
#alta_add_plugin(nonlinear_fitter_ipopt nonlinear_fitter_ipopt/fitter.cpp) #alta_add_plugin(nonlinear_fitter_ipopt nonlinear_fitter_ipopt/fitter.cpp)
# Python bindings # Python bindings
...@@ -280,6 +282,19 @@ if(gold-metallic-paint_FOUND) ...@@ -280,6 +282,19 @@ if(gold-metallic-paint_FOUND)
"--out-data" "data_brdf_slice" "--out-data" "data_brdf_slice"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/tests") WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
foreach(fitter IN ITEMS eigen ceres nlopt)
add_test(NAME "data2dbrdf_gold_${fitter}"
COMMAND "data2brdf" "--input" "gold-metallic-paint.exr"
"--output" "gold-metallic-paint-${fitter}.func"
"--data" "data_brdf_slice"
"--fitter" "nonlinear_fitter_${fitter}"
"--func" "[nonlinear_function_diffuse, nonlinear_function_blinn]"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
set_tests_properties("data2dbrdf_gold_${fitter}"
PROPERTIES ENVIRONMENT "ALTA_PLUGIN_PATH=${CMAKE_BINARY_DIR}/plugins")
endforeach()
set_tests_properties("data2data_gold" "data2data_gold_slice" set_tests_properties("data2data_gold" "data2data_gold_slice"
PROPERTIES ENVIRONMENT "ALTA_PLUGIN_PATH=${CMAKE_BINARY_DIR}/plugins") PROPERTIES ENVIRONMENT "ALTA_PLUGIN_PATH=${CMAKE_BINARY_DIR}/plugins")
endif() endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment