Skip to content

Commit

Permalink
Fix bad lower-casing of C preprocessor macro <PARENT_PACKAGE_NAME_UC>…
Browse files Browse the repository at this point in the history
…_DEPRECATED_MSG (TriBITSPub#73)

This is the problem with the lower_case_cmake.py tool.  If there is non-CMake
code in these files, then they will get treated like CMake code and the
pattern '<identifier>(' will get lower-cased.
  • Loading branch information
bartlettroscoe committed Jun 17, 2021
1 parent 14dbf26 commit 8bad88b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tribits/core/package_arch/TribitsLibraryMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,18 @@ function(tribits_configure_file PACKAGE_NAME_CONFIG_FILE)
"\n"
"#ifndef ${PARENT_PACKAGE_NAME_UC}_DEPRECATED_MSG\n"
"# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))\n"
"# define ${PARENT_PACKAGE_NAME_UC}_deprecated_msg(MSG) __attribute__((__deprecated__ (#MSG) ))\n"
"# define ${PARENT_PACKAGE_NAME_UC}_DEPRECATED_MSG(MSG) __attribute__((__deprecated__ (#MSG) ))\n"
"# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))\n"
"# define ${PARENT_PACKAGE_NAME_UC}_deprecated_msg(MSG) __attribute__((__deprecated__))\n"
"# define ${PARENT_PACKAGE_NAME_UC}_DEPRECATED_MSG(MSG) __attribute__((__deprecated__))\n"
"# else\n"
"# define ${PARENT_PACKAGE_NAME_UC}_deprecated_msg(MSG)\n"
"# define ${PARENT_PACKAGE_NAME_UC}_DEPRECATED_MSG(MSG)\n"
"# endif\n"
"#endif\n"
)
else()
multiline_set(${PARENT_PACKAGE_NAME_UC}_DEPRECATED_DECLARATIONS
"#define ${PARENT_PACKAGE_NAME_UC}_DEPRECATED\n"
"#define ${PARENT_PACKAGE_NAME_UC}_deprecated_msg(MSG)\n"
"#define ${PARENT_PACKAGE_NAME_UC}_DEPRECATED_MSG(MSG)\n"
)
endif()

Expand Down

0 comments on commit 8bad88b

Please sign in to comment.