diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-04 06:02:25 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-04 06:02:25 +0000 |
commit | 763f84a6dace6af3d8637d12dd9cd2f6f69b46ab (patch) | |
tree | 75ac4ce391c59a62f23cbd02ffae54e3134376cc /sca-cpp/trunk/kernel/config.hpp | |
parent | ad5eccea058713a2816ca95f7f4392fe0ab03fb0 (diff) |
Build with Clang/LLVM when available.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1164964 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/kernel/config.hpp')
-rw-r--r-- | sca-cpp/trunk/kernel/config.hpp | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/sca-cpp/trunk/kernel/config.hpp b/sca-cpp/trunk/kernel/config.hpp index f700829fa5..5b447e116b 100644 --- a/sca-cpp/trunk/kernel/config.hpp +++ b/sca-cpp/trunk/kernel/config.hpp @@ -34,10 +34,36 @@ /** * Platform configuration and debug functions. */ - namespace tuscany { +/** + * Attribute used to mark unused parameters. + */ +#ifndef unused +#define unused __attribute__ ((unused)) +#endif + +/** + * Compiler feature detection. + */ +#ifdef __clang__ + +#if __has_feature(cxx_lambdas) +#define HAS_CXX0X_LAMBDAS 1 +#endif + +#else + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) +#define HAS_CXX0X_LAMBDAS 1 +#endif + +#endif + +/** + * Debug utilities. + */ #ifdef WANT_MAINTAINER_MODE /** @@ -46,7 +72,7 @@ namespace tuscany //#define WANT_MAINTAINER_WATCH /** - * Increment / decrement a debug counter. + * Increment/decrement a debug counter. */ bool debug_inc(long int& c) { c++; @@ -65,12 +91,5 @@ bool debug_dec(long int& c) { #endif -/** - * Attribute used to mark unused parameters. - */ -#ifndef unused -#define unused __attribute__ ((unused)) -#endif - } #endif /* tuscany_config_hpp */ |