Skip to content

Commit

Permalink
Fixed issues with building shared libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sverre Briseid authored and Sverre Briseid committed Sep 18, 2024
1 parent d856acb commit 513f704
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions lrsplines2D/src/TrimUtils.C
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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<nmb_u;
++kj, upar+=u_del, pp2=pp3, ++kr)
Expand Down
3 changes: 2 additions & 1 deletion parametrization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ INCLUDE_DIRECTORIES(
${parametrization_SOURCE_DIR}/include
${GoToolsCore_SOURCE_DIR}/include
${GoTools_COMMON_INCLUDE_DIRS}
${sisl_SOURCE_DIR}/include
)


# Linked in libraries

SET(DEPLIBS
GoToolsCore
sisl
)


# Make the parametrization library

FILE(GLOB_RECURSE parametrization_SRCS src/*.C include/*.h)
Expand Down

0 comments on commit 513f704

Please sign in to comment.