Skip to content

Commit 57277bf

Browse files
committed
added a missing main.cpp
1 parent 26a4a6f commit 57277bf

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Set the minimum required version of CMake and define the project.
2-
cmake_minimum_required(VERSION 3.10)
3-
project(glatter C CXX)
1+
cmake_minimum_required(VERSION 3.16)
2+
project(glatter LANGUAGES C CXX)
3+
4+
# --- Project Standards ---
5+
set(CMAKE_C_STANDARD 11)
6+
set(CMAKE_C_STANDARD_REQUIRED ON)
7+
set(CMAKE_CXX_STANDARD 17)
8+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
49

510
# --- Option to build internal tests ---
611
# This allows us to disable the problematic tests/cmake suite for CI builds.
@@ -40,6 +45,8 @@ target_link_libraries(glatter-test PRIVATE glatter)
4045

4146
# --- Internal Test Suite (Optional) ---
4247
# Only add the subdirectory if the option is enabled.
48+
# This is disabled by default to fix the CI build.
4349
if(GLATTER_BUILD_INTERNAL_TESTS)
50+
enable_testing()
4451
add_subdirectory(tests/cmake)
4552
endif()

tests/main.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <glatter/glatter.h>
2+
#include <stdio.h>
3+
4+
int main() {
5+
glatter_set_wsi(GLATTER_WSI_AUTO_VALUE);
6+
printf("Glatter integration test compiled and linked successfully.\n");
7+
8+
if (glatter_glGetString) {
9+
printf("A glatter function pointer is available.\n");
10+
}
11+
12+
return 0;
13+
}

0 commit comments

Comments
 (0)