Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
Merge 66c25a5 into 2c961d8
Browse files Browse the repository at this point in the history
  • Loading branch information
mfherbst committed Oct 7, 2017
2 parents 2c961d8 + 66c25a5 commit 8e2bdd1
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 17 deletions.
18 changes: 9 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ matrix:
- *def_packages
- libstdc++-4.9-dev
install:
- export EXTRA_OPTS="-DDRB_MAXIMUM_CXX_STANDARD=11"
- export GCOV="llvm-cov gcov"
- export EXTRA_OPTS="-DDRB_MAXIMUM_CXX_STANDARD=11"
- export GCOV="llvm-cov gcov"
compiler: clang
env: CC_COMP="clang" CXX_COMP="clang++"
#
Expand All @@ -74,13 +74,13 @@ matrix:
- *def_packages
- &clang_newest [ clang-4.0, libc++-dev, llvm-4.0, clang-tidy-4.0 ]
install:
- export GCOV="llvm-cov-4.0 gcov"
- export GCOV="llvm-cov-4.0 gcov"
compiler: clang
env: CC_COMP="clang-4.0" CXX_COMP="clang++-4.0"
#
# gcc-4.8 (c++11 and without tests, since rapidcheck does not compile like this)
- install:
- export TESTS=0 EXTRA_OPTS="-DKRIMS_ENABLE_TESTS=OFF"
- export TESTS=0 EXTRA_OPTS="-DKRIMS_ENABLE_TESTS=OFF"
compiler: gcc
env: CC_COMP="gcc" CXX_COMP="g++"
#
Expand All @@ -92,7 +92,7 @@ matrix:
- *def_packages
- g++-7
install:
- export GCOV="gcov-7"
- export GCOV="gcov-7"
compiler: gcc
env: CC_COMP="gcc-7" CXX_COMP="g++-7"
#
Expand All @@ -104,10 +104,10 @@ matrix:
- *def_packages
- *clang_newest
install:
# Install yaml for the python scripts generated by SetupClangTargets.cmake
- travis_retry pip3 install --user pyyaml
- export BUILD_TARGET="clang-tidy-krims"
- export TESTS=0
# Install yaml for the python scripts generated by SetupClangTargets.cmake
- travis_retry pip3 install --user pyyaml
- export BUILD_TARGET="clang-tidy-krims"
- export TESTS=0
compiler: clang
env: CC_COMP="clang-4.0" CXX_COMP="clang++-4.0" BUILD_TARGET="clang-tidy-krims"
allow_failures:
Expand Down
10 changes: 9 additions & 1 deletion cmake/IncludeKrimsCmakeModule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,17 @@ macro(include_krims_cmake_module MODULE)
set(FIRST_TRY_LOCATION "${krims_DIR}/../modules/${MODULE}.cmake")
endif()

if ("${krims_DIR}" STREQUAL "krims_DIR-AUTOCHECKOUT"
# Krims is already configured as a project somewhere ...
# use that location with highest priority and do not proceed to autocheckout,
# even if that is forced. The rationale is that otherwise autocheckout will be
# forced in each submodule ... which is not what we want.
if (NOT "${krims_SOURCE_DIR}" STREQUAL "")
set(FIRST_TRY_LOCATION "${krims_SOURCE_DIR}/cmake/modules/${MODULE}.cmake")
elseif("${krims_DIR}" STREQUAL "krims_DIR-AUTOCHECKOUT"
OR "$ENV{krims_DIR}" STREQUAL "krims_DIR-AUTOCHECKOUT"
OR AUTOCHECKOUT_FORCED)
# Do autocheckout if it is forced or otherwise wanted
# and if we have not configured krims elsewhere.
autocheckout_krims()

set(FIRST_TRY_LOCATION
Expand Down
6 changes: 5 additions & 1 deletion cmake/modules/SetupClangTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,18 @@ is not used to compile the project.")
set(YAML_MERGER "${FIXDIR}/merge_yaml_fixes.py")
SCT_dump_fixes_yaml_merger(${YAML_MERGER})

# Find python3 interpreter
set(Python_ADDITIONAL_VERSIONS 3)
find_package(PythonInterp REQUIRED)

# Command to merge the fixes we found above:
add_custom_command(OUTPUT ${FIXFILE}
COMMAND
${CMAKE_COMMAND} -E make_directory ${FIXDIR}
COMMAND
${CMAKE_COMMAND} -E remove -f ${APPLYFILE}
COMMAND
${YAML_MERGER} -o "${FIXFILE}" ${SOURCE_FIX_FILES}
${PYTHON_EXECUTABLE} ${YAML_MERGER} -o "${FIXFILE}" ${SOURCE_FIX_FILES}
COMMAND
${CMAKE_COMMAND} -E touch "${FIXFILE}"
##
Expand Down
14 changes: 10 additions & 4 deletions src/krims/ExceptionSystem/Backtrace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,24 @@ void Backtrace::parse_backtrace() {
break;
}

//
// Stuff which happens inside the c++ library when exception handling
//
if (std::strstr(stacktrace[frame], "__cxa_call_unexpected") != nullptr) {
// The current frame indicates that an unexpected exception was
// caught. This is certainly already inside the exception handling
// part of the c++ library.
// caught.
initframe = frame + 1;
break;
}

if (std::strstr(stacktrace[frame], "__cxa_throw") != nullptr) {
// The current frame indicates that a rethrow occurred.
initframe = frame + 1;
break;
}

if (std::strstr(stacktrace[frame], "__cxa_rethrow") != nullptr) {
// The current frame indicates that a rethrow occurred.
// This is certainly already inside the exception handling
// part of the c++ library.
initframe = frame + 1;
break;
}
Expand Down
5 changes: 3 additions & 2 deletions tests/GenMapTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ TEST_CASE("GenMap tests", "[genmap]") {

RCPWrapper<DummySubscribable<double>> dumptr =
m.at_ptr<DummySubscribable<double>>("dum");
REQUIRE_THROWS_AS(static_cast<std::shared_ptr<DummySubscribable<double>>>(dumptr),
ExcDisabled);
REQUIRE_THROWS_AS(
(void)static_cast<std::shared_ptr<DummySubscribable<double>>>(dumptr),
ExcDisabled);
}
#endif

Expand Down

0 comments on commit 8e2bdd1

Please sign in to comment.