Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #503 Boost 1.77 support #504

Merged
merged 2 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

- [#496](http://github.com/Nelson-numerical-software/nelson/issues/496): Eigen 3.4 used.

- [#503](http://github.com/Nelson-numerical-software/nelson/issues/503): Boost 1.77 support (default on Windows).


# 0.5.8 (2021-08-25)

## Features:
Expand Down
2 changes: 1 addition & 1 deletion bin/bin.iss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
;==============================================================================
Source: {#RootPath}bin\{#BinPath}\readme.txt; DestDir: {app}\bin\{#BinPath}\
;==============================================================================
; Boost 1.71
; Boost 1.77
;==============================================================================
Source: {#RootPath}bin\{#BinPath}\boost_chrono-{#BOOST_TARGET}.dll; DestDir: {app}\bin\{#BinPath}\;
Source: {#RootPath}bin\{#BinPath}\boost_date_time-{#BOOST_TARGET}.dll; DestDir: {app}\bin\{#BinPath}\;
Expand Down
3 changes: 3 additions & 0 deletions modules/files_folders_functions/src/cpp/FileParts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ FilePartsPath(const std::wstring& fullpath)
if (pathToSplit.has_parent_path()) {
res = pathToSplit.parent_path().generic_wstring();
}
if (res.length() > 1 && res.back() == L':') {
res = res + L"/";
}
return res;
}
//=============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
//=============================================================================
#pragma once
//=============================================================================
#include "nlsFiles_folders_functions_exports.h"
#include <string>
#include "nlsFiles_folders_functions_exports.h"
//=============================================================================
#undef RemoveDirectory
//=============================================================================
namespace Nelson {
NLSFILES_FOLDERS_FUNCTIONS_IMPEXP bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
% [p,f,e]=fileparts('c:/') did not return the good result
%=============================================================================
[p, f, e] = fileparts('c:/');
assert_isequal(p, 'c:');
assert_isequal(p, 'c:/');
assert_isequal(f, '');
assert_isequal(e, '');
%=============================================================================
8 changes: 2 additions & 6 deletions modules/files_folders_functions/tests/test_fileparts.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@
assert_isequal('', e);
%=============================================================================
[p,f,e] = fileparts('c://');
if ispc()
assert_isequal('c:/', p);
else
assert_isequal('c:', p);
end
assert_isequal('c:/', p);
assert_isequal('', f);
assert_isequal('', e);
%=============================================================================
Expand All @@ -101,7 +97,7 @@
assert_isequal('', e);
%=============================================================================
[p,f,e] = fileparts('c:/');
assert_isequal('c:', p);
assert_isequal('c:/', p);
assert_isequal('', f);
assert_isequal('', e);
%=============================================================================
2 changes: 1 addition & 1 deletion modules/help_browser/src/cpp/HelpBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ HelpBrowser::clearCache()
closeBrowser();
std::wstring cachePath = getCachePath();
std::wstring msgError = L"";
Nelson::RemoveDirectory(cachePath, true, msgError);
RemoveDirectory(cachePath, true, msgError);
}
//=============================================================================
std::wstring
Expand Down
1 change: 1 addition & 0 deletions modules/mex/src/cpp/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
//=============================================================================
#include <string>
#include <stdlib.h>
#include <algorithm>
#include <boost/process.hpp>
#include <boost/thread/thread.hpp>
#include <boost/process/async.hpp>
Expand Down
3 changes: 2 additions & 1 deletion modules/stream_manager/src/cpp/DisplayFloatingNumber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ printNumber(
std::wstring realStr = printNumber(realpart, currentFormat, asInteger, asScalar);
strNumber.append(realStr);
strNumber.append(L" - ");
std::wstring imagStr = printNumber(abs(imagpart), currentFormat, asInteger, asScalar);
T absValue = abs(imagpart);
std::wstring imagStr = printNumber(absValue, currentFormat, asInteger, asScalar);
boost::algorithm::trim_left(imagStr);
strNumber.append(imagStr);
strNumber.append(L"i");
Expand Down
5 changes: 3 additions & 2 deletions modules/text_completion/src/cpp/FileCompleter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
// License along with this program. If not, see <http://www.gnu.org/licenses/>.
// LICENCE_BLOCK_END
//=============================================================================
#include "FileCompleter.hpp"
#include <algorithm>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/convenience.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/regex.hpp>
#include "FileCompleter.hpp"
//=============================================================================
namespace Nelson {
//=============================================================================
Expand Down Expand Up @@ -165,7 +166,7 @@ FileCompleter(const std::wstring& prefix)
size_t pos1 = prefix.rfind(L'/');
size_t pos2 = prefix.rfind(L'\\');
if (pos1 != std::wstring::npos && pos2 != std::wstring::npos) {
pos = std::max(pos1, pos2);
pos = max(pos1, pos2);
} else {
if (pos1 != std::wstring::npos) {
pos = pos1;
Expand Down
8 changes: 4 additions & 4 deletions modules/types/src/include/nlsConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
#ifdef _MSC_VER
#ifdef _DEBUG
#ifdef _WIN64
#define BOOST_TARGET "vc142-mt-gd-x64-1_75"
#define BOOST_TARGET "vc142-mt-gd-x64-1_77"
#else
#define BOOST_TARGET "vc142-mt-gd-x32-1_75"
#define BOOST_TARGET "vc142-mt-gd-x32-1_77"
#endif
#else
#ifdef _WIN64
#define BOOST_TARGET "vc142-mt-x64-1_75"
#define BOOST_TARGET "vc142-mt-x64-1_77"
#else
#define BOOST_TARGET "vc142-mt-x32-1_75"
#define BOOST_TARGET "vc142-mt-x32-1_77"
#endif
#endif
#endif
Expand Down
8 changes: 4 additions & 4 deletions tools/innosetup/Nelson.iss
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
#endif
#ifdef NELSON_X64
#ifdef NELSON_DEBUG
#define BOOST_TARGET "vc142-mt-gd-x64-1_75"
#define BOOST_TARGET "vc142-mt-gd-x64-1_77"
#else
#define BOOST_TARGET "vc142-mt-x64-1_75"
#define BOOST_TARGET "vc142-mt-x64-1_77"
#endif
#else
#ifdef NELSON_DEBUG
#define BOOST_TARGET "vc142-mt-gd-x32-1_75"
#define BOOST_TARGET "vc142-mt-gd-x32-1_77"
#else
#define BOOST_TARGET "vc142-mt-x32-1_75"
#define BOOST_TARGET "vc142-mt-x32-1_77"
#endif
#endif
;==============================================================================
Expand Down