From: mquinson Date: Thu, 9 Dec 2010 13:08:23 +0000 (+0000) Subject: some preprocessor macros to detect which flavor of assembly we want today X-Git-Tag: v3.6_beta2~818 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/65e077cde16d751af87c71060b37cb1c23025119?hp=8991ed0684cc383d92a815959d85e2d05995d9d2 some preprocessor macros to detect which flavor of assembly we want today git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9105 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c178109f4..5dd64660a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,11 @@ endif(WIN32) include_directories(${INCLUDES}) + +### Determine the assembly flavor that we need today +include(CMakeDetermineSystem) +set(PROCESSOR_${CMAKE_SYSTEM_PROCESSOR} 1) + ### Setup Options include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Option.cmake) diff --git a/buildtools/Cmake/gras_config.h.in b/buildtools/Cmake/gras_config.h.in index 650ca0ad09..9078297e59 100644 --- a/buildtools/Cmake/gras_config.h.in +++ b/buildtools/Cmake/gras_config.h.in @@ -86,6 +86,11 @@ /* Predefined possible va_copy() implementation (id: GCM) */ #cmakedefine __VA_COPY_USE_GCM(d, s) @__VA_COPY_USE_GCM@ +/* Used to select the flavor of assembly that we need today */ +#cmakedefine PROCESSOR_i686 @PROCESSOR_i686@ +#cmakedefine PROCESSOR_x86_64 @PROCESSOR_x86_64@ +#cmakedefine CMAKE_SYSTEM_PROCESSOR @CMAKE_SYSTEM_PROCESSOR@ + /* Defined if arrays in struct can straddle struct alignment boundaries. This is like than the structure compaction above, but this time, the argument to be compacted is an array whom each element would be normally compacted.