代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/2048-cpp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.7)
project(2048 CXX)
enable_testing()
set(SOURCES src/2048.cpp src/gameboard.cpp src/gameboard-graphics.cpp src/game.cpp src/game-graphics.cpp src/game-input.cpp src/game-pregamemenu.cpp src/global.cpp src/loadresource.cpp src/menu.cpp src/menu-graphics.cpp src/saveresource.cpp src/scores.cpp src/scores-graphics.cpp src/statistics.cpp src/statistics-graphics.cpp src/tile.cpp src/tile-graphics.cpp)
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
string(APPEND CMAKE_CXX_FLAGS " -Wall")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
string(APPEND CMAKE_CXX_FLAGS " -Wall")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel)
if(WIN32)
string(APPEND CMAKE_CXX_FLAGS " /W3")
else()
string(APPEND CMAKE_CXX_FLAGS " -w2")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL PGI)
string(APPEND CMAKE_CXX_FLAGS " -a")
endif()
set(CMAKE_CXX_STANDARD 14)
add_executable(2048 ${SOURCES})
target_include_directories(2048 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/headers/)
# --- test
if(UNIX)
add_test(NAME basic COMMAND sh -c "echo 4 | $<TARGET_FILE:2048>")
endif()
# --- install
install(TARGETS 2048
RUNTIME DESTINATION bin)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data
DESTINATION ${CMAKE_INSTALL_PREFIX})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。