[pqp] fixes wrong declaration of math functions

Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
This commit is contained in:
Tobias Kohlbau 2017-04-04 12:21:26 +02:00
parent 8d9766200e
commit 2b64dfd415
No known key found for this signature in database
GPG Key ID: 9D0719F9F4AF4468
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,19 @@
diff --git a/src/PQP_Compile.h b/src/PQP_Compile.h
index f76c981..8a70710 100644
--- a/src/PQP_Compile.h
+++ b/src/PQP_Compile.h
@@ -44,10 +44,10 @@
// prevents compiler warnings when PQP_REAL is float
#include <math.h>
-inline float sqrt(float x) { return (float)sqrt((double)x); }
-inline float cos(float x) { return (float)cos((double)x); }
-inline float sin(float x) { return (float)sin((double)x); }
-inline float fabs(float x) { return (float)fabs((double)x); }
+//inline float sqrt(float x) { return (float)sqrt((double)x); }
+//inline float cos(float x) { return (float)cos((double)x); }
+//inline float sin(float x) { return (float)sin((double)x); }
+//inline float fabs(float x) { return (float)fabs((double)x); }
//-------------------------------------------------------------------------
//

View File

@ -11,6 +11,11 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-math-functions.patch"
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(