Skip to content

Commit

Permalink
Fixing TRIANGLE
Browse files Browse the repository at this point in the history
  • Loading branch information
krystophny committed Dec 17, 2024
1 parent 134400e commit 35c40c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ set(MEPHIT_CPP_SRC_FILES
src/miscellaneous.cpp
)
set_source_files_properties(src/mephit_run.c ${MEPHIT_C_SRC_FILES} ${MEPHIT_CPP_SRC_FILES}
PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DREAL=double -I${TRIANGLE_INCLUDE_DIR} -I${SUITESPARSE_INCLUDE_DIRS}")
PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} -DREAL=double -I${TRIANGLE_INCLUDE_DIR} -I${SUITESPARSE_INCLUDE_DIRS} -L${TRIANGLE_LIB_DIR}")


### Define library
Expand Down
2 changes: 1 addition & 1 deletion cmake/SetupTriangle.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else()# Define Triangle repository
BUILD_COMMAND /bin/bash ${CMAKE_SOURCE_DIR}/cmake/setup_triangle.sh <SOURCE_DIR>
INSTALL_COMMAND ""
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
BUILD_BYPRODUCTS <SOURCE_DIR>/libtriangle.so
BUILD_BYPRODUCTS <SOURCE_DIR>/libtriangle${CMAKE_SHARED_LIBRARY_SUFFIX}
)
set(TRIANGLE_DIR ${CMAKE_BINARY_DIR}/triangle/src/TRIANGLE)
endif()
Expand Down
7 changes: 1 addition & 6 deletions cmake/setup_triangle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ CC=${CC:-gcc}
if [ "$(uname)" == "Darwin" ]; then
CFLAGS="-I/opt/homebrew/include"
LDFLAGS="-L/opt/homebrew/lib"
else
CFLAGS=""
LDFLAGS=""
fi


echo "Fetching and building Triangle..."
git clone https://salsa.debian.org/science-team/triangle.git
cd triangle
echo "Building Triangle..."
while read -r patch; do
patch -p1 < "debian/patches/$patch"
done < debian/patches/series
Expand Down

0 comments on commit 35c40c5

Please sign in to comment.