diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2019-07-01 14:34:11 +0200 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2019-07-01 14:34:11 +0200 |
commit | f637d35677e6b300cd0e30f8e272e1a6173b8895 (patch) | |
tree | b925909a13b2fab2bbcaf6afd3981175415aa098 | |
parent | c6f2f9aa404e8f8be0c4fc26b4b6f2a507745376 (diff) |
Code review: As CHOMP is no more delivered, a clear error message shall be displayed when not installed.
-rw-r--r-- | src/GudhUI/model/Model.h | 10 |
1 files changed, 8 insertions, 2 deletions
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() { |