NeotokyoRebuild / neo

NEOTOKYO Rebuild - Source SDK 2013 mod of NEOTOKYO
Other
11 stars 9 forks source link

Enable hot reload on windows #465

Open AdamTadeusz opened 1 week ago

AdamTadeusz commented 1 week ago

I just had a look at files changed and it seems that I somehow managed to make a mistake even though I'm only adding two lines ♿, even though the end result seems to be the same. @Rainyan do you think I should change the end of the first line to "${CMAKE_CXX_FLAGS_DEBUG}"), even though it works regardless of whether the bit at the end has or doesn't have DEBUG?

Rainyan commented 1 week ago

I just had a look at files changed and it seems that I somehow managed to make a mistake even though I'm only adding two lines ♿, even though the end result seems to be the same. @Rainyan do you think I should change the end of the first line to "${CMAKE_CXX_FLAGS_DEBUG}"), even though it works regardless of whether the bit at the end has or doesn't have DEBUG?

I'd have to spend some time reading CMake docs to answer that. Perhaps @Masterkatze would know better?

Masterkatze commented 1 week ago

We need to set cmake_minimum_required(VERSION 3.25) for this variable to work. If everyone is fine using more modern version instead of 3.18 then this is preferable way of enabling hot reload.

Rainyan commented 1 week ago

We need to set cmake_minimum_required(VERSION 3.25) for this variable to work. If everyone is fine using more modern version instead of 3.18 then this is preferable way of enabling hot reload.

I would be ok with this min version bump.

nullsystem commented 1 week ago

Although this is a Windows-specific PR, it does seem Linux SteamRT3 sniper container and Debian 12 are 3.25 also so I guess it's fine.

Rainyan commented 1 week ago

Although this is a Windows-specific PR, it does seem Linux SteamRT3 sniper container and Debian 12 are 3.25 also so I guess it's fine.

If CMake offers a non-complicated way to set platform-specific min CMake version, that could also be an option?

Masterkatze commented 2 days ago

I think it's better to add cmake_policy(SET CMP0141 NEW) before project call (at line 4) and use CMAKE_MSVC_DEBUG_INFORMATION_FORMAT variable instead of removing flags in CMAKE_CXX_FLAGS_DEBUG and setting /ZI manually.