more fixes in cmake
valgrind check: do not read potentially deleted variables
Merge pull request #83 from oroulet/master

valgrind check: do not read potentially deleted variables