[cmake-developers] [PATCH] FindCUDA: Wrap keyword in if() string comparison

Adam Strzelecki ono at java.pl
Fri Sep 19 06:05:23 EDT 2014


> Since the policy may or may not be active (depending on the user's project) they might be using FindCUDA.cmake with CMP0054 set to NEW or OLD. To get identical (and warning free) behavior irregardless of the current policy setting Adam added the proposed ugliness.

Putting my 2¢, we can either/or:

(1) put everywhere these super ugly changes, which will make code (even more) obscure
(2) put cmake_policy(SET CMP0053 NEW) at the every internal .cmake file that has been reviewed for this policy and use normal (not ugly syntax)

Since include/find_package does implicit policy PUSH & POP for file scope this is IMHO much cleaner solution. Of course we would need to rollback couple of existing fixes committed by Brad.

WDYT?

--Adam


More information about the cmake-developers mailing list