Skip to content

Commit

Permalink
use different compile options for release/debug
Browse files Browse the repository at this point in the history
  • Loading branch information
askme765cs committed Jan 8, 2023
1 parent 540a044 commit 798d862
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,12 @@ endif()

if(VITA)
#set(VITA_FLAGS "-Ofast -mcpu=cortex-a9 -mfpu=neon -fgraphite-identity -floop-parallelize-all -floop-nest-optimize -ftree-parallelize-loops=3 -flto -fno-peephole2 -DNDEBUG")
set(VITA_FLAGS "-O2 -g -mcpu=cortex-a9 -mfpu=neon -fno-peephole2 -DNDEBUG")
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(VITA_FLAGS "-Ofast -mcpu=cortex-a9 -mfpu=neon -fgraphite-identity -floop-parallelize-all -floop-nest-optimize -ftree-parallelize-loops=3 -fno-peephole2 -DNDEBUG -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
else()
set(VITA_FLAGS "-O2 -g -mcpu=cortex-a9 -mfpu=neon -fno-peephole2 -DNDEBUG")
add_definitions(-D_DEBUG)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VITA_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VITA_FLAGS}")

Expand All @@ -322,7 +327,6 @@ if(VITA)

include("${CMAKE_SOURCE_DIR}/vita/vita.cmake")
add_definitions(-D__unix)
add_definitions(-D_DEBUG)
target_compile_definitions(${EXECUTABLE_NAME} PRIVATE _POSIX_C_SOURCE=200809)
endif()

Expand Down
7 changes: 6 additions & 1 deletion vita/vita.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ set(EXECUTABLE_NAME fallout2-ce)
set(VITA_VERSION "01.00")

set(VITA_MKSFOEX_FLAGS "${VITA_MKSFOEX_FLAGS}")
vita_create_self(${EXECUTABLE_NAME}.self ${EXECUTABLE_NAME})

if(CMAKE_BUILD_TYPE STREQUAL "Release")
vita_create_self(${EXECUTABLE_NAME}.self ${EXECUTABLE_NAME} STRIPPED)
else()
vita_create_self(${EXECUTABLE_NAME}.self ${EXECUTABLE_NAME})
endif()

vita_create_vpk(${EXECUTABLE_NAME}.vpk ${VITA_TITLEID} ${EXECUTABLE_NAME}.self
VERSION ${VITA_VERSION}
Expand Down

0 comments on commit 798d862

Please sign in to comment.