[CMake] Passing -B on linux

gga ggarra at advancedsl.com.ar
Thu Aug 2 12:15:33 EDT 2007


Juan Sanchez wrote:
> When I create a new cmake area, the tests are failing since it cannot
> find the 64bit version of our tools on linux.
> 

Assuming they are installed in /usr/local or /usr, one should expect
that to be automatic. That being said...

> Is there anyway to pass the -B option to C and C++ compiler during the
> compiler testing phase?
> 

Yes.  ADD_DEFINITIONS() can be used to pass any flag to both compiler
and linker.

For more granularity, you can use:
SET_SOURCE_FILES_PROPERTIES with the COMPILE_FLAGS property.
SET_TARGET_PROPERTIES with the LINK_FLAGS property.

Needless to say, a flag like -B will not be portable across compilers,
so you'll need to check for the compiler you are using.

-- 
Gonzalo Garramuño
ggarra at advancedsl.com.ar

AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy


More information about the CMake mailing list