Skip to content

Commit

Permalink
Merge pull request #94 from Illumina/update-public2
Browse files Browse the repository at this point in the history
Improved regression testing and speed
  • Loading branch information
ezralanglois authored Dec 9, 2016
2 parents 306dcd6 + a54f6c8 commit 4364493
Show file tree
Hide file tree
Showing 216 changed files with 9,748 additions and 3,688 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include(${PROJECT_SOURCE_DIR}/cmake/Modules/UseGitVersion.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/InternalUtils.cmake)
set(ARCHIVE_VERSION "v1.0.13-src")


if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
Expand Down Expand Up @@ -34,6 +35,7 @@ option(ENABLE_CSHARP "Build C# language bindings" ON)
# Options to control integration builds
set(PACKAGE_SUFFIX "" CACHE STRING "Suffix added to the output packages")
set(BUILD_NUMBER "" CACHE STRING "Build number used for select packing scripts")
mark_as_advanced(PACKAGE_SUFFIX BUILD_NUMBER)

include_directories(.)
add_version_target(version ${CMAKE_SOURCE_DIR}/interop/version.h INTEROP_VERSION ${ARCHIVE_VERSION})
Expand Down Expand Up @@ -89,7 +91,7 @@ find_package(Git)
if(GIT_FOUND)
string(REGEX REPLACE "[^v]*(v[0-9]+.[0-9]+.[0-9]+)-.*" "\\1" TAG ${INTEROP_VERSION})
add_custom_target(history
COMMAND ${GIT_EXECUTABLE};--no-pager;log;${TAG}..HEAD;--date=short;--format='%ad | %B'
COMMAND ${GIT_EXECUTABLE};log;${TAG}..HEAD;-m;--first-parent;--date=short;--format='%ad | %b'
COMMENT "List all commits from last tag - ${TAG}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ There are several known limitations to the current library:
4. We do not support Mono on Windows
5. If both Visual Studio and Mono are installed, the build script will only use Visual Studio for C#
6. We do not support 32-bit builds
7. MinGW W64 4.9.x and prior will not link properly
8. Visual Studio 12 2013 is not supported for the C# Bindings (Results in heap corruption)

SAV Analysis Tab
----------------
Expand Down
9 changes: 9 additions & 0 deletions cmake/AssemblyInfo.cs.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.Reflection;

[assembly: AssemblyTitle("Illumina.InterOp")]
[assembly: AssemblyCompany("Illumina")]
[assembly: AssemblyProduct("Illumina.InterOp")]
[assembly: AssemblyCopyright("Copyright © Illumina 2015")]
[assembly: AssemblyVersion("@VERSION_SHORT@")]
[assembly: AssemblyFileVersion("@VERSION_SHORT@")]

17 changes: 12 additions & 5 deletions cmake/InternalUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ macro(interop_config_compiler_and_linker)
check_include_files("stdint.h" HAVE_STDINT_H)
if(HAVE_STDINT_H)
add_definitions(-DHAVE_STDINT_H)
else()
check_include_files("sys/types.h" HAVE_SYS_TYPES_H)
if(HAVE_SYS_TYPES_H)
add_definitions(-DHAVE_SYS_TYPES_H)
endif()
endif()
include(CheckStdInt)
include(CheckCXXCompilerFlag)
Expand Down Expand Up @@ -113,7 +118,8 @@ macro(interop_config_compiler_and_linker)
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")

set(flags_to_check "-Wno-non-template-friend;-Wno-eof-newline;-Wno-maybe-uninitialized;-Wno-strict-aliasing;-fno-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})
Expand All @@ -127,18 +133,19 @@ macro(interop_config_compiler_and_linker)
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}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror ${_WNO_CPP0X_COMPAT} ${_WNO_ERROR_EQ_CPP0X_COMPAT} ${_WNO_EOF_NEWLINE} ${_WNO_NON_TEMPLATE_FRIEND}")
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")
# -wd4127: conditional expression is constant
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX -wd4511 -wd4512 -wd4127")
# TODO: remove all C4127 in headers
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_CPP0X_COMPAT} ${_WNO_ERROR_EQ_CPP0X_COMPAT}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror ${_WNO_CPP0X_COMPAT} ${_WNO_ERROR_EQ_CPP0X_COMPAT} ${_WNO_NON_TEMPLATE_FRIEND}")
endif()
endif()
if(NOT ENABLE_BACKWARDS_COMPATIBILITY)
Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/CheckIsNaN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ CHECK_CXX_SOURCE_COMPILES(
"#include <cmath>\nint main() { bool a = std::isnan(0e0); return 0; }\n"
HAVE_STD_ISNAN)

if(HAVE_STD_ISNAN)
add_definitions(-DHAVE_STD_ISNAN)
if(NOT HAVE_STD_ISNAN)
add_definitions(-DHAVE_NO_STD_ISNAN)
return()
endif()

Expand Down
10 changes: 7 additions & 3 deletions cmake/Modules/FindCSharp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,19 @@ endif( )


if( CSHARP_DOTNET_FOUND )
if(CMAKE_SIZEOF_VOID_P EQUAL "4")
if(CMAKE_SIZEOF_VOID_P EQUAL "4" OR FORCE_X86)
set( CSHARP_PLATFORM "x86" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium" )
elseif( CMAKE_SIZEOF_VOID_P EQUAL "8" )
set( CSHARP_PLATFORM "x64" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium" )
else()
message(FATAL_ERROR "Only 32-bit and 64-bit are supported")
message(FATAL_ERROR "Only 32-bit and 64-bit are supported: ${CMAKE_SIZEOF_VOID_P}")
endif()
elseif( CSHARP_MONO_FOUND )
set( CSHARP_PLATFORM "anycpu" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium" )
if(CMAKE_SIZEOF_VOID_P EQUAL "4" OR FORCE_X86)
set( CSHARP_PLATFORM "x86" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium" )
else()
set( CSHARP_PLATFORM "anycpu" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium" )
endif()
endif()


Expand Down
5 changes: 4 additions & 1 deletion cmake/Modules/FindGMock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,17 @@ if(NOT GMOCK_INCLUDE_DIR OR NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY)
else()
set(gtest_force_shared_crt OFF)
endif()
if(FORCE_X86)
set(EXTRA_FLAGS " -m32")
endif()
set(GMOCK_PREFIX ${CMAKE_BINARY_DIR}/external/gtest)
include(ExternalProject)
ExternalProject_Add(
googlemock
PREFIX ${GMOCK_PREFIX}
GIT_REPOSITORY https://github.com/google/googlemock.git
GIT_TAG release-1.7.0
CMAKE_ARGS -DCMAKE_CXX_FLAGS=-DGMOCK_USE_OWN_TR1_TUPLE=${USE_OWN_TR1_TUPLE}
CMAKE_ARGS "-DCMAKE_CXX_FLAGS=-DGMOCK_USE_OWN_TR1_TUPLE=${USE_OWN_TR1_TUPLE}${EXTRA_FLAGS}"
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${GMOCK_PREFIX}/lib64
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG=${GMOCK_PREFIX}/lib64
Expand Down
6 changes: 5 additions & 1 deletion cmake/Modules/FindGTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,22 @@ if(NOT GTEST_INCLUDE_DIR OR NOT GTEST_LIBRARY OR NOT GTEST_MAIN_LIBRARY OR NOT G
set(USE_OWN_TR1_TUPLE 1)
endif()
if(FORCE_SHARED_CRT)
message(STATUS "Enable Shared CRT for GTest")
set(gtest_force_shared_crt ON)
else()
set(gtest_force_shared_crt OFF)
endif()
set(GTEST_PREFIX ${CMAKE_BINARY_DIR}/external/gtest)
if(FORCE_X86)
set(EXTRA_FLAGS " -m32")
endif()
include(ExternalProject)
ExternalProject_Add(
gtest
PREFIX ${GTEST_PREFIX}
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.7.0
CMAKE_ARGS -DCMAKE_CXX_FLAGS=-DGTEST_USE_OWN_TR1_TUPLE=${USE_OWN_TR1_TUPLE}
CMAKE_ARGS "-DCMAKE_CXX_FLAGS=-DGTEST_USE_OWN_TR1_TUPLE=${USE_OWN_TR1_TUPLE}${EXTRA_FLAGS}"
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${GTEST_PREFIX}/lib64
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG=${GTEST_PREFIX}/lib64
Expand Down
4 changes: 3 additions & 1 deletion cmake/package.nuspec.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
<tags>native, Illumina, InterOp, C++, C#, @PLATFORM@, @CSHARP_TYPE@ </tags>
</metadata>
<files>
@NUGET_FILE_LIST@
<file src="@CONFIG@/csharp_interop.dll" target="lib/net40" />
<file src="illumina_interop_@CSHARP_TYPE@_@[email protected]" target="build" />
<file src="@CONFIG@@SHARED_LIB_SEARCH@" target="build" />
</files>
</package>

4 changes: 2 additions & 2 deletions cmake/package.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<NativeLibs Include="$(MSBuildThisFileDirectory)**\*.dll" />
<NativeLibs Include="$(MSBuildThisFileDirectory)*.dll" />
<None Include="@(NativeLibs)">
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
<Link>%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
50 changes: 50 additions & 0 deletions cmake/version.rc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* Illumina InterOp Library
*
* Version information for MSVC DLLs
*/

#define VS_FF_DEBUG 0x1L
#define VS_VERSION_INFO 0x1L
#define VS_FFI_FILEFLAGSMASK 0x17L
#define VER_PRIVATEBUILD 0x0L
#define VER_PRERELEASE 0x0L
#define VOS__WINDOWS32 0x4L
#define VFT_DLL 0x2L
#define VFT2_UNKNOWN 0x0L

#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif


VS_VERSION_INFO VERSIONINFO
FILEVERSION @VERSION_LIST@,0
PRODUCTVERSION @VERSION_LIST@,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Illumina InterOp Library\0"
VALUE "ProductVersion", "@VERSION@\0"
VALUE "FileVersion", "@VERSION@\0"
VALUE "InternalName", "@LIB_NAME@\0"
VALUE "ProductName", "Illumina InterOp Library: @LIB_NAME@\0"
VALUE "CompanyName", "Illumina, Inc.\0"
VALUE "LegalCopyright", "Copyright (C) 2015-2016\0"
VALUE "Licence", "GPL v3\0"
VALUE "Info", "https://github.com/Illumina/interop\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

19 changes: 19 additions & 0 deletions docs/src/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changes {#changes}

## v1.0.14

Date | Description
---------- | -----------
2016-12-08 | Added admonition to avoid using MSVC 12 (2013) with C# bindings
2016-12-08 | Added support for absolute tile naming
2016-12-08 | Added ability to do section filtering
2016-12-05 | Added regression tests for imaging
2016-12-05 | Added unit tests for format coverage
2016-11-17 | Improved performance of InterOp calculations for C++11 enabled version
2016-11-14 | Added version to Windows DLLs
2016-11-14 | Added regression tests for indexing
2016-11-09 | Added unit tests for clearing logic
2016-11-07 | Added regression tests for analysis plots
2016-11-01 | Improved performance of InterOp loading
2016-10-26 | Added path class to handle RTA output filenames
2016-09-22 | Added regression tests for summary


## v1.0.13

Date | Description
Expand Down
9 changes: 9 additions & 0 deletions docs/src/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,12 @@ Linux:
~~~~~~~~~{.sh}
ln -s tools/hooks/pre-commit.sh .git/hooks/pre-commit
~~~~~~~~~

## Debugging Unit Tests

The unit tests use the Google Test Framework. The following flags may help with debugging:

- `--gtest_catch_exceptions=0`: Ensure GTest throws an exception
- `--gtest_break_on_failure`: Ensure GTest stopps on the first failure


2 changes: 2 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ There are several known limitations to the current library:
4. We do not support Mono on Windows
5. If both Visual Studio and Mono are installed, the build script will only use Visual Studio for C#
6. We do not support 32-bit builds
7. MinGW W64 4.9.x and prior will not link properly
8. Visual Studio 12 2013 is not supported for the C# Bindings (Results in heap corruption)

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 @@ -27,7 +27,7 @@ how to build the source. Carefully consider the prerequisites before trying to b
The following are the minimum requirements to build the source:

- C/C++ Compiler (C++98)
- Windows: [MinGW], [Cygwin], Microsoft Visual C++, [Express]
- Windows: [MinGW] 6.x or later, [Cygwin], Microsoft Visual C++, [Express]
- Linux: GCC, CLang
- Mac OSX: CLang
- [CMake] Version 3.2 or later
Expand Down
75 changes: 75 additions & 0 deletions interop/constants/enum_description.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/** Encapsulate an enum and a string description
*
* @file
* @date 12/5/16
* @version 1.0
* @copyright GNU Public License.
*/

#pragma once
#include <string>
#include <utility>
#include "interop/constants/enums.h"


namespace illumina { namespace interop { namespace constants
{
/** Encapsulates an enum and a string description
*/
template<typename Enum>
class enum_description
{
public:
/** Type of the enum */
typedef Enum enum_t;

public:
/** Constructor */
enum_description() : m_value(static_cast<Enum>(constants::Unknown)){}
/** Constructor
*
* @param val enum value
* @param description enum description
*/
enum_description(const enum_t val, const std::string& description) : m_value(val), m_description(description){}
/** Constructor
*
* @param pair enum value/description pair
*/
enum_description(const std::pair<metric_type, std::string >& pair) :
m_value(pair.first), m_description(pair.second){}

public:
/** Get the value of the enum
*
* @return enum value
*/
enum_t value()const
{
return m_value;
}
/** Get the description of the enum
*
* @return enum description
*/
const std::string& description()const
{
return m_description;
}
/** Implicit conversion operator
*
* @return enum value
*/
operator enum_t()const
{
return m_value;
}

private:
Enum m_value;
std::string m_description;
};
}}}



Loading

0 comments on commit 4364493

Please sign in to comment.