2022-06-01 14:47:39 +08:00
|
|
|
cmake_minimum_required(VERSION 3.11)
|
|
|
|
|
|
|
|
project(GTAV-Classes)
|
|
|
|
|
|
|
|
include(CheckIncludeFileCXX)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
|
|
|
set(CMAKE_REQUIRED_QUIET ON)
|
|
|
|
|
|
|
|
set(OK TRUE)
|
|
|
|
|
2022-08-26 04:06:34 +08:00
|
|
|
file(GLOB_RECURSE HEADERS "*.hpp")
|
2022-06-01 14:47:39 +08:00
|
|
|
|
|
|
|
message(STATUS "")
|
|
|
|
|
|
|
|
foreach(HEADER ${HEADERS})
|
2022-11-09 05:11:50 +08:00
|
|
|
get_filename_component(FILENAME ${HEADER} NAME)
|
|
|
|
check_include_file_cxx("${HEADER}" ${FILENAME}_OK)
|
|
|
|
|
|
|
|
if(${FILENAME}_OK)
|
|
|
|
message(STATUS "${FILENAME} OK!")
|
|
|
|
else()
|
|
|
|
set(OK FALSE)
|
|
|
|
message(SEND_ERROR "${FILENAME} failed to compile!")
|
|
|
|
endif()
|
2022-06-01 14:47:39 +08:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
message(STATUS "")
|
|
|
|
|
|
|
|
if(NOT OK)
|
2022-11-09 05:11:50 +08:00
|
|
|
file(READ "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeError.log" LOG)
|
|
|
|
message(STATUS ${LOG})
|
2022-06-01 14:47:39 +08:00
|
|
|
endif()
|
2022-08-26 04:06:34 +08:00
|
|
|
|