using a target with try_run

Alexander Neundorf neundorf at kde.org
Wed Mar 11 20:39:26 CET 2009


On Wednesday 11 March 2009, Ian Monroe wrote:
> Seems to be impossible to use try_run in any sort of portable way
> since you can't use target_link_libraries and include_directories with
> it. Right now I have it rigged up, but I actually give it direct GCC
> commands.
>
> So is it possible to use a target with try_run? Or is try_run pretty
> much just useless?

TRY_RUN() and TRY_COMPILE() are relatively low-level, "normal" users shouldn't 
use them. 
There are cmake modules like CheckCSourceRuns.cmake which wrap it, they are 
intended for "end users".
Is there something you want to do what you can't do with check_c_source_runs() 
or check_cxx_source_runs() ?

Alex


More information about the Kde-buildsystem mailing list