Merge remote-tracking branch 'origin/develop' into feature/variadic-emplace_back

release/4.3a0
Yao Chen 2016-10-08 18:56:33 -04:00
commit 6a4e023a2b
8 changed files with 24 additions and 15 deletions

View File

@ -116,11 +116,11 @@ if(MSVC)
endif()
endif()
find_package(Boost 1.43 COMPONENTS serialization system filesystem thread program_options date_time regex timer chrono)
find_package(Boost 1.43 COMPONENTS serialization system filesystem thread program_options date_time timer chrono)
# Required components
if(NOT Boost_SERIALIZATION_LIBRARY OR NOT Boost_SYSTEM_LIBRARY OR NOT Boost_FILESYSTEM_LIBRARY OR
NOT Boost_THREAD_LIBRARY OR NOT Boost_DATE_TIME_LIBRARY OR NOT Boost_REGEX_LIBRARY)
NOT Boost_THREAD_LIBRARY OR NOT Boost_DATE_TIME_LIBRARY)
message(FATAL_ERROR "Missing required Boost components >= v1.43, please install/upgrade Boost or configure your search paths.")
endif()
@ -128,7 +128,7 @@ option(GTSAM_DISABLE_NEW_TIMERS "Disables using Boost.chrono for timing" OFF)
# Allow for not using the timer libraries on boost < 1.48 (GTSAM timing code falls back to old timer library)
set(GTSAM_BOOST_LIBRARIES
${Boost_SERIALIZATION_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_REGEX_LIBRARY})
${Boost_THREAD_LIBRARY} ${Boost_DATE_TIME_LIBRARY})
if (GTSAM_DISABLE_NEW_TIMERS)
message("WARNING: GTSAM timing instrumentation manually disabled")
add_definitions(-DGTSAM_DISABLE_NEW_TIMERS)

View File

@ -128,8 +128,7 @@ function(wrap_library_internal interfaceHeader linkLibraries extraIncludeDirs ex
## This needs to be fixed!!
if(UNIX AND NOT APPLE)
list(APPEND automaticDependencies ${Boost_SERIALIZATION_LIBRARY_RELEASE} ${Boost_FILESYSTEM_LIBRARY_RELEASE}
${Boost_SYSTEM_LIBRARY_RELEASE} ${Boost_THREAD_LIBRARY_RELEASE} ${Boost_DATE_TIME_LIBRARY_RELEASE}
${Boost_REGEX_LIBRARY_RELEASE})
${Boost_SYSTEM_LIBRARY_RELEASE} ${Boost_THREAD_LIBRARY_RELEASE} ${Boost_DATE_TIME_LIBRARY_RELEASE})
if(Boost_TIMER_LIBRARY_RELEASE AND NOT GTSAM_DISABLE_NEW_TIMERS) # Only present in Boost >= 1.48.0
list(APPEND automaticDependencies ${Boost_TIMER_LIBRARY_RELEASE} ${Boost_CHRONO_LIBRARY_RELEASE})
if(GTSAM_MEX_BUILD_STATIC_MODULE)

View File

@ -101,6 +101,9 @@ mark_as_advanced(GTSAM_SINGLE_TEST_EXE)
# Enable make check (http://www.cmake.org/Wiki/CMakeEmulateMakeCheck)
if(GTSAM_BUILD_TESTS)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --output-on-failure)
# Add target to build tests without running
add_custom_target(all.tests)
endif()
# Add examples target
@ -109,8 +112,6 @@ add_custom_target(examples)
# Add timing target
add_custom_target(timing)
# Add target to build tests without running
add_custom_target(all.tests)
# Implementations of this file's macros:

View File

@ -243,7 +243,7 @@ typename DoglegOptimizerImpl::IterationResult DoglegOptimizerImpl::Iterate(
stay = false;
}
}
gttoc(adjust_Delta);
gttoc(adjust_delta);
}
// dx_d and f_error have already been filled in during the loop

View File

@ -18,7 +18,6 @@
#include "Argument.h"
#include <boost/regex.hpp>
#include <boost/lexical_cast.hpp>
#include <iostream>

View File

@ -1,6 +1,6 @@
# Build/install Wrap
set(WRAP_BOOST_LIBRARIES ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_REGEX_LIBRARY})
set(WRAP_BOOST_LIBRARIES ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY})
# Allow for disabling serialization to handle errors related to Clang's linker
option(GTSAM_WRAP_SERIALIZATION "If enabled, allows for wrapped objects to be saved via boost.serialization" ON)

View File

@ -152,7 +152,7 @@ void Module::parseMarkup(const std::string& data) {
// parse forward declaration
ForwardDeclaration fwDec0, fwDec;
Rule forward_declaration_p =
!(str_p("virtual")[assign_a(fwDec.isVirtual, true)])
!(str_p("virtual")[assign_a(fwDec.isVirtual, T)])
>> str_p("class")
>> (*(basic.namespace_p >> str_p("::")) >> basic.className_p)[assign_a(fwDec.name)]
>> ch_p(';')

View File

@ -102,9 +102,19 @@ TEST( spirit, constMethod_p ) {
EXPECT(parse("double norm() const;", constMethod_p, space_p).full);
}
/* ************************************************************************* */
/* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56665
GCC compiler issues with -O2 and -fno-strict-aliasing results in undefined
behaviour when spirit uses assign_a with a literal.
GCC versions 4.7.2 -> 5.4 inclusive */
TEST( spirit, return_value_p ) {
bool isEigen = true;
static const bool T = true;
static const bool F = false;
bool isEigen = T;
string actual_return_type;
string actual_function_name;
@ -119,9 +129,9 @@ TEST( spirit, return_value_p ) {
Rule funcName_p = lexeme_d[lower_p >> *(alnum_p | '_')];
Rule returnType_p =
(basisType_p[assign_a(actual_return_type)][assign_a(isEigen, true)]) |
(className_p[assign_a(actual_return_type)][assign_a(isEigen,false)]) |
(eigenType_p[assign_a(actual_return_type)][assign_a(isEigen, true)]);
(basisType_p[assign_a(actual_return_type)][assign_a(isEigen, T)]) |
(className_p[assign_a(actual_return_type)][assign_a(isEigen, F)]) |
(eigenType_p[assign_a(actual_return_type)][assign_a(isEigen, T)]);
Rule testFunc_p = returnType_p >> funcName_p[assign_a(actual_function_name)] >> str_p("();");