Add Travis CI support
This commit is contained in:
committed by
Chris Marsh
parent
c834a2e6d9
commit
95be02d4ce
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 3.7.0)
|
||||
cmake_minimum_required (VERSION 3.2.0)
|
||||
project (DiscordRPC)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
@ -12,12 +12,13 @@ file(GLOB_RECURSE ALL_SOURCE_FILES
|
||||
src/*.cpp src/*.h src/*.c
|
||||
)
|
||||
|
||||
find_program(CLANG_FORMAT_CMD clang-format)
|
||||
# Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0
|
||||
find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX})
|
||||
|
||||
if (CLANG_FORMAT_CMD)
|
||||
add_custom_target(
|
||||
clangformat
|
||||
COMMAND clang-format
|
||||
COMMAND ${CLANG_FORMAT_CMD}
|
||||
-i -style=file -fallback-style=none
|
||||
${ALL_SOURCE_FILES}
|
||||
DEPENDS
|
||||
|
Reference in New Issue
Block a user