add debug option to configure and fix travis

This commit is contained in:
Thomas Fussell 2015-11-20 23:34:39 -05:00
parent 72b6364f27
commit 5ba2aa995c
4 changed files with 29 additions and 11 deletions

16
.xlnt.supp Normal file
View File

@ -0,0 +1,16 @@
{
miniz_cond_jump_uninitialized
Memcheck:Cond
fun:tdefl_compress_normal
fun:tdefl_compress
fun:tdefl_compress_buffer
fun:mz_zip_writer_add_mem_ex
fun:mz_zip_writer_add_mem
fun:_ZN4xlnt8zip_file8writestrERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_
fun:_ZN4xlnt16excel_serializer10write_dataEb
fun:_ZN4xlnt16excel_serializer13save_workbookERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb
fun:_ZN4xlnt8workbook4saveERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
fun:_ZN10test_write25test_write_empty_workbookEv
fun:_ZN58TestDescription_suite_test_write_test_write_empty_workbook7runTestEv
fun:_ZN7CxxTest19RealTestDescription3runEv
}

View File

@ -6,12 +6,21 @@ endif()
project(xlnt)
option(SHARED "Set to ON to build shared libraries" OFF)
option(SHARED "Set to OFF to not build shared libraries" ON)
option(STATIC "Set to ON to build static libraries" OFF)
option(DEBUG "Set to ON to for debug configuration" OFF)
option(BUILD_EXAMPLES "Build examples" OFF)
option(BUILD_TESTS "Build tests runner" OFF)
option(AUTORUN_TESTS "Automatically run tests after building" OFF)
option(COVERAGE "Create coverage files" OFF)
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
if(DEBUG)
set(CMAKE_BUILD_TYPE "Debug")
else()
set(CMAKE_BUILD_TYPE "Release")
endif()
endif()
if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10)
endif(APPLE)

View File

@ -64,12 +64,3 @@ add_custom_target (generate-test-runner
)
add_dependencies(xlnt.test generate-test-runner)
if(AUTORUN_TESTS)
add_custom_command(
TARGET xlnt.test
POST_BUILD
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../bin/xlnt.test
VERBATIM
)
endif()

2
configure vendored
View File

@ -93,6 +93,8 @@ def parse_args(args):
options['BUILD_BENCHMARKS'] = 1
elif option.startswith('--prefix='):
options['CMAKE_INSTALL_PREFIX'] = option.split('=')[1]
elif option == '--debug':
options['DEBUG'] = 1
else:
print('skipping unknown option: {}'.format(option))