Skip to content

Commit

Permalink
added pre compiled header (#66)
Browse files Browse the repository at this point in the history
* added pre compiled header
* added cmake version check and updated readme
  • Loading branch information
Mia75owo authored Nov 22, 2023
1 parent b65143e commit 8babd61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Hurrican/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,14 @@ include_directories(${CMAKE_SOURCE_DIR}/src/SDLPort)
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/glm)
add_executable(${PROJECT_NAME} ${HURRICAN_SOURCES})

# Enable pre compiled headers for way better compile times
OPTION(USE_PRECOMPILED_HEADERS "Enable pre compiled headers for better compile times" ON)
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16")
if(USE_PRECOMPILED_HEADERS)
target_precompile_headers(${PROJECT_NAME} PRIVATE src/stdafx.hpp)
endif()
endif()

OPTION(OPENMPT "Use OPENMPT for ImpulseTracker music file decoding" OFF)
IF(OPENMPT)
ADD_DEFINITIONS(-DUSE_OPENMPT)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ Sound
* -DOPENMPT=ON : Use the libopenmpt code for music (SDL2_mixer uses libmodplug while SDL_mixer uses the lower quality mikmod engine)

Generic
* -DFAST_RANDOM=OFF : Use standard C random function in place of the fast [LCG](https://en.wikipedia.org/wiki/Linear_congruential_generator)
* -DFAST_TRIG=ON : Use fast approximation for trigonometric functions
* -DDISABLE_EXCEPTIONS=ON : Disable exception handling to reduce binary size
* -DFAST_RANDOM=OFF : Use standard C random function in place of the fast [LCG](https://en.wikipedia.org/wiki/Linear_congruential_generator)
* -DFAST_TRIG=ON : Use fast approximation for trigonometric functions
* -DDISABLE_EXCEPTIONS=ON : Disable exception handling to reduce binary size
* -DUSE_PRECOMPILED_HEADERS=ON : Enable pre-compiled headers for better compile time

Debug
* -DDISABLE_MEMPOOLING=ON : Bypass pooled memory manager
Expand Down

0 comments on commit 8babd61

Please sign in to comment.