Skip to content

Conversation

@hydroo
Copy link

@hydroo hydroo commented Mar 22, 2024

Adding a basic cmake file and Windows support.

  • The change is trying to be minimally intrusive and follow the existing Makefile
  • Optimization flags are only used for release builds, because the default debug flags for MSVC clash with /O2.
  • Set default build type to Release, because Linux would otherwise not apply release flags.
  • Clock resolution is a bit unstable on Windows (999-~100us), but good enough, I suppose

Build:

mkdir BUILD
cd BUILD
cmake .. [-DCMAKE_BUILD_TYPE=Release]
cmake --build . [--config Release]

Win Execute:

Release\stream_c.exe

Linux Execute:

./stream_c
./stream_f

Tested with: MSVC, Clang on Windows, GCC in WSL, Clang in WSL

@hydroo hydroo marked this pull request as ready for review March 22, 2024 13:52
@hydroo
Copy link
Author

hydroo commented Apr 12, 2024

I removed the printf warning change and the .gitignore change to simplify the CL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant