-
Notifications
You must be signed in to change notification settings - Fork 540
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
[SharedModel] Basic cmake support #5751
Conversation
ooh -- build errors, that's exciting :) |
UWP break is interesting -- complaining because existing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple questions but LGTM otherwise!
fixed in 297566c |
@jwoo-msft - could you fix up the iOS project for me? Thanks! |
@jwoo-msft - gentle ping :) |
@paulcam206 |
@paulcam206, |
* [SharedModel] Build clean VS, cmake/clang, cmake/VS, and cmake/emscripten * clang-format ParseUtil.h * Fix UWP build breaks
* [SharedModel] Build clean VS, cmake/clang, cmake/VS, and cmake/emscripten * clang-format ParseUtil.h * Fix UWP build breaks
* [SharedModel] Build clean VS, cmake/clang, cmake/VS, and cmake/emscripten * clang-format ParseUtil.h * Fix UWP build breaks
Description
This change introduces
cmake
build support for the Shared Model. This allows us to independently build the Shared Model in a cross-platform way. As part of this, there were a number of code issues found that are fixed here (primarily from clang, which seems stricter than MSVC).Tested configurations
Visual Studio 16 2019
/Windows SDK version 10.0.19041.0
/MSVC 19.28.29914.0
- Windows)GNU 10.3.0
- WSL)Clang 9.0.1
- Windows and WSL)emcc 2.0.18
- Windows and WSL)Benefits
clang-tidy
)How do I build this thing?
winget install cmake
Developer Command Prompt for VS 2019
from start menucd <ac root>\source\shared\cpp\ObjectModel
cmake .
cmake --build .
winget install cmake
winget install llvm
cd <ac root>\source\shared\cpp\ObjectModel
cmake .
cmake --build .
winget install python
winget install cmake
winget install git
emscripten
git clone https://github.com/emscripten-core/emsdk.git <location to place emscripten SDK>
cd <emsdk directory>
git pull
emsdk install latest
emsdk activate latest
cd <ac root>\source\shared\cpp\ObjectModel
<emsdk directory>\emsdk_env.bat
<- might not be needed depending on your environmentemcmake cmake .
cmake --build .
sudo apt update && sudo apt install cmake gcc
cd <ac root>/source/shared/cpp/ObjectModel
cmake .
cmake --build .
sudo apt update && sudo apt install cmake clang
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
clang
as your default C/C++ compiler:sudo update-alternatives --config cc
(chooseclang
)sudo update-alternatives --config c++
(chooseclang
)cd <ac root>/source/shared/cpp/ObjectModel
cmake .
cmake --build .
sudo apt update && sudo apt install cmake python3 git
emscripten
git clone https://github.com/emscripten-core/emsdk.git <location to place emscripten SDK>
cd <emsdk directory>
git pull
emsdk install latest
emsdk activate latest
cd <ac root>/source/shared/cpp/ObjectModel
source <emsdk directory>/emsdk_env.sh
<- might not be needed depending on your environmentemcmake cmake .
cmake --build .
Microsoft Reviewers: Open in CodeFlow