This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Cmake help

Tags: None
(comma "," separated)
pfarina
Registered Member
Posts
1
Karma
0

Cmake help

Thu Oct 25, 2012 8:07 pm
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
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Cmake help

Mon Oct 29, 2012 9:31 am
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]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed, Sogou [Bot]