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

[CMake] Fix CMakeLists.txt to compile to wasm #164

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

avinal
Copy link

@avinal avinal commented Jan 4, 2025

Changes

  • CMake was not compiling to WebAssembly
  • This changes adds missing CMake directives for compiling to Wasm

- CMake was not compiling to WebAssembly
- This changes adds missing CMake directives for compiling to Wasm

Signed-off-by: Avinal Kumar <[email protected]>
@nicbarker
Copy link
Owner

Hello! Unfortunately this doesn't seem to work on all compilers / architectures, when I tried this originally on my machine I got:

clang: error: unsupported option '-arch' for target 'wasm32'

For some reason, CMake on my machine (OSX) always stuffs the -arch flag into the compiler flags, which clang doesn't like if compiling for the wasm32 target. I hope we can figure out a way of fixing it! 🤔

@nicbarker nicbarker added the enhancement New feature or request label Jan 9, 2025
@nicbarker nicbarker changed the title [Examples/Website] Fix CMakeLists.txt to compile to wasm [CMake] Fix CMakeLists.txt to compile to wasm Jan 9, 2025
@avinal
Copy link
Author

avinal commented Jan 10, 2025

Okay I do not have an OSX machine, let me investigate more.

@nicbarker nicbarker force-pushed the main branch 2 times, most recently from 4fd677e to 338852b Compare January 14, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants