Working LSP with test webgpu build
This commit is contained in:
parent
b281bc04ce
commit
5b48d72196
2 changed files with 15 additions and 2 deletions
|
|
@ -7,7 +7,14 @@ project(webgpu
|
|||
)
|
||||
|
||||
set(CMAKE_C_STANDARD 17)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# Since nix include dirs isn't appearing in compile_commands.json we're gonna
|
||||
# force cmake to link it's includes explicitly
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
||||
if(CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||
set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES
|
||||
${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES})
|
||||
endif()
|
||||
|
||||
# Error on memory address issues in debug mode
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
#include <stdio.h>
|
||||
#include <webgpu/webgpu.h>
|
||||
|
||||
int main () {
|
||||
int main() {
|
||||
// We create a descriptor
|
||||
WGPUInstanceDescriptor desc = {};
|
||||
desc.nextInChain = NULL;
|
||||
|
||||
// We create the instance using this descriptor
|
||||
WGPUInstance instance = wgpuCreateInstance(&desc);
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue