diff --git a/CMakeLists.txt b/CMakeLists.txt index 773967400cdab..b48ef4c546f74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,7 @@ option(BUILD_CORE_ONLY "Build only the core of DART" OFF) if(MSVC) set(DART_RUNTIME_LIBRARY "/MD" CACHE STRING "BaseName chosen by the user at CMake configure time") set_property(CACHE DART_RUNTIME_LIBRARY PROPERTY STRINGS /MD /MT) + option(DART_MSVC_DEFAULT_OPTIONS "Build DART with default Visual Studio options" OFF) else() option(BUILD_SHARED_LIBS "Build shared libraries" ON) endif() @@ -465,14 +466,16 @@ endif() # Compiler flags #=============================================================================== if(MSVC) - message(STATUS "Setup Visual Studio Specific Flags") # Visual Studio enables c++11 support by default if(NOT MSVC12) message(FATAL_ERROR "${PROJECT_NAME} requires VS 2013 or greater.") endif() - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DART_RUNTIME_LIBRARY}d /Zi /Gy /W1 /EHsc") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${DART_RUNTIME_LIBRARY} /Zi /GL /Gy /W1 /EHsc /arch:SSE2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP4") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /INCREMENTAL:NO") + if(NOT DART_MSVC_DEFAULT_OPTIONS) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DART_RUNTIME_LIBRARY}d /Zi /Gy /W1 /EHsc") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${DART_RUNTIME_LIBRARY} /Zi /GL /Gy /W1 /EHsc /arch:SSE2") + endif(NOT DART_MSVC_DEFAULT_OPTIONS) elseif(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "-Wall -msse2 -fPIC") execute_process( diff --git a/appveyor.yml b/appveyor.yml index 8ada23ea80804..38f6ebdbe3460 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,8 +11,9 @@ platform: # specify custom environment variables environment: + MSVC_DEFAULT_OPTIONS: ON BOOST_ROOT: C:\Libraries\boost - BOOST_LIBRARYDIR: C:\Libraries\boost\stage\lib + BOOST_LIBRARYDIR: C:\Libraries\boost\lib32-msvc-12.0 BUILD_EXAMPLES: OFF # don't build examples to not exceed allowed build time (40 min) BUILD_TUTORIALS: OFF # don't build tutorials to not exceed allowed build time (40 min) matrix: @@ -43,7 +44,7 @@ branches: # scripts that run after cloning repository install: - - ps: cd "C:\projects\dart\ci" + - ps: cd C:\projects\dart\ci - ps: .\appveyor_install.ps1 # scripts to run before build @@ -54,7 +55,7 @@ before_build: # We generate project files for Visual Studio 12 because the boost binaries installed on the test server are for Visual Studio 12. - cmd: if "%platform%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 12 - cmd: if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 12 Win64 - - cmd: cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%configuration% -DBUILD_CORE_ONLY="%BUILD_CORE_ONLY%" -DDART_BUILD_EXAMPLES="%BUILD_EXAMPLES%" -DDART_BUILD_TUTORIALS="%BUILD_TUTORIALS%" -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DBoost_USE_STATIC_LIBS="ON" -Durdfdom_DIR="%urdfdom_DIR%" -Durdfdom_headers_DIR="%urdfdom_headers_DIR%" .. + - cmd: cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%configuration% -DBUILD_CORE_ONLY="%BUILD_CORE_ONLY%" -DDART_BUILD_EXAMPLES="%BUILD_EXAMPLES%" -DDART_BUILD_TUTORIALS="%BUILD_TUTORIALS%" -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DBoost_USE_STATIC_LIBS="ON" -Durdfdom_DIR="%urdfdom_DIR%" -Durdfdom_headers_DIR="%urdfdom_headers_DIR%" -DDART_MSVC_DEFAULT_OPTIONS="%MSVC_DEFAULT_OPTIONS%" .. build: project: C:\projects\dart\build\dart.sln # path to Visual Studio solution or project diff --git a/unittests/testSignal.cpp b/unittests/testSignal.cpp index 170f580c3bb16..3583de0b18c7d 100644 --- a/unittests/testSignal.cpp +++ b/unittests/testSignal.cpp @@ -241,7 +241,7 @@ struct signal_sum //============================================================================== TEST(Signal, ReturnValues) { - const float tol = 1e-6; + const float tol = 1.5e-6; const float a = 5.0f; const float b = 3.0f;