-
-
Notifications
You must be signed in to change notification settings - Fork 117
/
CpackCtest.cmake
59 lines (52 loc) · 2.77 KB
/
CpackCtest.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#------------------------------------------------------------------------------
# CPack Configurations
#------------------------------------------------------------------------------
set(CPACK_PACKAGE_VERSION_MAJOR ${DGtal_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${DGtal_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${DGtal_VERSION_PATCH})
# for other generator set specific backend information
INCLUDE(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "DGtal Project")
set(CPACK_PACKAGE_VENDOR ".")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_CONTACT "contacts@dgtal.org" )
set(CPACK_NSIS_CONTACT "contacts@dgtal.org")
if(WIN32 AND NOT UNIX)
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} DGtal")
set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\dgtal.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\dgtal.org")
set(CPACK_NSIS_MODifY_PATH ON)
else()
##set(CPACK_STRIP_FILES "bin/main") ??
set(CPACK_SOURCE_STRIP_FILES "")
endif()
set(CPACK_SOURCE_IGNORE_FILES CVS;[.]svn;[.]git;[.]AppleDouble;[.]\#.*;\#.*;.*[.]kdev4;.*~;build.*;doc/html/*;doc/latex/*;doc/html-Board/*)
if(WIN32)
set(CPACK_GENERATOR "NSIS;")
else()
set(CPACK_GENERATOR "TGZ;DEB")
endif()
INCLUDE(CPack)
# -----------------------------------------------------------------------------
# CTest/Debug options
# -----------------------------------------------------------------------------
if (BUILD_TESTING)
message(STATUS "Build test files ENABLED")
ENABLE_TESTING()
include(CTest)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -Wall \
-Wno-unknown-pragmas -W -Wshadow -Wunused-variable \
-Wunused-parameter -Wunused-function -Wno-deprecated-copy -Werror=type-limits -Wno-nonnull -Wno-unneeded-internal-declaration -Wno-unused-function -Wno-delete-non-abstract-non-virtual-dtor -Wunused -Wno-long-long\
-Wno-system-headers -Wno-deprecated -Wno-dtor-name -Woverloaded-virtual -Wwrite-strings")
endif()
if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0 -Wall -W -Wno-delete-non-abstract-non-virtual-dtor -Wno-unknown-pragmas\
-Wno-long-long -pedantic")
endif()
add_subdirectory (${PROJECT_SOURCE_DIR}/tests)
else()
message(STATUS "Build test files DISABLED (you can activate unit tests with '-DBUILD_TESTING=ON' cmake option)")
endif()
message(STATUS "-------------------------------------------------------------------------------")