Skip to content

Commit

Permalink
Merge pull request #87 from Illumina/update-external-github-repo
Browse files Browse the repository at this point in the history
Improve regression testing, fixed source version and updated build script
  • Loading branch information
ezralanglois authored Sep 28, 2016
2 parents fe3f798 + 488f529 commit 7b3926c
Show file tree
Hide file tree
Showing 229 changed files with 2,222 additions and 2,053 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ packages.config
interop/version.h
.idea
src/ext/csharp/src
.CMakeLists.txt.bak

# Mac OSX Stuff
.DS_Store
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ branches:
notifications:
email: false
before_deploy:
- tar czf interop-${BUILD_NAME}.tar.gz ${BUILD_PATH}
- cd `dirname ${BUILD_PATH}`
- tar czf interop-${BUILD_NAME}.tar.gz ${BUILD_NAME}
deploy:
skip_cleanup: true
provider: releases
Expand Down
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
enable_testing()
include(${PROJECT_SOURCE_DIR}/cmake/Modules/UseGitVersion.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/InternalUtils.cmake)
set(ARCHIVE_VERSION "v1.0.11-14-g824273c")

if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()

interop_config_compiler_and_linker()
# TODO: https://help.github.com/articles/creating-project-pages-manually/
Expand All @@ -17,16 +23,16 @@ set(INTEROP_DL_LIB interop_fpic_lib)
option(ENABLE_BACKWARDS_COMPATIBILITY "Compile code for c++98" ON)
option(ENABLE_DOCS "Build documentation with Doxygen" ON)
option(ENABLE_SWIG "Build third-party language bindings, e.g. C#" ON)
option(ENABLE_CSHARP "Build C# language bindings" ON)
option(ENABLE_TEST "Build unit tests (depends on Boost)" ON)
option(ENABLE_APPS "Build command line programs" ON)
option(ENABLE_EXAMPLES "Build example programs" ON)
option(ENABLE_STATIC "Build static libraries instead of dynamic" ON)
option(FORCE_X86 "Force 32-bit libraries instead of platform default (Does nothing for Visual Studio)" OFF)
option(FORCE_SHARED_CRT "Used the shared (DLL) run time lib" ON)
option(ENABLE_CSHARP "Build C# language bindings" ON)

include_directories(.)
add_version_target(version ${CMAKE_SOURCE_DIR}/interop/version.h INTEROP_VERSION)
add_version_target(version ${CMAKE_SOURCE_DIR}/interop/version.h INTEROP_VERSION ${ARCHIVE_VERSION})

if(INTEROP_VERSION)
string(REGEX REPLACE "[^v]*(v.*)" "\\1" VERSION ${INTEROP_VERSION})
Expand All @@ -50,18 +56,12 @@ if(INTEROP_VERSION)
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "interop_${VERSION_SHORT}")
set(CPACK_OUTPUT_FILE_PREFIX "interop/${VERSION_SHORT}")
set(CPACK_OUTPUT_FILE_PREFIX "interop/${VERSION}")
endif()

#Adds the target "package"
include(CPack)

if(ENABLE_BACKWARDS_COMPATIBILITY)
message(STATUS "Using C++11: No")
else()
message(STATUS "Using C++11: Yes")
endif()

if(ENABLE_STATIC)
set(LIBRARY_TYPE STATIC)
else()
Expand All @@ -81,9 +81,9 @@ install(FILES README.md docs/src/changes.md DESTINATION .)

find_package(Git)
if(GIT_FOUND)
string(REGEX REPLACE "[^v]*(v[0-9]+.[0-9]+.[0-9])-.*" "\\1" TAG ${INTEROP_VERSION})
string(REGEX REPLACE "[^v]*(v[0-9]+.[0-9]+.[0-9]+)-.*" "\\1" TAG ${INTEROP_VERSION})
add_custom_target(history
COMMAND ${GIT_EXECUTABLE};log;${TAG}..HEAD;-m;--first-parent;--date=short;--format='%ad | %b'
COMMAND ${GIT_EXECUTABLE};--no-pager;log;${TAG}..HEAD;--date=short;--format='%ad | %B'
COMMENT "List all commits from last tag - ${TAG}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
47 changes: 36 additions & 11 deletions cmake/InternalUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ macro(interop_config_compiler_and_linker)
set(CXX11_FLAG_ "-std=c++11")
endif()

check_cxx_compiler_flag("-std=c89" COMPILER_SUPPORTS_ANSI)
set(ANSI_FLAG "-std=c++98")
check_cxx_compiler_flag("${ANSI_FLAG}" COMPILER_SUPPORTS_ANSI) #-ansi (does not work on CLang 3.4)
check_cxx_compiler_flag("${CXX11_FLAG_}" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
set(CXX_CX11_FLAG "${CXX11_FLAG_}")
Expand All @@ -104,36 +105,60 @@ macro(interop_config_compiler_and_linker)
message(FATAL_ERROR "Unsupported compiler")
endif()
endif()
if(COMPILER_IS_GNUCC_OR_CLANG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wno-c++0x-compat -Wno-error=c++0x-compat -Wextra")
if(WIN32 AND MINGW)
# Add big object support to Windows Compilers
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj")

set(ENABLE_BIG_OBJ_FLAG "")
if(MSVC)
set(ENABLE_BIG_OBJ_FLAG "/bigobj")
elseif(MINGW)
set(ENABLE_BIG_OBJ_FLAG "-Wa,-mbig-obj")
endif()

set(flags_to_check "-Wno-eof-newline;-Wno-maybe-uninitialized;-Wno-strict-aliasing;-Wno-unused-function;-Wno-unused-parameter;-Wno-unnamed-type-template-args;-Wno-c++0x-compat;-Wno-error=c++0x-compat")
foreach(flag ${flags_to_check})
string(TOUPPER ${flag} FLAG_NAME)
string(REPLACE "-" "_" FLAG_NAME ${FLAG_NAME})
string(REPLACE "=" "_EQ_" FLAG_NAME ${FLAG_NAME})
string(REPLACE "C++" "CPP" FLAG_NAME ${FLAG_NAME})
set(${FLAG_NAME} ${flag})
check_cxx_compiler_flag(${flag} IS_${FLAG_NAME}_SUPPORTED)
if(NOT IS_${FLAG_NAME}_SUPPORTED)
set(${FLAG_NAME} "")
endif()
endforeach()

if(COMPILER_IS_GNUCC_OR_CLANG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror ${_WNO_CPP0X_COMPAT} ${_WNO_ERROR_EQ_CPP0X_COMPAT} ${_WNO_EOF_NEWLINE}")
elseif(MSVC)
# Visual Studio Complains about not being able to create an assignment operator and copy constructor
# -wd4511 and -wd4512 disable these pointless warnings
# Add big object support to Windows Compilers
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX -wd4511 -wd4512 /bigobj")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX -wd4511 -wd4512")
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wno-c++0x-compat -Wno-error=c++0x-compat -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror ${_WNO_CPP0X_COMPAT} ${_WNO_ERROR_EQ_CPP0X_COMPAT}")
endif()
endif()
if(NOT ENABLE_BACKWARDS_COMPATIBILITY)
if(COMPILER_IS_GNUCC_OR_CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_CX11_FLAG}")
message(STATUS "Using C++11: Yes")
elseif(MSVC)
message(STATUS "Using C++11: Yes")
else()
message(STATUS "Using C++11: Compiler default")
endif()
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedef -Wno-unnamed-type-template-args")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_CX11_FLAG}")
message(STATUS "Using C++11: Yes")
elseif(MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_CX11_FLAG}")
message(WARNING "ENABLE_BACKWARDS_COMPATIBILITY=ON does not work with MinGW, ignoring")
message(STATUS "Using C++11: Yes")
elseif(COMPILER_SUPPORTS_ANSI)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c89")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ANSI_FLAG}")
message(STATUS "Using C++11: No")
endif()
endmacro()

8 changes: 4 additions & 4 deletions cmake/Modules/UseCSharp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ endif( NOT CSHARP_COMPILER )
# Include type-based USE_FILE
if( CSHARP_TYPE MATCHES ".NET" )
include( ${DotNetFrameworkSdk_USE_FILE} )
set(CSHARP_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
elseif ( CSHARP_TYPE MATCHES "Mono" )
include( ${Mono_USE_FILE} )
set(CSHARP_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
endif ( CSHARP_TYPE MATCHES ".NET" )

macro( CSHARP_ADD_LIBRARY name )
Expand Down Expand Up @@ -91,16 +93,14 @@ macro( CSHARP_ADD_PROJECT type name )
# MESSAGE( SEND_ERROR "No C# sources were specified for ${type} ${name}" )
#endif ()
#list( SORT sources_dep )

set(CSHARP_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})

file(MAKE_DIRECTORY ${CSHARP_OUTPUT_DIR})
string (REPLACE ";" "," source_list "${sources}")
set(CSHARP_${name}_BINARY ${CSHARP_OUTPUT_DIR}/${name}.${output})
set(CSHARP_${name}_BINARY_NAME ${name}.${output})
# Add custom target and command
MESSAGE( STATUS "Adding C# ${type} ${name}: '${CSHARP_COMPILER} /t:${type} /out:${name}.${output} /platform:${CSHARP_PLATFORM} ${CSHARP_SDK} ${refs} ${sources}'" )
add_custom_command(
COMMENT "Compiling C# ${type} ${name}: '${CSHARP_COMPILER} /unsafe /t:${type} /out:${CMAKE_CURRENT_BINARY_DIR}/${name}.${output} /platform:${CSHARP_PLATFORM} ${CSHARP_SDK} ${refs} ${sources}'"
COMMENT "Compiling C# ${type} ${name}: '${CSHARP_COMPILER} /unsafe /t:${type} /out:${CSHARP_OUTPUT_DIR}/${name}.${output} /platform:${CSHARP_PLATFORM} ${CSHARP_SDK} ${refs} ${sources}'"
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}.${output}
COMMAND ${CMAKE_COMMAND} -DFILES_TO_COPY="${source_list}" -DDESTINATION_DIR="${CMAKE_CURRENT_BINARY_DIR}" -P "${CMAKE_SOURCE_DIR}/cmake/CopyListOfFiles.cmake"
COMMAND ${CSHARP_COMPILER}
Expand Down
15 changes: 9 additions & 6 deletions cmake/Modules/UseGitVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# - _macro_name - name of the macro in the header file
#

function(add_version_target _target _version_file _macro_name)
function(add_version_target _target _version_file _macro_name _default)
if(NOT GIT_FOUND)
find_package(Git REQUIRED)
endif()
Expand All @@ -25,15 +25,18 @@ function(add_version_target _target _version_file _macro_name)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT res EQUAL 0)
set(VERSION \"Unknown\")
set(VERSION \"\${BKUP}\")
endif()
configure_file(\${SRC} \${DST} @ONLY)
"
)
add_custom_command(OUTPUT ${_version_file}
COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_BINARY_DIR}/${version_base}.in
-D DST=${_version_file}
-D BKUP=${_default}
-P ${CMAKE_BINARY_DIR}/version.cmake)
add_custom_target(${_target}
${CMAKE_COMMAND} -D SRC=${CMAKE_BINARY_DIR}/${version_base}.in
-D DST=${_version_file}
-P ${CMAKE_BINARY_DIR}/version.cmake
DEPENDS ${_version_file}
)
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --tags --dirty=-dirty
Expand All @@ -45,7 +48,7 @@ function(add_version_target _target _version_file _macro_name)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT res EQUAL 0)
set(VERSION \"Unknown\")
set(VERSION "${_default}")
endif()
set(${_macro_name} ${VERSION} PARENT_SCOPE)
endfunction()
30 changes: 30 additions & 0 deletions cmake/package.nuspec.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>illumina_interop_@CSHARP_TYPE@_@PLATFORM@</id>
<version>@INTEROP_VERSION@</version>
<title>Illumina InterOp Library for @CSHARP_TYPE@ on @PLATFORM@</title>
<authors>Illumina Inc.</authors>
<owners>Illumina Inc.</owners>
<licenseUrl>https://github.com/Illumina/interop/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/Illumina/interop</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<developmentDependency>false</developmentDependency>
<description>
The Illumina InterOp libraries are a set of common routines used for reading InterOp metric files
produced by Illumina sequencers. These libraries are backwards compatible and capable of supporting prior
releases of the software, with one exception: GA systems have been excluded.
</description>
<summary>
High-level C++ binding for Illumina C++ InterOp Library, packaged for
@CSHARP_TYPE@ @CSHARP_VERSION@ on @PLATFORM@
</summary>
<releaseNotes>https://github.com/Illumina/interop/blob/master/README.md</releaseNotes>
<copyright>GNU GPL v3</copyright>
<tags>native, Illumina, InterOp, C++, C#, @PLATFORM@, @CSHARP_TYPE@ </tags>
</metadata>
<files>
@NUGET_FILE_LIST@
</files>
</package>

9 changes: 9 additions & 0 deletions cmake/package.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<NativeLibs Include="$(MSBuildThisFileDirectory)**\*.dll" />
<None Include="@(NativeLibs)">
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
14 changes: 7 additions & 7 deletions docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ STRIP_FROM_PATH =
# header file to include in order to use a class. If left blank only the name of
# the header file containing the class definition is used. Otherwise one should
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
# using the -I test_modifier.

STRIP_FROM_INC_PATH =

Expand Down Expand Up @@ -444,15 +444,15 @@ EXTRACT_STATIC = NO

EXTRACT_LOCAL_CLASSES = YES

# This flag is only useful for Objective-C code. If set to YES, local methods,
# This test_modifier is only useful for Objective-C code. If set to YES, local methods,
# which are defined in the implementation section but not in the interface are
# included in the documentation. If set to NO, only methods in the interface are
# included.
# The default value is: NO.

EXTRACT_LOCAL_METHODS = NO

# If this flag is set to YES, the members of anonymous namespaces will be
# If this test_modifier is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
# 'anonymous_namespace{file}', where file will be replaced with the base name of
# the file that contains the anonymous namespace. By default anonymous namespace
Expand Down Expand Up @@ -720,7 +720,7 @@ WARNINGS = YES
#WARN_AS_ERROR = YES

# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this test_modifier
# will automatically be disabled.
# The default value is: YES.

Expand Down Expand Up @@ -1269,7 +1269,7 @@ CHM_FILE =

HHC_LOCATION =

# The GENERATE_CHI flag controls if a separate .chi index file is generated
# The GENERATE_CHI test_modifier controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
Expand All @@ -1282,15 +1282,15 @@ GENERATE_CHI = NO

CHM_INDEX_ENCODING =

# The BINARY_TOC flag controls whether a binary table of contents is generated
# The BINARY_TOC test_modifier controls whether a binary table of contents is generated
# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
# enables the Previous and Next buttons.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.

BINARY_TOC = NO

# The TOC_EXPAND flag can be set to YES to add extra items for group members to
# The TOC_EXPAND test_modifier can be set to YES to add extra items for group members to
# the table of contents of the HTML help documentation and to the tree view.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
Expand Down
15 changes: 15 additions & 0 deletions docs/src/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changes {#changes}

## v1.0.12

Date | Description
---------- | -----------
2016-09-26 | IPA-5210: Create CSV parsable summary output
2016-09-23 | IPA-5194: Create nuspec package file
2016-09-17 | Refactor individual metric unit tests
2016-09-17 | Refactor metric stream tests
2016-09-14 | Reorganized code into own stat util file
2016-09-14 | Fixes error rate at a specific cycle when tiles are at different cycles
2016-09-14 | Add version information for zip archives
2016-09-14 | IPA-5070: Add optional flag to skip median for summary
2016-09-13 | Ensure ANSI build is being tested


## v1.0.11

Date | Description
Expand Down
13 changes: 13 additions & 0 deletions docs/src/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,16 @@ git log v1.0.0..HEAD --oneline --decorate --no-merges

In the above example, v1.0.0 was the last tag, you should replace this value with the actual last tag.

## Linking to our git hooks

Windows:

~~~~~~~~~{.bat}
mklink .git\hooks\pre-commit <abs-path>\tools\hooks\pre-commit.sh
~~~~~~~~~

Linux:

~~~~~~~~~{.sh}
ln -s tools/hooks/pre-commit.sh .git/hooks/pre-commit
~~~~~~~~~
2 changes: 1 addition & 1 deletion docs/src/example_sav_analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Each plot command has an additional set of options that allow the user
to choose a specific metric to plot or how to filter the data. For
example, the user can choose to only plot data from lane 1 by specifiying
the option `--filter-by-lane=1`. A full list of options for each program
can be obtained with the `--help` flag.
can be obtained with the `--help` test_modifier.

## SAV Analysis Tab

Expand Down
2 changes: 1 addition & 1 deletion docs/src/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ cmake --help
~~~~~~~~~~~~~

The default CMake generator for Windows is 32-bit. This can be changed by specifying the appropriate generator
using the `-G` flag:
using the `-G` test_modifier:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.sh}
cmake ../interop -G “Visual Studio 12 2013 Win64”
Expand Down
1 change: 1 addition & 0 deletions interop/constants/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,3 +343,4 @@ namespace illumina { namespace interop { namespace constants
#undef INTEROP_TUPLE3
#undef INTEROP_TUPLE4


Loading

0 comments on commit 7b3926c

Please sign in to comment.