Skip to content

Commit

Permalink
Fix C/I, take IV
Browse files Browse the repository at this point in the history
  • Loading branch information
kordejong committed Aug 29, 2023
1 parent fa841bd commit 6fb79f5
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions environment/conda/bld.bat
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
mkdir build
if errorlevel 1 exit 1

REM TODO Figure out compiler version. Should be 19x.
REM https://blog.knatten.org/2022/08/26/microsoft-c-versions-explained/
:: TODO Figure out compiler version. Should be 19x.
:: https://blog.knatten.org/2022/08/26/microsoft-c-versions-explained/

REM Select the first line, remove everything before and after the version number, remove all dots,
REM grab the first three bytes
REM Example input: Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x64
REM Results in: 193
REM See Conan's settings.yml for supported values
REM TODO How to do all this from a Windows batch file?
REM compiler_version=$($CXX 2>&1 | head -n 1 | sed 's/^.*Version // ; s/ .*// ; s/[.]//g' | head -c 3)
:: 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

conan profile detect

echo [settings] ^

arch=x86_%ARCH% ^
Expand Down Expand Up @@ -58,6 +56,13 @@ conan install . ^
--output-folder=build
if errorlevel 1 exit 1

:: Unset CMAKE_GENERATOR_PLATFORM. The platform is already specified in Conan's preset. Otherwise:
:: Generator
:: Ninja
:: does not support platform specification, but platform
:: x64
:: was specified.
set CMAKE_GENERATOR_PLATFORM=
set CMAKE_PREFIX_PATH=build

cmake --preset conan-release ^
Expand Down

0 comments on commit 6fb79f5

Please sign in to comment.