Skip to content

Commit

Permalink
Added compile options for Dev and Test build types
Browse files Browse the repository at this point in the history
  • Loading branch information
UE4SS committed Sep 27, 2023
1 parent 80b1e5f commit b2e69c1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
set(CMAKE_C_FLAGS_GAME_WIN64_SHIPPING "${UE4SS_SHIPPING_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_DEBUG "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_DEBUG "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_DEV "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_DEV "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_TEST "${UE4SS_SHIPPING_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_TEST "${UE4SS_SHIPPING_COMPILER_FLAGS}")
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
set(PRIVATE_COMPILE_OPTIONS "$<IF:$<COMPILE_LANGUAGE:ASM_MASM>,,-g;-gcodeview;-fcolor-diagnostics;-Wno-unknown-pragmas;-Wno-unused-parameter;-fms-extensions;-Wignored-attributes;>")
set(PRIVATE_LINK_OPTIONS "$<IF:$<COMPILE_LANGUAGE:ASM_MASM>,,-g>")
Expand All @@ -47,6 +51,10 @@ elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
set(CMAKE_C_FLAGS_GAME_WIN64_SHIPPING "${UE4SS_SHIPPING_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_DEBUG "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_DEBUG "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_DEV "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_DEV "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_TEST "${UE4SS_SHIPPING_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_TEST "${UE4SS_SHIPPING_COMPILER_FLAGS}")
# add_compile_definitions(printf_s=printf)
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
set(PRIVATE_COMPILE_OPTIONS "$<IF:$<COMPILE_LANGUAGE:ASM_MASM>,,-fms-extensions>")
Expand All @@ -56,6 +64,10 @@ elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
set(CMAKE_C_FLAGS_GAME_WIN64_SHIPPING "${UE4SS_SHIPPING_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_DEBUG "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_DEBUG "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_DEV "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_DEV "${UE4SS_DEBUG_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS_GAME_WIN64_TEST "${UE4SS_SHIPPING_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS_GAME_WIN64_TEST "${UE4SS_SHIPPING_COMPILER_FLAGS}")
endif ()

add_compile_options("${PRIVATE_COMPILE_OPTIONS}")
Expand Down

0 comments on commit b2e69c1

Please sign in to comment.