File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ project(Piccolo VERSION 0.1.0)
44
55set (CMAKE_CXX_STANDARD 17)
66set (CMAKE_CXX_STANDARD_REQUIRED ON )
7+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
78set (BUILD_SHARED_LIBS OFF )
89
910include (CMakeDependentOption )
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR "${CMAKE_SYSTEM_NAME}" STREQUAL
4242 endif ()
4343
4444 # Set general compiler flags
45- set (CMAKE_CXX_FLAGS "/std:c++17 /Zc:__cplusplus /GR- /Gm- /Wall /WX /EHsc /MP /nologo /diagnostics:classic /FC /fp:except- /Zc:inline /Zi /DWIN32 /D_WINDOWS /DUNICODE /D_UNICODE" )
45+ set (CMAKE_CXX_FLAGS "/std:c++17 /Zc:__cplusplus /GR- /Gm- /Wall /WX /Wv:18 / EHsc /MP /nologo /diagnostics:classic /FC /fp:except- /Zc:inline /Zi /DWIN32 /D_WINDOWS /DUNICODE /D_UNICODE" )
4646 # Set compiler flags for various configurations
4747 set (CMAKE_CXX_FLAGS_DEBUG "/GS /Od /Ob0 /RTC1" )
4848 set (CMAKE_CXX_FLAGS_RELEASE "/GS- /GL /Gy /O2 /Oi /Ot" )
Original file line number Diff line number Diff line change 77#include < Jolt/Core/FixedSizeFreeList.h>
88
99JPH_SUPPRESS_WARNINGS_STD_BEGIN
10+ #include < chrono>
1011#include < thread>
1112#include < mutex>
1213#include < condition_variable>
Original file line number Diff line number Diff line change @@ -385,12 +385,12 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
385385 set (JOLT_PHYSICS_SRC_FILES ${JOLT_PHYSICS_SRC_FILES} ${JOLT_PHYSICS_ROOT} /Jolt.natvis)
386386endif ()
387387
388- if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "MSVC" )
389- # Enable Precompiled Headers for Jolt
390- set_source_files_properties (${JOLT_PHYSICS_SRC_FILES} PROPERTIES COMPILE_FLAGS "/YuJolt/Jolt.h" )
391- set (JOLT_PHYSICS_SRC_FILES ${JOLT_PHYSICS_SRC_FILES} ${JOLT_PHYSICS_ROOT} /pch.cpp)
392- set_source_files_properties (${JOLT_PHYSICS_ROOT} /pch.cpp PROPERTIES COMPILE_FLAGS "/YcJolt/Jolt.h" )
393- endif ()
388+ # if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
389+ # # Enable Precompiled Headers for Jolt - DISABLED to fix build issues
390+ # # set_source_files_properties(${JOLT_PHYSICS_SRC_FILES} PROPERTIES COMPILE_FLAGS "/YuJolt/Jolt.h")
391+ # # set(JOLT_PHYSICS_SRC_FILES ${JOLT_PHYSICS_SRC_FILES} ${JOLT_PHYSICS_ROOT}/pch.cpp)
392+ # # set_source_files_properties(${JOLT_PHYSICS_ROOT}/pch.cpp PROPERTIES COMPILE_FLAGS "/YcJolt/Jolt.h")
393+ # endif()
394394
395395# Group source files
396396source_group (TREE ${JOLT_PHYSICS_ROOT} FILES ${JOLT_PHYSICS_SRC_FILES} )
Original file line number Diff line number Diff line change 22#This configures the Cmake system with multiple properties, depending
33#on the platform and configuration it is set to build in.
44project (tinyobjloader)
5- cmake_minimum_required (VERSION 3.2 )
5+ cmake_minimum_required (VERSION 3.20 )
66set (TINYOBJLOADER_SOVERSION 2)
77set (TINYOBJLOADER_VERSION 2.0.0-rc.9)
88
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ if(ENABLE_PHYSICS_DEBUG_RENDERER)
4141)
4242endif ()
4343
44- add_custom_command (TARGET ${TARGET_NAME} ${POST_BUILD_COMMANDS} )
44+ add_custom_command (TARGET ${TARGET_NAME} POST_BUILD ${POST_BUILD_COMMANDS} )
4545
4646#precompile
4747#set global vari used by precompile
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ namespace Piccolo
7979 else
8080 {
8181 LOG_ERROR (" Can't find target field." );
82+ throw std::runtime_error (" Can't find target field." );
8283 }
8384 }
8485
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ namespace Piccolo
1616 FILE* fontFile = fopen (fontFilePath, " rb" );
1717 if (fontFile == NULL )
1818 {
19- std::runtime_error (" debug draw cannot open font.ttf" );
19+ throw std::runtime_error (" debug draw cannot open font.ttf" );
2020 }
2121 fseek (fontFile, 0 , SEEK_END);
2222 uint64_t size = ftell (fontFile);
@@ -29,7 +29,7 @@ namespace Piccolo
2929
3030 if (!stbtt_InitFont (&fontInfo, fontBuffer, 0 ))
3131 {
32- std::runtime_error (" debug draw stb init font failed\n " );
32+ throw std::runtime_error (" debug draw stb init font failed\n " );
3333 }
3434
3535 unsigned char * bitmap = (unsigned char *)calloc (m_bitmap_w * m_bitmap_h, sizeof (unsigned char ));
You can’t perform that action at this time.
0 commit comments