mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 16:46:16 +00:00
Merge branch 'momo5502:main' into main
This commit is contained in:
@@ -160,10 +160,6 @@ if(MSVC)
|
||||
/INCREMENTAL:NO
|
||||
)
|
||||
|
||||
momo_add_c_and_cxx_release_compile_options(
|
||||
/Ob2
|
||||
)
|
||||
|
||||
add_compile_definitions(
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
_CRT_NONSTDC_NO_WARNINGS
|
||||
@@ -214,24 +210,6 @@ endif()
|
||||
|
||||
##########################################
|
||||
|
||||
set(OPT_DEBUG "-O0 -g")
|
||||
set(OPT_RELEASE "-O3 -g")
|
||||
|
||||
if(MSVC)
|
||||
set(OPT_DEBUG "/Od /Ob0 /Zi")
|
||||
set(OPT_RELEASE "/O2 /Ob2 /Zi")
|
||||
|
||||
add_link_options(/DEBUG)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${OPT_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OPT_DEBUG}")
|
||||
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OPT_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OPT_RELEASE}")
|
||||
|
||||
##########################################
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
momo_add_c_and_cxx_compile_options(/MP)
|
||||
endif()
|
||||
|
||||
14
cmake/sccache.cmake
Normal file
14
cmake/sccache.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
include_guard()
|
||||
|
||||
find_program(SCCACHE sccache)
|
||||
|
||||
if (SCCACHE)
|
||||
file(TO_CMAKE_PATH "${SCCACHE}" SCCACHE)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE})
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE})
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
|
||||
|
||||
if(POLICY CMP0141)
|
||||
cmake_policy(SET CMP0141 NEW)
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user