Cleaner CMake
All checks were successful
Bin2CPP / Build & Test Debug (ASAN, LSAN, UBSAN) (Unity Build: ON) (push) Successful in 1m37s
Bin2CPP / Build & Test Debug (ASAN, LSAN, UBSAN) (Unity Build: OFF) (push) Successful in 1m38s
Bin2CPP / Build & Test RelWithDebInfo (ASAN, LSAN, UBSAN) (Unity Build: ON) (push) Successful in 1m45s
Bin2CPP / Build & Test RelWithDebInfo (ASAN, LSAN, UBSAN) (Unity Build: OFF) (push) Successful in 1m45s
Bin2CPP / Build & Test Release (Unity Build: OFF) (push) Successful in 39s
Bin2CPP / Clang Format Checks (push) Successful in 9s
Bin2CPP / Build & Test Release (Unity Build: ON) (push) Successful in 2m56s
All checks were successful
Bin2CPP / Build & Test Debug (ASAN, LSAN, UBSAN) (Unity Build: ON) (push) Successful in 1m37s
Bin2CPP / Build & Test Debug (ASAN, LSAN, UBSAN) (Unity Build: OFF) (push) Successful in 1m38s
Bin2CPP / Build & Test RelWithDebInfo (ASAN, LSAN, UBSAN) (Unity Build: ON) (push) Successful in 1m45s
Bin2CPP / Build & Test RelWithDebInfo (ASAN, LSAN, UBSAN) (Unity Build: OFF) (push) Successful in 1m45s
Bin2CPP / Build & Test Release (Unity Build: OFF) (push) Successful in 39s
Bin2CPP / Clang Format Checks (push) Successful in 9s
Bin2CPP / Build & Test Release (Unity Build: ON) (push) Successful in 2m56s
This commit is contained in:
@@ -4,41 +4,22 @@ project(Bin2CPP VERSION 0.1.0
|
||||
DESCRIPTION "Bin2CPP"
|
||||
LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||
|
||||
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/CMake/CustomTargets.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/CMake/FindDependencies.cmake)
|
||||
|
||||
set(CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug" CACHE STRING "" FORCE)
|
||||
|
||||
option(BUILD_TESTS OFF)
|
||||
option(ASAN OFF)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/CMake/FindDependencies.cmake)
|
||||
|
||||
foreach(CONFIG DEBUG RELWITHDEBINFO)
|
||||
if("${CMAKE_EXE_LINKER_FLAGS_${CONFIG}}" MATCHES "/INCREMENTAL:NO")
|
||||
string(REGEX REPLACE "/INCREMENTAL([^:]|$)" ""
|
||||
CMAKE_EXE_LINKER_FLAGS_${CONFIG}
|
||||
"${CMAKE_EXE_LINKER_FLAGS_${CONFIG}}")
|
||||
endif()
|
||||
endforeach()
|
||||
option(COVERAGE OFF)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_OPTIMIZE_DEPENDENCIES 1)
|
||||
|
||||
add_compile_options(${BIN2CPP_CXX_FLAGS})
|
||||
add_link_options(${BIN2CPP_EXE_LINK_FLAGS})
|
||||
|
||||
add_compile_definitions(
|
||||
$<$<CONFIG:Release>:BIN2CPP_OPTIMIZED>
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:BIN2CPP_NOT_OPTIMIZED>
|
||||
$<$<PLATFORM_ID:Windows>:BIN2CPP_WINDOWS>
|
||||
$<$<PLATFORM_ID:Linux>:BIN2CPP_LINUX>
|
||||
$<$<PLATFORM_ID:Windows>:NOMINMAX>
|
||||
$<$<PLATFORM_ID:Windows>:WIN32_LEAN_AND_MEAN>)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user