summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-07-01 14:34:11 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-07-01 14:34:11 +0200
commitf637d35677e6b300cd0e30f8e272e1a6173b8895 (patch)
treeb925909a13b2fab2bbcaf6afd3981175415aa098 /src
parentc6f2f9aa404e8f8be0c4fc26b4b6f2a507745376 (diff)
Code review: As CHOMP is no more delivered, a clear error message shall be displayed when not installed.
Diffstat (limited to 'src')
-rw-r--r--src/GudhUI/model/Model.h10
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() {