|
|
@ -63,16 +63,26 @@ endif() |
|
|
|
|
|
|
|
|
|
|
|
add_subdirectory(test) |
|
|
|
add_subdirectory(test) |
|
|
|
|
|
|
|
|
|
|
|
add_custom_target(format |
|
|
|
set(astyle_exe ${CMAKE_BINARY_DIR}/astyle/src/bin/astyle) |
|
|
|
COMMAND scripts/format.sh 1 |
|
|
|
add_custom_command(OUTPUT ${astyle_exe} |
|
|
|
|
|
|
|
COMMAND wget http://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz -O /tmp/astyle.tar.gz |
|
|
|
|
|
|
|
COMMAND tar -xvf /tmp/astyle.tar.gz |
|
|
|
|
|
|
|
COMMAND cd astyle/src && make -f ../build/gcc/Makefile |
|
|
|
|
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_custom_target(check_format |
|
|
|
|
|
|
|
COMMAND scripts/format.sh ${astyle_exe} 0 |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
|
|
|
|
DEPENDS ${astyle_exe} |
|
|
|
VERBATIM |
|
|
|
VERBATIM |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
add_custom_target(check_format |
|
|
|
add_custom_target(format |
|
|
|
COMMAND scripts/format.sh |
|
|
|
COMMAND scripts/format.sh ${astyle_exe} 1 |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
VERBATIM |
|
|
|
VERBATIM |
|
|
|
|
|
|
|
DEPENDS ${astyle_exe} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) |
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) |
|
|
|