Skip to content

Commit

Permalink
cmake: propagate compiler flag changes to parent scope
Browse files Browse the repository at this point in the history
fixes last known regression and hopefully the odd crashes we've been
having #2063
  • Loading branch information
lynxlynxlynx committed Mar 26, 2024
1 parent ddce87c commit 605519e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmake/Helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ FUNCTION(ADD_FLAG_IF_SUPPORTED)
IF(_VALUE)
SET(_FLAG "${_FLAG}=${_VALUE}")
ENDIF ()
STRING(APPEND CMAKE_CXX_FLAGS " ${_FLAG}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FLAG}" PARENT_SCOPE)
ENDIF ()
ENDFUNCTION()

Expand Down Expand Up @@ -121,6 +121,9 @@ FUNCTION(CONFIGURE_COMPILER)
STRING(APPEND CMAKE_CXX_FLAGS " /fp:fast")
ENDIF()

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" PARENT_SCOPE)
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}" PARENT_SCOPE)
USE_SCCACHE_IF_AVAILABLE()
ENDFUNCTION()

Expand Down
2 changes: 1 addition & 1 deletion gemrb/core/Geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace GemRB {
// with a maximum error of 0.1620 degrees
// rcor's rational approximation that can be arbitrarily
// improved if we ever want greater precision
float pseudoAtan2(float y, float x)
static float pseudoAtan2(float y, float x)
{
static const uint32_t signMask = 0x80000000;
static const float b = 0.596227F;
Expand Down

0 comments on commit 605519e

Please sign in to comment.