Skip to content

Commit

Permalink
Initial support LLVM Intel in Windows (#363)
Browse files Browse the repository at this point in the history
* Initial support LLVM Intel

* Windows patching

* Deactivate strict compiler

* Update
  • Loading branch information
loumalouomega authored Oct 30, 2023
1 parent 7110c15 commit bf29d35
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
4 changes: 4 additions & 0 deletions co_sim_io/includes/communication/pipe_communication.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@ class BidirectionalPipe


private:
#ifndef CO_SIM_IO_COMPILED_IN_WINDOWS
int mPipeHandleWrite;
int mPipeHandleRead;
#endif

fs::path mPipeNameWrite;
fs::path mPipeNameRead;

#ifndef CO_SIM_IO_COMPILED_IN_WINDOWS
std::size_t mBufferSize;
#endif

void SendSize(const std::uint64_t Size);

Expand Down
5 changes: 4 additions & 1 deletion co_sim_io/sources/communication/pipe_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ PipeCommunication::BidirectionalPipe::BidirectionalPipe(
const fs::path& rBasePipeName,
const bool IsPrimary,
const int BufferSize,
const int EchoLevel) : mBufferSize(BufferSize)
const int EchoLevel)
#ifndef CO_SIM_IO_COMPILED_IN_WINDOWS
: mBufferSize(BufferSize)
#endif
{
mPipeNameWrite = mPipeNameRead = rPipeDir / rBasePipeName;

Expand Down
21 changes: 15 additions & 6 deletions scripts/build.bat
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
@echo off
rem Please do not modify this script. Copy it into the build folder

rem Set compiler
set CC=cl.exe
set CXX=cl.exe

rem Set variables
if not defined USE_INTEL_LLVM set USE_INTEL_LLVM="OFF"
if not defined CMAKE_GENERATOR set CMAKE_GENERATOR=Visual Studio 16 2019
if not defined NUMBER_OF_COMPILATION_CORES set NUMBER_OF_COMPILATION_CORES=%NUMBER_OF_PROCESSORS%
if not defined COSIMIO_SOURCE set COSIMIO_SOURCE=%~dp0..
if not defined COSIMIO_BUILD set COSIMIO_BUILD=%COSIMIO_SOURCE%/build

rem Set defaults
if not defined CO_SIM_IO_STRICT_COMPILER set CO_SIM_IO_STRICT_COMPILER=ON
rem oneAPI call and set compiler
IF "%USE_INTEL_LLVM%"=="ON" (
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
set CC=icx-cl.exe
set CXX=icx-cl.exe
@REM Only Ninja compiler is supported
set CMAKE_GENERATOR=Ninja
@REM Intel LLVM compiler fails with strict compiler
if not defined CO_SIM_IO_STRICT_COMPILER set CO_SIM_IO_STRICT_COMPILER=OFF
) ELSE (
set CC=cl.exe
set CXX=cl.exe
if not defined CO_SIM_IO_STRICT_COMPILER set CO_SIM_IO_STRICT_COMPILER=ON
)

rem Set basic configuration
if not defined COSIMIO_BUILD_TYPE set COSIMIO_BUILD_TYPE=Release
Expand Down

0 comments on commit bf29d35

Please sign in to comment.