Mercurial > louis > kiibohd-controller
diff Lib/CMake/arm.cmake @ 428:b5746c43904e
Fixing clang compilation and supporting clang-tidy
- clang.c includes necessary functions to make clang compiler work (tested on teensy 3.1)
- Added support code to generate a compile_commands.json for clang-tidy
* Updates the symlink whenever cmake or make is called (Unix OSs only)
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Fri, 04 Mar 2016 00:23:48 -0800 |
parents | 772f9bea482b |
children |
line wrap: on
line diff
--- a/Lib/CMake/arm.cmake Thu Mar 03 20:40:01 2016 -0800 +++ b/Lib/CMake/arm.cmake Fri Mar 04 00:23:48 2016 -0800 @@ -1,6 +1,6 @@ ###| CMAKE Kiibohd Controller |### # -# Jacob Alexander 2011-2014 +# Jacob Alexander 2011-2016 # Due to this file's usefulness: # # Released into the Public Domain @@ -111,6 +111,13 @@ Lib/delay.c ) +#| Clang needs a few more functions for linking +if ( "${COMPILER}" MATCHES "clang" ) + set( COMPILER_SRCS ${COMPILER_SRCS} + Lib/clang.c + ) +endif () + message( STATUS "Compiler Source Files:" ) message( "${COMPILER_SRCS}" )