From 513f704af1327b922d02803cecc52876d1e0ca2d Mon Sep 17 00:00:00 2001 From: Sverre Briseid Date: Wed, 18 Sep 2024 12:55:45 +0200 Subject: [PATCH] Fixed issues with building shared libraries. --- CMakeLists.txt | 3 +++ lrsplines2D/src/TrimUtils.C | 8 ++++---- parametrization/CMakeLists.txt | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ab439032..20e65ddf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,9 @@ SET(GoTools_VERSION_PATCH 0) SET(GoTools_VERSION "${GoTools_VERSION_MAJOR}.${GoTools_VERSION_MINOR}.${GoTools_VERSION_PATCH}") SET(GoTools_ABI_VERSION "${GoTools_VERSION_MAJOR}.${GoTools_VERSION_MINOR}" CACHE INTERNAL "GoTools ABI version") +option(BUILD_AS_SHARED_LIBRARY "Build the project as shared libraries?" OFF) +#message("gotools: BUILD_AS_SHARED_LIBRARY: " ${BUILD_AS_SHARED_LIBRARY}) + option(GoTools_COPY_DATA "Copy data?" ON) OPTION(GoTools_ENABLE_OPENMP "Include OPENMP?" OFF) diff --git a/lrsplines2D/src/TrimUtils.C b/lrsplines2D/src/TrimUtils.C index 1a4bcf7ac..90fabf156 100644 --- a/lrsplines2D/src/TrimUtils.C +++ b/lrsplines2D/src/TrimUtils.C @@ -51,7 +51,7 @@ using std::pair; //#define DEBUG -int compare_u_par(const void* el1, const void* el2) +int compare_u_par_trim(const void* el1, const void* el2) { if (((double*)el1)[0] < ((double*)el2)[0]) return -1; @@ -61,7 +61,7 @@ int compare_u_par(const void* el1, const void* el2) return 0; } -int compare_v_par(const void* el1, const void* el2) +int compare_v_par_trim(const void* el1, const void* el2) { if (((double*)el1)[1] < ((double*)el2)[1]) return -1; @@ -431,7 +431,7 @@ void TrimUtils::distributePointCloud(int ix1, int ix2, // Sort points in v-direction int nmb_pts = (ix2 - ix1)/del; double *points = points_+ix1; - qsort(points, nmb_pts, del*sizeof(double), compare_v_par); + qsort(points, nmb_pts, del*sizeof(double), compare_v_par_trim); #ifdef DEBUG std::ofstream of("division_lines.g2"); @@ -474,7 +474,7 @@ void TrimUtils::distributePointCloud(int ix1, int ix2, } // Sort according to the u-parameter - qsort(points+pp0, (pp1-pp0)/del, del*sizeof(double), compare_u_par); + qsort(points+pp0, (pp1-pp0)/del, del*sizeof(double), compare_u_par_trim); for (kj=0, pp2=pp0, upar=domain[0]+u_del; kj