Registered Member
|
Hi guys ,
I have a problem in my project. i'm using Cmake to build automatically each target I have inserted in CMakeList.txt (root) of my project. In my cmake I have created a target call show_valgrind that execute a suite of unittest that I have in my project and then execute valgrind on this unittest. I want to know if is possible set in add_custom_target(show_valgrind DEPENDS valgrind (exe , that I have found with FindModule of CMake) So I want that my " make show_valgrind" doesn't start if valgrind is not found in my envirnmente. Could you help me? If I want also check if some library that I use in some python classes is installed in my envirnment , how can I procede? thank you very much |
Administrator
|
Usually Find*.cmake scripts set many variables - and one should be VALGRIND_FOUND or similar. If this is present, you can just wrap this add_custom_target in a if() statement.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Google [Bot], lockheed, Sogou [Bot]