Skip to content

Commit

Permalink
build: Arch specific gsl (#2008)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Washington <[email protected]>
  • Loading branch information
RobBuchananCompPhys and rprospero authored Nov 19, 2024
1 parent f96c670 commit 887387c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build/osx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ runs:
# Build
mkdir build && cd build
cmake -G Ninja -DGUI:bool=true -DMULTI_THREADING:bool=${{ inputs.threading }} -DJava_JAVA_EXECUTABLE:path=${JAVA_RUNTIME} -DANTLR_EXECUTABLE:string=$ANTLR_EXE -DQT_BASE_DIR=$QT_BASE_DIR ../
cmake -G Ninja -DGUI:bool=true -DMULTI_THREADING:bool=${{ inputs.threading }} -DCONAN_GSL="OFF" -DJava_JAVA_EXECUTABLE:path=${JAVA_RUNTIME} -DANTLR_EXECUTABLE:string=$ANTLR_EXE -DQT_BASE_DIR=$QT_BASE_DIR ../
cmake --build . --config Release
# Copy over ftgl libs so we can ship them with the bundle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:
- name: Install Dependencies (OSX)
if: ${{ runner.os == 'macos' }}
shell: bash
run: brew install coreutils gawk
run: brew install coreutils gawk gsl

- name: Get nix hash
shell: bash
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@ set(CMAKE_CXX_STANDARD 17)
# Add our custom module search path
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules")

# Install GSL (GNU Scientific Library) with Conan for Windows and Unix-like systems
option(CONAN_GSL "Use conan to find GSL" ON)

# Include Conan Packages
option(CONAN "Use conan to find dependencies" ON)
if(CONAN)
if(CONAN_GSL)
list(APPEND EXTRA_CONAN_REQUIRES gsl/2.7.1)
endif(CONAN_GSL)
# Add local dirs to cmake Module search path
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
Expand All @@ -52,6 +58,9 @@ include_directories(${toml11_INCLUDE_DIRS})
find_package(pugixml REQUIRED)
include_directories(${pugixml_INCLUDE_DIRS})
list(APPEND CORE_LINK_LIBS "pugixml::pugixml")
find_package(GSL REQUIRED)
set(GSL_LIBS GSL::gsl GSL::gslcblas)
list(APPEND CORE_LINK_LIBS ${GSL_LIBS})

# For the Antlr runtime we need to do a bit more work since the cmake lib descriptions that get generated by Conan / Nix / other are not
# very consistent with their variable naming...
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
fmt_8
fmt_8.dev
freetype
gsl
inetutils # for rsh
ninja
jre
Expand Down

1 comment on commit 887387c

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 887387c Previous: 2fbdfd1 Ratio
BM_Box_MinimumVector<OrthorhombicBox> 11.90993450920407 ns/iter 5.776721436549434 ns/iter 2.06

This comment was automatically generated by workflow using github-action-benchmark.

CC: @disorderedmaterials/dissolve-devs

Please sign in to comment.