Skip to content

Commit c2a4708

Browse files
committed
Termux fixes
1 parent 5bdf2ae commit c2a4708

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ set(CMAKE_CXX_STANDARD 20)
1010
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1111
set(CPACK_GENERATOR "TGZ")
1212
set(CPACK_PACKAGE_FILE_NAME "hypercpu-${CMAKE_BUILD_TYPE}")
13+
# Termux issues.
14+
if("${CMAKE_SOURCE_DIR}" MATCHES "\/data\/data\/com\.termux*")
15+
add_definitions(-DSPDLOG_USE_STD_FORMAT=ON)
16+
endif()
1317

1418
find_package(GTest REQUIRED)
1519
find_package(argparse REQUIRED)
@@ -25,6 +29,8 @@ check_ipo_supported(RESULT SUPPORTED OUTPUT ERR)
2529

2630
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE)
2731

32+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-macro-redefined")
33+
2834
# TODO: Enable UBSan and fix all errors
2935
if ("${CMAKE_BUILD_TYPE}" STREQUAL "debug")
3036
message(STATUS "Enabled debug flags")
@@ -52,4 +58,4 @@ add_custom_target(format
5258
COMMAND ${CLANG_FORMAT} -i ${CPP_SOURCES}
5359
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
5460
COMMENT "Formatting code with clang-format and cmake-format"
55-
)
61+
)

0 commit comments

Comments
 (0)