1.CPU是64位还是32位(CMAKE_SIZEOF_VOID_P)
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(requir-04 LANGUAGES CXX)
add_executable(arch-dependent arch-dependent.cpp)
if (CMKE_SIZEOF_VOID_P EQUAL 8)
target_compile_definitions(arch-dependent PUBLIC "IS_64_BIT_ARCH")
message(STATUS "Target is 64 bits")
else (