Skip to content

Commit

Permalink
Fixes for macos build (#38)
Browse files Browse the repository at this point in the history
* set C++ standard to 17

* link to spdlog

Co-authored-by: svetad <sv.dmytr@gmail.com>
Co-authored-by: G. Dan Miron <dan.miron@psi.com>
  • Loading branch information
3 people authored Jul 21, 2022
1 parent de3a95d commit 78d72e8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ if(NOT CMAKE_BUILD_TYPE)
endif()

# Set the C++ standard
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
#set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Set the list of compiler flags for MSVC compiler
if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
Expand Down
3 changes: 3 additions & 0 deletions ThermoFun/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ if(ChemicalFun_FOUND)
target_link_libraries(ThermoFun PUBLIC ChemicalFun::ChemicalFun)
endif()

target_link_libraries(ThermoFun PRIVATE spdlog::spdlog)


if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
#link_directories("/usr/local/lib")
else()
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- job: macOS
pool:
vmImage: 'macos-12'
vmImage: 'macOS-11'

steps:
- task: Bash@3
Expand Down
3 changes: 2 additions & 1 deletion ci/pipelines/install/install-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ cmake \
-DCMAKE_INSTALL_LIBDIR=lib \
..
make install
conda list
python -c "import thermofun"
if [ $? -eq 1 ]
then
echo "The install failed" >&2
exit 1
fi
conda list
7 changes: 7 additions & 0 deletions cmake/modules/ThermoFunFindDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ if(NOT ChemicalFun_FOUND)
else()
message(STATUS "Found ChemicalFun v${ChemicalFun_VERSION}")
endif()

find_package(spdlog REQUIRED)
if(NOT spdlog_FOUND)
message(FATAL_ERROR "spdlog not found")
else()
message(STATUS "Found spdlog v${spdlog_VERSION}")
endif()
8 changes: 4 additions & 4 deletions environment.devenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: thermofun
{% set python_version = os.environ.get("PY_VER", "3.7") %}

dependencies:
- pip
- setuptools=59.7.0
- gxx_linux-64=7.3.0 # [linux]
- pip
- gxx_linux-64=9.4.0 # [linux]
- cmake>=3.13
- ninja
- ccache # [unix]
- pybind11
- nlohmann_json
- fmt>=8.1.1
- chemicalfun>=0.1.3
- spdlog=1.10.0
- chemicalfun=0.1.4
- python={{ python_version }}
- pytest
- pip:
Expand Down

0 comments on commit 78d72e8

Please sign in to comment.