[cmake-developers] Knowing if a C project is being built

Rolf Eike Beer eike at sf-mail.de
Wed Feb 22 11:48:43 EST 2012


Brad King wrote:
> On Wed, Feb 22, 2012 at 11:32 AM, Rolf Eike Beer <eike at sf-mail.de> wrote:
> >> Use CMAKE_<LANG>_COMPILER_LOADED to determine which
> >> languages are enabled.
> > 
> > In the last modification in FindOpenMP I used  the ENABLED_LANGUAGES
> > property. Which of both ways is the preferred one?
> 
> I have no preference.
> 
> Both are documented and should work.  If the goal is to loop over all the
> enabled languages use the property.  Otherwise the variable can be tested
> for a specific language.  Of course the property is read-only so projects
> cannot mess with it like they can by setting the variable ;)

Then I'll use the variables because it is less code ;)

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120222/1e744005/attachment.sig>


More information about the cmake-developers mailing list