LLVM/clang can display warnings even for functions that are not used,
during the parsing of the code, before the compilation, when it can.
For example:
[...]/include/CGAL/Arr_tags.h:93:7: warning: unused variable 'missing__Left_side_category__assuming__Arr_oblivious_side_tag__instead' [-Wunused-variable]
missing__Left_side_category__assuming__Arr_oblivious_side_tag__instead;
^
[...]/include/CGAL/Arr_tags.h:138:7: warning: unused variable 'missing__Bottom_side_category__assuming__Arr_oblivious_side_tag__instead' [-Wunused-variable]
missing__Bottom_side_category__assuming__Arr_oblivious_side_tag__instead;
^
[...]/include/CGAL/Arr_tags.h:181:10: warning: unused variable 'missing__Top_side_category__assuming__Arr_oblivious_side_tag__instead' [-Wunused-variable]
bool missing__Top_side_category__assuming__Arr_oblivious_side_tag__instead;
^
[...]/include/CGAL/Arr_tags.h:226:7: warning: unused variable 'missing__Right_side_category__assuming__Arr_oblivious_side_tag__instead' [-Wunused-variable]
missing__Right_side_category__assuming__Arr_oblivious_side_tag__instead;
^
4 warnings generated.
With this commit, the functions 'missing__*_side_category()' are now
function *templates*. The compiler can not longer warn about the unused
variable. However, I have verified that it does warn if the function is
actually instanciated and used.
1/ Check the version using 'find_package_handle_standard_args' internal
checking of version, instead of a home-made check.
2/ No need to add EIGEN3_INCLUDE_DIR in the cache, as find_path does it.
3/ Call 'find_package_handle_standard_args' even if EIGEN3_INCLUDE_DIR is
already and valid in the cache.