Skip to content

Commit

Permalink
Fix C/I, take II
Browse files Browse the repository at this point in the history
  • Loading branch information
kordejong committed Sep 1, 2023
1 parent fa6b670 commit 8258a5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 50 deletions.
49 changes: 2 additions & 47 deletions environment/conda/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,8 @@ echo on
mkdir build
if errorlevel 1 exit 1

:: https://blog.knatten.org/2022/08/26/microsoft-c-versions-explained/

:: TODO Call write_conan_profile.py

:: Select the first line, remove everything before and after the version number, remove all dots,
:: grab the first three bytes
:: Example input: Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x64
:: Results in: 193
:: See Conan's settings.yml for supported values
:: TODO How to do all this from a Windows batch file?
:: compiler_version=$($CXX 2>&1 | head -n 1 | sed 's/^.*Version // ; s/ .*// ; s/[.]//g' | head -c 3)
:: set compiler_version=193
::
:: echo [settings] ^
::
:: arch=x86_%ARCH% ^
::
:: build_type=Release ^
::
:: compiler=msvc ^
::
:: compiler.version=%compiler_version% ^
::
:: compiler.runtime=dynamic ^
::
:: compiler.cppstd=17 ^
::
:: os=Windows > host_profile
::
:: echo [settings] ^
::
:: arch=x86_%ARCH% ^
::
:: build_type=Release ^
::
:: compiler=msvc ^
::
:: compiler.version=%compiler_version% ^
::
:: compiler.runtime=dynamic ^
::
:: compiler.cppstd=17 ^
::
:: os=Windows > build_profile

%PYTHON% environment/script/write_conan_profile.py matrix.compiler.name host_profile
%PYTHON% environment/script/write_conan_profile.py matrix.compiler.name build_profile
%PYTHON% environment/script/write_conan_profile.py %CXX% host_profile
%PYTHON% environment/script/write_conan_profile.py %CXX% build_profile

set LUE_CONAN_PACKAGES=imgui span-lite

Expand Down
4 changes: 2 additions & 2 deletions environment/conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ if [[ $target_platform == osx* ]]; then
fi
fi

${PYTHON} environment/script/write_conan_profile.py matrix.compiler.name host_profile
${PYTHON} environment/script/write_conan_profile.py matrix.compiler.name build_profile
${PYTHON} environment/script/write_conan_profile.py ${CXX} host_profile
${PYTHON} environment/script/write_conan_profile.py ${CXX} build_profile

LUE_CONAN_PACKAGES="imgui span-lite" conan install . \
--profile:host=host_profile \
Expand Down
3 changes: 2 additions & 1 deletion environment/script/write_conan_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ def clang_settings(compiler_filename):
"""
compiler = "clang"
compiler_cppstd = "17"
compiler_libcxx = "libc++"
# On Ubuntu clang depends on libstdc++
compiler_libcxx = "libstdc++"
compiler_version = clang_version(compiler_filename)

return {
Expand Down

0 comments on commit 8258a5d

Please sign in to comment.