Development Notes
June 11, 2026 ยท View on GitHub
Prerequisites
Common
- Git
- Cmake
- Python3
- Build Tools
- macOS: Command Line Tools
- Linux: gcc, g++
- Windows:
- "Visual Studio Build Tools 2022"
- In "Visual Studio Installer" check also "Desktop Development with C++"
Dependencies
macOS/Linux
python3 -m venv .pyenv
source .pyenv/bin/activate
pip3 install -r requirements.txt
export CONAN_HOME=$(pwd)/.conan-home
conan profile detect
Windows
python.exe -m venv .pyenv
.pyenv\Scripts\activate.bat
pip.exe install -r requirements.txt
set CONAN_HOME=$(pwd)/.conan-home
conan.exe profile detect
Building the project
./build.py conan-install | Install dependencies and gathers licenses |
./build.py configure | Configure the project |
./build.py | Build the project |
./build.py conan-create | Create the package |
| or | |
./build.py all | Perform all of the above commands |
Run ./build.py [cmd] --help to learn more about configurable arguments.
macOS
Build a fat binary (x86_64 + armv8)
./build.py conan-install -o .conan-x86_64 -pr:h profiles/darwin.release.x86_64
./build.py configure -t .conan-x86_64/build/Release/generators/conan_toolchain.cmake -b .build-x86_64 -bt Release
./build.py build -b .build-x86_64
./build.py conan-install -o .conan-armv8 -pr:h profiles/darwin.release.armv8
./build.py configure -t .conan-armv8/build/Release/generators/conan_toolchain.cmake -b .build-armv8 -bt Release
./build.py build -b .build-armv8
mkdir -p .build-universal/
lipo -create -output .build-universal/opencl-language-server .build-x86_64/opencl-language-server .build-armv8/opencl-language-server
lipo -archs .build-universal/opencl-language-server
Generate Xcode project
./build.py conan-install -pr:h profiles/darwin.debug.x86_64 -pr:h profiles/darwin.debug.armv8 -w
cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=".conan-install/build/Debug/generators/conan_toolchain.cmake" -DENABLE_TESTING=ON -B .build
Signing
codesign -s ${DEVELOPER_ID} --timestamp --force --options runtime --entitlements build-support/opencl-language-server.entitlements .build-universal/opencl-language-server
codesign --verify -vvvv .build-universal/opencl-language-server
Notarization
xcrun altool --list-providers -p "@keychain:AC_PASSWORD"
xcrun altool --notarize-app --primary-bundle-id "com.${AUTHOR}.opencl-language-server" --password "@keychain:AC_PASSWORD" --asc-provider ${PROVIDER} --file opencl-language-server.zip
xcrun altool --notarization-history 0 --asc-provider ${PROVIDER} --password "@keychain:AC_PASSWORD"
xcrun altool --notarization-info ${REQUEST_ID} --password "@keychain:AC_PASSWORD"
Linux
Cross compilation (x86_64 -> armv8)
sudo apt install gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu
./build.py conan-install -o .conan-armv8 -pr:h profiles/linux.release.armv8
./build.py configure -t .conan-armv8/build/Release/generators/conan_toolchain.cmake -b .build-armv8 -bt Release
./build.py build -b .build-armv8
ubuntu-22.04, gcc-11
Windows
Generate Visual Studio Project
python.exe build.py conan-install -pr:h profiles/windows.release.x86_64
cmake -G "Visual Studio 17 2022" -B Builds -DCMAKE_TOOLCHAIN_FILE=".conan-install/build/generators/conan_toolchain.cmake"
VS Code Debugger Configuration
launch.json (example)
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/.build/Debug/opencl-language-server.exe",
"args": ["clinfo"],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"console": "externalTerminal"
}
]
}
VS Code Build Task
tasks.json (example)
{
"tasks": [
{
"type": "process",
"label": "Debug Build",
"command": "python.exe",
"args": [
"build.py",
"build",
"-bt",
"Debug"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$msCompile"
],
"group": {
"kind": "build",
"isDefault": true
},
}
],
"version": "2.0.0"
}