Skip to content

Commit

Permalink
CI fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed Dec 27, 2023
1 parent e0ce644 commit 88b4921
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
28 changes: 15 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ message(STATUS "CMake system name: ${CMAKE_SYSTEM_NAME}")
set(BOX2D_LENGTH_UNIT_PER_METER "1.0" CACHE STRING "Length units per meter")
set(BOX2D_MAX_POLYGON_VERTICES "8" CACHE STRING "Maximum number of polygon vertices (affects performance)")

set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED YES)
set(CMAKE_C_EXTENSIONS YES)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_VERBOSE_MAKEFILE ON)

# Hide internal functions
# todo need to investigate this more
# https://gcc.gnu.org/wiki/Visibility
# set(CMAKE_C_VISIBILITY_PRESET hidden)
# set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)

# The Box2D library uses simde https://github.com/simd-everywhere/simde
add_subdirectory(extern/simde)
add_subdirectory(src)
Expand All @@ -29,19 +44,6 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
option(BOX2D_DOCS "Build the Box2D documentation" OFF)
option(BOX2D_PROFILE "Enable profiling with Tracy" OFF)

# Hide internal functions
# todo not sure if this matters in C
# https://gcc.gnu.org/wiki/Visibility
# set(CMAKE_C_VISIBILITY_PRESET hidden)
# set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_VERBOSE_MAKEFILE ON)

set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
set(CMAKE_CXX_STANDARD 17)

if (MSVC AND WIN32)
# Enable edit and continue only in debug due to perf hit in release
# add_link_options($<$<CONFIG:Debug>:/INCREMENTAL>)
Expand Down
4 changes: 2 additions & 2 deletions samples/collection/sample_joints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class MotorJoint : public Sample
m_jointId = b2CreateMotorJoint(m_worldId, &jointDef);
}

m_go = false;
m_go = true;
m_time = 0.0f;
}

Expand Down Expand Up @@ -589,7 +589,7 @@ class WheelJoint : public Sample
b2BodyId groundId = b2CreateBody(m_worldId, &b2_defaultBodyDef);

m_enableLimit = true;
m_enableMotor = false;
m_enableMotor = true;
m_motorSpeed = 2.0f;
m_motorTorque = 5.0f;

Expand Down
4 changes: 2 additions & 2 deletions samples/collection/sample_ray_cast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ class RayCast : public Sample
ImGui::Separator();

ImGui::Text("mouse btn 1: ray cast");
ImGui::Text("mouse btn 1 + shft: rotate");
ImGui::Text("mouse btn 1 + ctrl: translate");
ImGui::Text("mouse btn 1 + shft: translate");
ImGui::Text("mouse btn 1 + ctrl: rotate");

ImGui::End();
}
Expand Down
7 changes: 0 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@ target_include_directories(box2d

target_link_libraries(box2d PRIVATE simde)

# box2d uses C17
set_target_properties(box2d PROPERTIES
C_STANDARD 17
C_STANDARD_REQUIRED YES
C_EXTENSIONS YES
)

if (MSVC)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# target_compile_options(box2d PRIVATE /W4 /WX)
Expand Down

0 comments on commit 88b4921

Please sign in to comment.