diff options
author | Brad King <brad.king@kitware.com> | 2009-04-14 13:35:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-04-14 13:35:56 (GMT) |
commit | 19d11e2a1f483736f9f35990dd0db339a44ad146 (patch) | |
tree | b166227a82ba41bdb135f3007740fda5082fe375 /Source/kwsys/String.h.in | |
parent | 63a1e45076c83fadc16c24d1dd8d53987be12ce8 (diff) | |
download | CMake-19d11e2a1f483736f9f35990dd0db339a44ad146.zip CMake-19d11e2a1f483736f9f35990dd0db339a44ad146.tar.gz CMake-19d11e2a1f483736f9f35990dd0db339a44ad146.tar.bz2 |
ENH: Skip KWSys name maros in case of identity
All KWSys C symbol names begin with the KWSYS_NAMESPACE defined at
configuration time. For ease of editing we write canonical names with
the prefix 'kwsys' and use macros to map them to the configured prefix
at preprocessing time. In the case of standalone KWSys, the prefix is
'kwsys', so the macros were previously defined to their own names.
We now skip defining the macros in the identity case so that the final
symbol names are never themselves macros. This will allow the symbols
to be further transformed behind the scenes to help linkers in special
cases on some platforms.
Diffstat (limited to 'Source/kwsys/String.h.in')
-rw-r--r-- | Source/kwsys/String.h.in | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/kwsys/String.h.in b/Source/kwsys/String.h.in index f64c253..cc82a67 100644 --- a/Source/kwsys/String.h.in +++ b/Source/kwsys/String.h.in @@ -26,8 +26,10 @@ # define kwsys_ns(x) @KWSYS_NAMESPACE@##x # define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT #endif -#define kwsysString_strcasecmp kwsys_ns(String_strcasecmp) -#define kwsysString_strncasecmp kwsys_ns(String_strncasecmp) +#if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS +# define kwsysString_strcasecmp kwsys_ns(String_strcasecmp) +# define kwsysString_strncasecmp kwsys_ns(String_strncasecmp) +#endif #if defined(__cplusplus) extern "C" @@ -58,8 +60,10 @@ kwsysEXPORT int kwsysString_strncasecmp(const char* lhs, const char* rhs, #if !defined(KWSYS_NAMESPACE) # undef kwsys_ns # undef kwsysEXPORT -# undef kwsysString_strcasecmp -# undef kwsysString_strncasecmp +# if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS +# undef kwsysString_strcasecmp +# undef kwsysString_strncasecmp +# endif #endif #endif |