Skip to content

Commit

Permalink
Fix Alpine build
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterkatze committed Dec 1, 2023
1 parent 85ed9ee commit 1f6afa6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ project(OpenXRay)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#set(CMAKE_VERBOSE_MAKEFILE ON)

option(CMAKE_VERBOSE_MAKEFILE "Verbose build output" OFF)
message(STATUS "CMAKE_VERBOSE_MAKEFILE: ${CMAKE_VERBOSE_MAKEFILE}")

if (CMAKE_VERBOSE_MAKEFILE)
set(CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDOUT)
Expand Down
8 changes: 5 additions & 3 deletions Externals/LuaJIT-proj/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ else()
set(CCOPT_OPT_LEVEL "-O2")
endif()

set(CCOPT "${CMAKE_C_FLAGS} ${CCOPT_OPT_LEVEL}")

if (USE_ADDRESS_SANITIZER)
set(CCOPT "${CCOPT_OPT_LEVEL} -fno-stack-protector")
set(CCOPT "${CCOPT} -fno-stack-protector")
else()
set(CCOPT "${CCOPT_OPT_LEVEL} -fomit-frame-pointer -fno-stack-protector")
set(CCOPT "${CCOPT} -fomit-frame-pointer -fno-stack-protector")
endif()

set(CCOPT "${CCOPT} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U_FORTIFY_SOURCE")
Expand Down Expand Up @@ -137,7 +139,7 @@ set(CCOPTIONS "${CCOPT};${XCFLAGS}")
target_compile_options(xrLuaJIT PRIVATE ${CCOPTIONS})

execute_process(
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ${CCOPTIONS} -E lj_arch.h -dM
COMMAND ${CMAKE_C_COMPILER} ${CCOPTIONS} -E lj_arch.h -dM
WORKING_DIRECTORY "${LUAJIT_DIR}"
OUTPUT_VARIABLE TESTARCH_OUTPUT
ERROR_VARIABLE TESTARCH_ERROR
Expand Down
2 changes: 1 addition & 1 deletion cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ function(xr_install_file tgt)
RUNTIME DESTINATION Release/
)
endif()
endfunction()
endfunction()

0 comments on commit 1f6afa6

Please sign in to comment.