diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d0098d2b4d..b24593b8b1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Externals/LuaJIT-proj/CMakeLists.txt b/Externals/LuaJIT-proj/CMakeLists.txt index 190bf019a5c..36abe653fd1 100644 --- a/Externals/LuaJIT-proj/CMakeLists.txt +++ b/Externals/LuaJIT-proj/CMakeLists.txt @@ -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") @@ -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 diff --git a/cmake/utils.cmake b/cmake/utils.cmake index c667d9997f1..e6f75c9057f 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -120,4 +120,4 @@ function(xr_install_file tgt) RUNTIME DESTINATION Release/ ) endif() -endfunction() \ No newline at end of file +endfunction()