The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=13023 ====================================================================== Reported By: Christopher Sean Morrison Assigned To: ====================================================================== Project: CMake Issue ID: 13023 Category: CMake Reproducibility: N/A Severity: feature Priority: normal Status: new ====================================================================== Date Submitted: 2012-03-07 01:32 EST Last Modified: 2012-03-07 01:32 EST ====================================================================== Summary: implementation of new CHECK_C_INLINE macro Description: I've implemented a CHECK_C_INLINE macro that detects what keyword, if any, is used for inlining C functions. The check is very similar to autoconf's AC_C_INLINE portability macro, testing various methods to find one that works. The macro takes a variable from the caller and utilizes caching so tests are only run when necessary.
Steps to Reproduce: # using the new macro looks like this: CHECK_C_INLINE(C_INLINE) if(NOT C_INLINE STREQUAL "inline") add_definitions("-Dinline=${C_INLINE}") endif(NOT C_INLINE STREQUAL "inline") That has the convenient behavior of renaming instances of "inline" to an alternate available keyword or to nothing/empty if none are supported. Additional Information: This is a work-in-progress, but I'll be happy to maintain the macro if need be. A quick search indicates such a macro would be of general use suitable for inclusion as a new built-in macro. Constructive feedback is always welcome, of course. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2012-03-07 01:32 Christopher Sean MorrisonNew Issue 2012-03-07 01:32 Christopher Sean MorrisonFile Added: CheckCInline.cmake ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers