[CMake] Distinguishing processor type for -march -mtune arguments
Eric Noulard
eric.noulard at gmail.com
Mon May 14 18:31:49 EDT 2007
2007/5/14, James Bigler <bigler at cs.utah.edu>:
> Is there a way to distinguish processor type more than what
> CMAKE_SYSTEM_PROCESSOR tells me?
>
> Currently I can't tell the difference between a pentium M and pentium 4
> (both read i686) and various 64 bit architectures such as opteron versus
> pentium (both read x86_64).
In a OS independent way I don't know but if you target
Linux may be you can parse /proc/cpuinfo.
As an example and if you have a linux box try
cmake -P linux-precise-arch.cmake
you then have to compare
VENDOR_ID, CPU_FAMILY and MODEL in order to identify
your exact arch.
>
> I'm looking for a way to automate the -mtune argument to gcc on various
> systems.
>
> Thanks,
> James
--
Erk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-precise-arch.cmake
Type: application/octet-stream
Size: 711 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20070515/360514ae/linux-precise-arch.obj
More information about the CMake
mailing list