Skip to content

Commit

Permalink
build: cmake update
Browse files Browse the repository at this point in the history
Signed-off-by: Zone.N <[email protected]>
  • Loading branch information
MRNIU committed Nov 3, 2023
1 parent c33b98d commit 026aa67
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/3rd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ if (NOT CGAL_FOUND)
"Following https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html to install.")
endif ()

find_package(Boost COMPONENTS thread REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread)
if (NOT Boost_FOUND)
message(FATAL_ERROR "Boost not found.\n"
"Following https://www.boost.org to install.")
Expand Down
6 changes: 6 additions & 0 deletions test/system_test/demo2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ add_executable(${PROJECT_NAME}
target_include_directories(${PROJECT_NAME} PRIVATE
include
)

if (APPLE)
target_compile_definitions(${PROJECT_NAME} PRIVATE
GL_SILENCE_DEPRECATION
)
endif ()
2 changes: 1 addition & 1 deletion test/system_test/demo2d/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void draw_text(int x, int y, const char *format, ...) {
char buffer[256];
va_list args;
va_start(args, format);
int len = vsprintf(buffer, format, args);
int len = vsnprintf(buffer, 256, format, args);
va_end(args);
for (int i = 0; i < len; ++i) {
glutBitmapCharacter(GLUT_BITMAP_9_BY_15, buffer[i]);
Expand Down
6 changes: 6 additions & 0 deletions test/system_test/demo3d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ add_executable(demo3d
target_include_directories(${PROJECT_NAME} PRIVATE
include
)

if (APPLE)
target_compile_definitions(${PROJECT_NAME} PRIVATE
GL_SILENCE_DEPRECATION
)
endif ()
2 changes: 1 addition & 1 deletion test/system_test/demo3d/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static void draw_text(int x, int y, const char *format, ...) {
char buffer[256];
va_list args;
va_start(args, format);
int len = vsprintf(buffer, format, args);
int len = vsnprintf(buffer, 256, format, args);
va_end(args);
for (int i = 0; i < len; ++i) {
glutBitmapCharacter(GLUT_BITMAP_9_BY_15, buffer[i]);
Expand Down

0 comments on commit 026aa67

Please sign in to comment.