refactor: 💥 MP_UNITS_USE_LIBFMT renamed to MP_UNITS_USE_FMTLIB
This commit is contained in:
1 parent
b7bb1c605d
commit
cc9947bd8b
9 files changed
+22
-22
No files matched your search
+2
-2
@@ -31,8 +31,8 @@ message(STATUS "${projectPrefix}BUILD_CXX_MODULES: ${${projectPrefix}BUILD_CXX_M
|
||||
option(${projectPrefix}AS_SYSTEM_HEADERS "Exports library as system headers" OFF)
|
||||
message(STATUS "${projectPrefix}AS_SYSTEM_HEADERS: ${${projectPrefix}AS_SYSTEM_HEADERS}")
|
||||
|
||||
option(${projectPrefix}USE_LIBFMT "Enables usage of libfmt instead of the one from 'std'" ON)
|
||||
message(STATUS "${projectPrefix}USE_LIBFMT: ${${projectPrefix}USE_LIBFMT}")
|
||||
option(${projectPrefix}USE_FMTLIB "Enables usage of fmtlib instead of the 'std::format' facilities" ON)
|
||||
message(STATUS "${projectPrefix}USE_FMTLIB: ${${projectPrefix}USE_FMTLIB}")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
|
||||
@@ -78,10 +78,10 @@ add_mp_units_module(
|
||||
)
|
||||
|
||||
target_compile_definitions(
|
||||
mp-units-core ${${projectPrefix}TARGET_SCOPE} ${projectPrefix}USE_LIBFMT=$<BOOL:${${projectPrefix}USE_LIBFMT}>
|
||||
mp-units-core ${${projectPrefix}TARGET_SCOPE} ${projectPrefix}USE_FMTLIB=$<BOOL:${${projectPrefix}USE_FMTLIB}>
|
||||
)
|
||||
|
||||
if(${projectPrefix}USE_LIBFMT)
|
||||
if(${projectPrefix}USE_FMTLIB)
|
||||
if(NOT TARGET fmt::fmt)
|
||||
find_package(fmt REQUIRED)
|
||||
endif()
|
||||
|
||||
+3
-3
@@ -100,11 +100,11 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef MP_UNITS_USE_LIBFMT
|
||||
#define MP_UNITS_USE_LIBFMT 1
|
||||
#ifndef MP_UNITS_USE_FMTLIB
|
||||
#define MP_UNITS_USE_FMTLIB 1
|
||||
#endif
|
||||
|
||||
#if MP_UNITS_USE_LIBFMT
|
||||
#if MP_UNITS_USE_FMTLIB
|
||||
|
||||
MP_UNITS_DIAGNOSTIC_PUSH
|
||||
MP_UNITS_DIAGNOSTIC_IGNORE_UNREACHABLE
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if(MP_UNITS_USE_LIBFMT)
|
||||
if(MP_UNITS_USE_FMTLIB)
|
||||
find_dependency(fmt)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in new issue
Block a user