Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)

project(Piccolo VERSION 0.1.0)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(BUILD_SHARED_LIBS OFF)

include(CMakeDependentOption)
Expand Down
2 changes: 1 addition & 1 deletion engine/3rdparty/JoltPhysics/Build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR "${CMAKE_SYSTEM_NAME}" STREQUAL
endif()

# Set general compiler flags
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")
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")
# Set compiler flags for various configurations
set(CMAKE_CXX_FLAGS_DEBUG "/GS /Od /Ob0 /RTC1")
set(CMAKE_CXX_FLAGS_RELEASE "/GS- /GL /Gy /O2 /Oi /Ot")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <Jolt/Core/FixedSizeFreeList.h>

JPH_SUPPRESS_WARNINGS_STD_BEGIN
#include <chrono>
#include <thread>
#include <mutex>
#include <condition_variable>
Expand Down
12 changes: 6 additions & 6 deletions engine/3rdparty/JoltPhysics/Jolt/Jolt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,12 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
set(JOLT_PHYSICS_SRC_FILES ${JOLT_PHYSICS_SRC_FILES} ${JOLT_PHYSICS_ROOT}/Jolt.natvis)
endif()

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Enable Precompiled Headers for Jolt
set_source_files_properties(${JOLT_PHYSICS_SRC_FILES} PROPERTIES COMPILE_FLAGS "/YuJolt/Jolt.h")
set(JOLT_PHYSICS_SRC_FILES ${JOLT_PHYSICS_SRC_FILES} ${JOLT_PHYSICS_ROOT}/pch.cpp)
set_source_files_properties(${JOLT_PHYSICS_ROOT}/pch.cpp PROPERTIES COMPILE_FLAGS "/YcJolt/Jolt.h")
endif()
# if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# # Enable Precompiled Headers for Jolt - DISABLED to fix build issues
# # set_source_files_properties(${JOLT_PHYSICS_SRC_FILES} PROPERTIES COMPILE_FLAGS "/YuJolt/Jolt.h")
# # set(JOLT_PHYSICS_SRC_FILES ${JOLT_PHYSICS_SRC_FILES} ${JOLT_PHYSICS_ROOT}/pch.cpp)
# # set_source_files_properties(${JOLT_PHYSICS_ROOT}/pch.cpp PROPERTIES COMPILE_FLAGS "/YcJolt/Jolt.h")
# endif()

# Group source files
source_group(TREE ${JOLT_PHYSICS_ROOT} FILES ${JOLT_PHYSICS_SRC_FILES})
Expand Down
2 changes: 1 addition & 1 deletion engine/3rdparty/tinyobjloader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#This configures the Cmake system with multiple properties, depending
#on the platform and configuration it is set to build in.
project(tinyobjloader)
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.20)
set(TINYOBJLOADER_SOVERSION 2)
set(TINYOBJLOADER_VERSION 2.0.0-rc.9)

Expand Down
2 changes: 1 addition & 1 deletion engine/source/editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(ENABLE_PHYSICS_DEBUG_RENDERER)
)
endif()

add_custom_command(TARGET ${TARGET_NAME} ${POST_BUILD_COMMANDS})
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD ${POST_BUILD_COMMANDS})

#precompile
#set global vari used by precompile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ namespace Piccolo
else
{
LOG_ERROR("Can't find target field.");
throw std::runtime_error("Can't find target field.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Piccolo
FILE* fontFile = fopen(fontFilePath, "rb");
if (fontFile == NULL)
{
std::runtime_error("debug draw cannot open font.ttf");
throw std::runtime_error("debug draw cannot open font.ttf");
}
fseek(fontFile, 0, SEEK_END);
uint64_t size = ftell(fontFile);
Expand All @@ -29,7 +29,7 @@ namespace Piccolo

if (!stbtt_InitFont(&fontInfo, fontBuffer, 0))
{
std::runtime_error("debug draw stb init font failed\n");
throw std::runtime_error("debug draw stb init font failed\n");
}

unsigned char* bitmap = (unsigned char*)calloc(m_bitmap_w * m_bitmap_h, sizeof(unsigned char));
Expand Down