[CMake] Figuring out dependencies for a library in order to build

Ken Martin ken.martin at kitware.com
Wed Jul 20 08:59:16 EDT 2005


> One additional issue that seems to be Visual Studio specific. Right
> after my TRY_COMPILE, I have lines like:
> 
> IF(${MY_OUTPUT} MATCHES "_MikMod_")
> 
> I keep getting errors from this with the Visual Studio generator. I
> get the error message:
> IF An IF command has incorrect arguments: ${MY_OUTPUT} MATCHES "_MikMod_"
> 

If ${MY_OUTPUT} expands to nothing then you will have an invalid IF
statement, to be safe quote the argument so that if it isn't set you will at
least have IF ("" MATCHES "_MikMod_") which is valid

Thanks
Ken



More information about the CMake mailing list