Skip to content

Commit cd97f65

Browse files
committed
Revert "Remove fmt dependency (spdlog based on std)"
This reverts commit aaa9b82. Github MacOS 13 runner is bound to XCode 15.2, which does not implement `std::format`. This would require Xcode 15.3 (see https://developer.apple.com/xcode/cpp/#c++20). Various options could exist, among them cross-compiling from MacOS 14, or changing compiler to gcc-14, but none is straightforward, so I abandon the idea...
1 parent aaa9b82 commit cd97f65

File tree

5 files changed

+41
-30
lines changed

5 files changed

+41
-30
lines changed

.github/workflows/wheels.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
GH_TOKEN: ${{ github.token }}
5252
PYTHON_MINOR: ${{ matrix.python-minor }}
5353
BOOST_INSTALL_LAYOUT: system
54+
SPDLOG_FMT_EXTERNAL: on
5455
LUXCORE_REPO: ${{ inputs.luxcore_repo != '' && inputs.luxcore_repo || 'Howetuft/LuxCore' }} # TODO
5556
LUXCORE_REF: ${{ inputs.luxcore_ref != '' && inputs.luxcore_ref || 'for_v2.10' }}
5657
# Versions
@@ -64,6 +65,7 @@ jobs:
6465
OPENVDB_VERSION: 11.0.0
6566
SPDLOG_VERSION: 1.15.0
6667
EMBREE3_VERSION: 3.13.5
68+
FMT_VERSION: 11.0.2
6769
OPENSUBDIV_VERSION: 3.6.0
6870
JSON_VERSION: 3.11.3
6971
EIGEN_VERSION: 3.4.0
@@ -99,7 +101,7 @@ jobs:
99101
macOS) _workspace="$GITHUB_WORKSPACE";;
100102
*) echo "Unhandled os ${{ runner.os }}";exit 64;;
101103
esac
102-
echo "WORKSPACE=${_workspace}" >> $GITHUB_ENV
104+
echo "WORKSPACE=${_workspace}" >> "$GITHUB_ENV"
103105
104106
- name: Set conan preset
105107
uses: actions/github-script@v7
@@ -175,24 +177,25 @@ jobs:
175177
176178
echo "ASAN_PATH=${_T}/usr/lib/gcc/x86_64-redhat-linux/${_V}/libasan.so" >> $GITHUB_ENV
177179
178-
- name: Prepare MacOS
180+
- name: Set MacOS deployment target
179181
if: runner.os == 'macOS'
180-
shell: bash
181-
run: |
182-
if [[ '${{ runner.arch }}' == 'X64' ]]; then
183-
echo "PKG_ARCH=x86_64" >> $GITHUB_ENV
184-
brew install llvm@16
185-
echo "CC=$(brew --prefix llvm@16)/bin/clang" >> $GITHUB_ENV
186-
echo "CXX=$(brew --prefix llvm@16)/bin/clang++" >> $GITHUB_ENV
187-
echo "CPLUS_INCLUDE_PATH=" >> $GITHUB_ENV
188-
#sudo xcodes install 15.3
189-
#sudo xcode-select -switch /Applications/Xcode_15.3.app
190-
else
191-
echo "PKG_ARCH=armv8" >> $GITHUB_ENV
192-
sudo xcode-select -switch /Applications/Xcode_16.2.app
193-
fi
194-
195-
echo "MACOSX_DEPLOYMENT_TARGET=13.13" >> "$GITHUB_ENV"
182+
uses: actions/github-script@v7
183+
with:
184+
script: |
185+
if ('${{ runner.arch }}' == 'X64') {
186+
target = '10.13';
187+
arch='x86_64';
188+
}
189+
else if ('${{ env.PYTHON_MINOR }}' != '8') {
190+
target = '11.0';
191+
arch='armv8';
192+
}
193+
else {
194+
target = '12.0';
195+
arch='armv8';
196+
}
197+
core.exportVariable('MACOSX_DEPLOYMENT_TARGET', target);
198+
core.exportVariable('PKG_ARCH', arch);
196199
197200
- name: Retrieve cached dependencies
198201
id: retrieve-cache-deps
@@ -229,6 +232,7 @@ jobs:
229232
CMAKE_C_COMPILER_LAUNCHER
230233
PYTHON_MINOR
231234
BOOST_INSTALL_LAYOUT
235+
SPDLOG_FMT_EXTERNAL
232236
CXX_VERSION
233237
BOOST_VERSION
234238
OIIO_VERSION
@@ -240,6 +244,7 @@ jobs:
240244
OPENVDB_VERSION
241245
SPDLOG_VERSION
242246
EMBREE3_VERSION
247+
FMT_VERSION
243248
OPENSUBDIV_VERSION
244249
JSON_VERSION
245250
EIGEN_VERSION

conan-profiles/conan-profile-common

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ pkgconf/*
2424
yasm/*
2525

2626
[options]
27-
spdlog/*:use_std_fmt=True
28-
spdlog/*:header_only=True
2927
oidn/*:shared=True
3028
embree3/*:shared=True
3129
embree3/*:with_tbb=True

conan-profiles/conan-profile-macOS-ARM64

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include(conan-profile-common)
44

55
[settings]
66
os=Macos
7-
os.version=13.3
7+
os.version=11.0
88
arch=armv8
99
compiler=apple-clang
1010
compiler.version=15
@@ -37,3 +37,8 @@ embree3/*:avx2=False
3737
embree3/*:neon2x=True
3838

3939
{% endif %}
40+
41+
[buildenv]
42+
CXX=clang++
43+
CC=clang
44+
&:tools.build:cxxflags=["-O3"]

conan-profiles/conan-profile-macOS-X64

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ include(conan-profile-common)
22

33
[settings]
44
os=Macos
5-
os.version=13.3
5+
os.version=10.13
66
arch=x86_64
7-
compiler=clang
8-
compiler.version=16
7+
compiler=apple-clang
8+
compiler.version=14.0
99
compiler.cppstd={{ os.getenv("CXX_VERSION") }}
10-
compiler.libcxx=libstdc++11
10+
compiler.libcxx=libc++
1111

1212
[options]
1313
minizip-ng/*:with_zlib=True
1414
minizip-ng/*:with_libcomp=False
1515
openvdb/*:simd=AVX
1616

17+
[buildenv]
18+
CXX=clang++
19+
CC=clang
20+
1721
[conf]
18-
&:tools.build:cxxflags+=["-ftree-vectorize", "-march=x86-64-v3", "-O3", "-mno-avx2", "-I/usr/local/opt/llvm@16/include"]
19-
&:tools.build:exelinkflags+=['-L/usr/local/opt/llvm@16/lib/c++ -Wl,-rpath,/usr/local/opt/llvm@16/lib/c++"]
20-
&:tools.build:sharedlinkflags+=['-L/usr/local/opt/llvm@16/lib/c++ -Wl,-rpath,/usr/local/opt/llvm@16/lib/c++"]
22+
&:tools.build:cxxflags+=["-ftree-vectorize", "-march=x86-64-v3", "-O3", "-mno-avx2"]
2123
# NB: Github MacOS X64 runner does not support avx2 nor avx512

conanfile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
_tbb_version = os.environ["TBB_VERSION"]
2525
_spdlog_version = os.environ["SPDLOG_VERSION"]
2626
_embree3_version = os.environ["EMBREE3_VERSION"]
27+
_fmt_version = os.environ["FMT_VERSION"]
2728
_opensubdiv_version = os.environ["OPENSUBDIV_VERSION"]
2829
_json_version = os.environ["JSON_VERSION"]
2930
_eigen_version = os.environ["EIGEN_VERSION"]
@@ -57,7 +58,7 @@ class LuxCore(ConanFile):
5758
]
5859

5960
default_options = {
60-
# "fmt/*:header_only": True, # TODO
61+
"fmt/*:header_only": True,
6162
"spdlog/*:header_only": True,
6263
"openimageio/*:with_ffmpeg": False,
6364
"openimageio/*:with_libheif": False,
@@ -82,7 +83,7 @@ def requirements(self):
8283
transitive_libs=True,
8384
)
8485
self.requires("imath/3.1.9", override=True)
85-
# self.requires(f"fmt/{_fmt_version}", override=True) # TODO
86+
self.requires(f"fmt/{_fmt_version}", override=True)
8687

8788
if self.settings.os == "Macos":
8889
self.requires("llvm-openmp/18.1.8")

0 commit comments

Comments
 (0)