-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
mpdecimal: Add version 4.0.0 #25896
mpdecimal: Add version 4.0.0 #25896
Changes from 7 commits
06d1f7e
9c9bb38
d274443
441adc7
8b7caf9
5592e6c
0529d1b
d7799e1
ed450bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
diff --git a/libmpdec++/Makefile.vc b/libmpdec++/Makefile.vc | ||
index 5985c33..bc2bdac 100644 | ||
--- a/libmpdec++/Makefile.vc | ||
+++ b/libmpdec++/Makefile.vc | ||
@@ -14,11 +14,11 @@ LIBIMPORT_CXX = libmpdec++-4.0.0.dll.lib | ||
LIBSHARED_CXX = libmpdec++-4.0.0.dll | ||
|
||
!if "$(DEBUG)" == "1" | ||
-OPT = /MTd /Od /Zi /EHsc | ||
-OPT_SHARED = /MDd /Od /Zi /EHsc | ||
+OPT = /Od /Zi /EHsc | ||
+OPT_SHARED = /Od /Zi /EHsc | ||
!else | ||
-OPT = /MT /O2 /GS /EHsc /DNDEBUG | ||
-OPT_SHARED = /MD /O2 /GS /EHsc /DNDEBUG | ||
+OPT = /O2 /GS /EHsc /DNDEBUG | ||
+OPT_SHARED = /O2 /GS /EHsc /DNDEBUG | ||
!endif | ||
|
||
!if "$(CC)" == "clang-cl" | ||
@@ -27,9 +27,9 @@ WARN = /W4 -Wno-undefined-inline | ||
WARN = /W4 | ||
!endif | ||
|
||
-MPD_CXXFLAGS = $(WARN) /nologo $(OPT) | ||
-MPD_CXXFLAGS_SHARED = /DBUILD_LIBMPDECXX $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS) | ||
-MPD_BIN_CXXFLAGS_SHARED = $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS) | ||
+MPD_CXXFLAGS = $(WARN) /nologo $(OPT) $(CONAN_CXXFLAGS) $(CONAN_CFLAGS) | ||
+MPD_CXXFLAGS_SHARED = /DBUILD_LIBMPDECXX $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS) $(CONAN_LDFLAGS) | ||
+MPD_BIN_CXXFLAGS_SHARED = $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS) $(CONAN_LDFLAGS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if this section is still necessary, is this 1.x legacy? If so, I can remove from previous versions too. (there are a few other sections like this too) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm removing these sections in my followup PR |
||
|
||
MPD_LDXXFLAGS= /DLL /MANIFEST $(LDXXFLAGS) | ||
|
||
@@ -42,22 +42,22 @@ OBJS = decimal.obj | ||
SHARED_OBJS = .objs\decimal.obj | ||
|
||
|
||
-$(LIBSTATIC_CXX): Makefile $(OBJS) | ||
+$(LIBSTATIC_CXX): Makefile.vc $(OBJS) | ||
-@if exist $@ del $(LIBSTATIC_CXX) | ||
lib /out:$(LIBSTATIC_CXX) $(OBJS) | ||
|
||
-$(LIBSHARED_CXX): Makefile $(SHARED_OBJS) | ||
+$(LIBSHARED_CXX): Makefile.vc $(SHARED_OBJS) | ||
-@if exist $@ del $(LIBSHARED_CXX) | ||
link $(MPD_LDXXFLAGS) /out:$(LIBSHARED_CXX) /implib:$(LIBIMPORT_CXX) /LIBPATH:$(SRCDIR) $(SHARED_OBJS) $(LIBIMPORT) | ||
mt -manifest $(LIBSHARED_CXX).manifest -outputresource:$(LIBSHARED_CXX);2 | ||
|
||
|
||
decimal.obj:\ | ||
-Makefile decimal.cc ..\libmpdec\mpdecimal.h decimal.hh | ||
+Makefile.vc decimal.cc ..\libmpdec\mpdecimal.h decimal.hh | ||
$(CXX) "-I." "-I$(SRCDIR)" $(MPD_CXXFLAGS) -c decimal.cc | ||
|
||
.objs\decimal.obj:\ | ||
-Makefile decimal.cc ..\libmpdec\mpdecimal.h decimal.hh | ||
+Makefile.vc decimal.cc ..\libmpdec\mpdecimal.h decimal.hh | ||
$(CXX) "-I." "-I$(SRCDIR)" $(MPD_CXXFLAGS_SHARED) -c decimal.cc /Fo.objs\decimal.obj | ||
|
||
|
||
diff --git a/libmpdec/Makefile.vc b/libmpdec/Makefile.vc | ||
index 7f72a4b..2ee3ddb 100644 | ||
--- a/libmpdec/Makefile.vc | ||
+++ b/libmpdec/Makefile.vc | ||
@@ -31,11 +31,11 @@ CONFIG = /DCONFIG_32 /DANSI | ||
!endif | ||
|
||
!if "$(DEBUG)" == "1" | ||
-OPT = /MTd /Od /Zi /EHsc | ||
-OPT_SHARED = /MDd /Od /Zi /EHsc | ||
+OPT = /Od /Zi /EHsc | ||
+OPT_SHARED = /Od /Zi /EHsc | ||
!else | ||
-OPT = /MT /O2 /GS /EHsc /DNDEBUG | ||
-OPT_SHARED = /MD /O2 /GS /EHsc /DNDEBUG | ||
+OPT = /O2 /GS /EHsc /DNDEBUG | ||
+OPT_SHARED = /O2 /GS /EHsc /DNDEBUG | ||
!endif | ||
|
||
!if "$(CC)" == "clang-cl" | ||
@@ -44,13 +44,13 @@ WARN = /W4 /wd4200 /wd4204 /wd4221 -Wno-unknown-pragmas -Wno-undefined-inline /D | ||
WARN = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS | ||
!endif | ||
|
||
-MPD_CFLAGS = $(WARN) /nologo $(CONFIG) $(OPT) | ||
-MPD_CFLAGS_SHARED = /DBUILD_LIBMPDEC $(WARN) /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) | ||
+MPD_CFLAGS = $(WARN) /nologo $(CONFIG) $(OPT) $(CONAN_CFLAGS) | ||
+MPD_CFLAGS_SHARED = /DBUILD_LIBMPDEC $(WARN) /nologo $(CONFIG) $(OPT_SHARED) $(PGOFLAGS) $(CONAN_CFLAGS) | ||
|
||
MPD_BIN_CFLAGS = $(WARN) /nologo $(OPT) | ||
MPD_BIN_CFLAGS_SHARED = $(WARN) /nologo $(OPT_SHARED) $(PGOFLAGS) | ||
|
||
-MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) | ||
+MPD_LDFLAGS= /DLL /MANIFEST $(LDFLAGS) $(CONAN_LDFLAGS) | ||
|
||
|
||
default: $(LIBSTATIC) $(LIBSHARED) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff --git a/libmpdec++/decimal.hh b/libmpdec++/decimal.hh | ||
index 9040290..5e057cb 100644 | ||
--- a/libmpdec++/decimal.hh | ||
+++ b/libmpdec++/decimal.hh | ||
@@ -58,7 +58,7 @@ | ||
#ifdef _MSC_VER | ||
#if defined (BUILD_LIBMPDECXX) | ||
#define IMPORTEXPORT __declspec(dllexport) | ||
- #elif defined(_DLL) | ||
+ #elif defined(MPDECIMAL_DLL) | ||
#define IMPORTEXPORT __declspec(dllimport) | ||
#else | ||
#define IMPORTEXPORT | ||
diff --git a/libmpdec/mpdecimal32vc.h b/libmpdec/mpdecimal32vc.h | ||
index 6a35951..43e5631 100644 | ||
--- a/libmpdec/mpdecimal32vc.h | ||
+++ b/libmpdec/mpdecimal32vc.h | ||
@@ -59,7 +59,7 @@ extern "C" { | ||
#if defined (BUILD_LIBMPDEC) | ||
#undef IMPORTEXPORT | ||
#define IMPORTEXPORT __declspec(dllexport) | ||
-#elif defined(_DLL) | ||
+#elif defined(MPDECIMAL_DLL) | ||
#undef IMPORTEXPORT | ||
#define IMPORTEXPORT __declspec(dllimport) | ||
#endif | ||
diff --git a/libmpdec/mpdecimal64vc.h b/libmpdec/mpdecimal64vc.h | ||
index 9320176..a9944fc 100644 | ||
--- a/libmpdec/mpdecimal64vc.h | ||
+++ b/libmpdec/mpdecimal64vc.h | ||
@@ -59,7 +59,7 @@ extern "C" { | ||
#if defined (BUILD_LIBMPDEC) | ||
#undef IMPORTEXPORT | ||
#define IMPORTEXPORT __declspec(dllexport) | ||
-#elif defined(_DLL) | ||
+#elif defined(MPDECIMAL_DLL) | ||
#undef IMPORTEXPORT | ||
#define IMPORTEXPORT __declspec(dllimport) | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is weird. For some reason, in the cache folder, most of the the files are symlinks in 4.0.0, but actual files in 2.5.1. So we need to copy from the source folder instead. But this only affects the
libmpdec++
folder. In fact, making this change to thelibmpdec
folder causes the C header to not get packaged. I don't understand any of why this is the case, but it works like this.Also to note: I'm just being consistent here with the usage of
*_path
variables, I know they're deprecated.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested yet, but I'm hoping the weirdness will go away in the followup cleanup PR.