Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support LLVM Intel in Windows #363

Merged
merged 4 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions co_sim_io/includes/communication/pipe_communication.hpp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please explain why these changes are required?

Seems like a wrong commit to int should also work in Win :D

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
Loading