|
|
@ -13,10 +13,13 @@ endif() |
|
|
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY |
|
|
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY |
|
|
|
STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Profile") |
|
|
|
STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Profile") |
|
|
|
|
|
|
|
|
|
|
|
option (SUPPORT_STDIOSTREAM |
|
|
|
option(SUPPORT_STDIOSTREAM |
|
|
|
"If enabled provides support for << operator (as used with |
|
|
|
"If enabled provides support for << operator (as used with |
|
|
|
std::cout)" OFF) |
|
|
|
std::cout)" OFF) |
|
|
|
if((SUPPORT_STDIOSTREAM)) |
|
|
|
option(TEST "Enable testing" OFF) |
|
|
|
|
|
|
|
option(FORMAT "Enable formatting" OFF) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(SUPPORT_STDIOSTREAM) |
|
|
|
add_definitions(-DSUPPORT_STDIOSTREAM) |
|
|
|
add_definitions(-DSUPPORT_STDIOSTREAM) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
@ -59,29 +62,34 @@ include_directories(${CMAKE_SOURCE_DIR}) |
|
|
|
|
|
|
|
|
|
|
|
file(GLOB_RECURSE COV_SRCS matrix/*.hpp matrix/*.cpp) |
|
|
|
file(GLOB_RECURSE COV_SRCS matrix/*.hpp matrix/*.cpp) |
|
|
|
|
|
|
|
|
|
|
|
add_subdirectory(test) |
|
|
|
if(TEST) |
|
|
|
|
|
|
|
enable_testing() |
|
|
|
|
|
|
|
add_subdirectory(test) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
set(astyle_exe ${CMAKE_BINARY_DIR}/astyle/src/bin/astyle) |
|
|
|
if(FORMAT) |
|
|
|
add_custom_command(OUTPUT ${astyle_exe} |
|
|
|
set(astyle_exe ${CMAKE_BINARY_DIR}/astyle/src/bin/astyle) |
|
|
|
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 |
|
|
|
add_custom_command(OUTPUT ${astyle_exe} |
|
|
|
COMMAND tar -xvf /tmp/astyle.tar.gz |
|
|
|
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 cd astyle/src && make -f ../build/gcc/Makefile |
|
|
|
COMMAND tar -xvf /tmp/astyle.tar.gz |
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
|
|
|
COMMAND cd astyle/src && make -f ../build/gcc/Makefile |
|
|
|
) |
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
add_custom_target(check_format |
|
|
|
add_custom_target(check_format |
|
|
|
COMMAND scripts/format.sh ${astyle_exe} 0 |
|
|
|
COMMAND scripts/format.sh ${astyle_exe} 0 |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
DEPENDS ${astyle_exe} |
|
|
|
DEPENDS ${astyle_exe} |
|
|
|
VERBATIM |
|
|
|
VERBATIM |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
add_custom_target(format |
|
|
|
add_custom_target(format |
|
|
|
COMMAND scripts/format.sh ${astyle_exe} 1 |
|
|
|
COMMAND scripts/format.sh ${astyle_exe} 1 |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
|
VERBATIM |
|
|
|
VERBATIM |
|
|
|
DEPENDS ${astyle_exe} |
|
|
|
DEPENDS ${astyle_exe} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) |
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) |
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) |
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) |
|
|
|