Skip to content

Commit

Permalink
added comments - related to #21
Browse files Browse the repository at this point in the history
  • Loading branch information
onqtam committed Sep 21, 2016
1 parent fb375ca commit 154d5a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions doctest/doctest.h
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ namespace detail

#ifdef _MSC_VER
#pragma warning(push)
// http://stackoverflow.com/questions/39479163 what's the difference between C4018 and C4389
#pragma warning(disable : 4389) // 'operator' : signed/unsigned mismatch
#pragma warning(disable : 4018) // 'expression' : signed/unsigned mismatch
//#pragma warning(disable : 4805) // 'operation' : unsafe mix of type 'type' and type 'type' in operation
Expand Down
1 change: 1 addition & 0 deletions doctest/parts/doctest_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ namespace detail

#ifdef _MSC_VER
#pragma warning(push)
// http://stackoverflow.com/questions/39479163 what's the difference between C4018 and C4389
#pragma warning(disable : 4389) // 'operator' : signed/unsigned mismatch
#pragma warning(disable : 4018) // 'expression' : signed/unsigned mismatch
//#pragma warning(disable : 4805) // 'operation' : unsafe mix of type 'type' and type 'type' in operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ function(doctest_include_file_in_sources header sources)
endfunction()

# this is the magic function - forces every object file from the library to be linked into the target (dll or executable)
# it doesn't work in 2 scenarios:
# - either the target or the library uses a precompiled header - see the end of this issue for details: https://github.com/onqtam/doctest/issues/21
# - either the target or the library is an imported target (pre-built) and not built within the current cmake tree
# - for an alternative you can checkout this repository: https://github.com/pthom/doctest_registerlibrary
function(doctest_force_link_static_lib_in_target target lib)
# check if the library has generated dummy headers
get_target_property(DDH ${lib} DOCTEST_DUMMY_HEADER)
Expand Down

0 comments on commit 154d5a1

Please sign in to comment.