From f637d35677e6b300cd0e30f8e272e1a6173b8895 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 1 Jul 2019 14:34:11 +0200 Subject: Code review: As CHOMP is no more delivered, a clear error message shall be displayed when not installed. --- src/GudhUI/model/Model.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/GudhUI/model/Model.h b/src/GudhUI/model/Model.h index b17a5c8f..48ba9622 100644 --- a/src/GudhUI/model/Model.h +++ b/src/GudhUI/model/Model.h @@ -307,9 +307,15 @@ class Model { private: void run_chomp() { save_complex_in_file_for_chomp(); + std::cout << "POUET" << std::endl; std::cout << "Call CHOMP library\n"; - int returnValue = system("utils/homsimpl chomp.sim"); - std::cout << "CHOMP returns" << returnValue << std::endl; + int returnValue = system("which homsimpl"); + if (returnValue != 0) { + std::cout << "CHOMP must be installed and available in PATH for this functionnality." << std::endl; + return; + } + returnValue = system("homsimpl chomp.sim"); + std::cout << "CHOMP returns " << returnValue << std::endl; } void save_complex_in_file_for_chomp() { -- cgit v1.2.3