Skip to content

Commit

Permalink
Use new minify flag + add -Ofast
Browse files Browse the repository at this point in the history
  • Loading branch information
SwadicalRag committed Jun 9, 2019
1 parent 3bd2961 commit 5026e6d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
ENDIF (NOT CMAKE_BUILD_TYPE)

macro(remove_cxx_flag flag)
string(REPLACE "${flag}" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
endmacro()

remove_cxx_flag("-O3")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")

SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
#MESSAGE("CMAKE_CXX_FLAGS_DEBUG="+${CMAKE_CXX_FLAGS_DEBUG})

Expand Down Expand Up @@ -440,7 +447,7 @@ add_custom_command(
add_custom_command(
DEPENDS bullet3_lua.wasm
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3.min.lua
COMMAND wasm2lua ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3_lua.wasm ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3.min.lua -b ${CMAKE_CURRENT_SOURCE_DIR}/bindings.idl --libmode --minify
COMMAND wasm2lua ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3_lua.wasm ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3.min.lua -b ${CMAKE_CURRENT_SOURCE_DIR}/bindings.idl --libmode --minify 3
)

add_custom_command(
Expand All @@ -452,7 +459,7 @@ add_custom_command(
add_custom_command(
DEPENDS bullet3_lua.wasm
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3.pure.min.lua
COMMAND wasm2lua ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3_lua.wasm ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3.pure.min.lua -b ${CMAKE_CURRENT_SOURCE_DIR}/bindings.idl --libmode --pureLua --minify
COMMAND wasm2lua ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3_lua.wasm ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3.pure.min.lua -b ${CMAKE_CURRENT_SOURCE_DIR}/bindings.idl --libmode --pureLua --minify 3
)

add_custom_target(bullet3_lua ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/bullet3.lua)
Expand Down

0 comments on commit 5026e6d

Please sign in to comment.