From 2a221300de83ad4395033e7e0dd9c0fe3b890a5c Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Thu, 2 Feb 2023 12:58:03 -0500 Subject: [PATCH] {cmake} Combine target_include_directories Makes all include directories consistent. Turns GODOT_CPP_SYSTEM_HEADERS ON by default since that's what was already being done for ${GODOT_GDEXTENSION_DIR}. --- CMakeLists.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2350463d..aa187771 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ project(godot-cpp LANGUAGES CXX) cmake_minimum_required(VERSION 3.12) option(GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node." ON) -option(GODOT_CPP_SYSTEM_HEADERS "Expose headers as SYSTEM." OFF) +option(GODOT_CPP_SYSTEM_HEADERS "Expose headers as SYSTEM." ON) # Default build type is Debug in the SConstruct if("${CMAKE_BUILD_TYPE}" STREQUAL "") @@ -180,13 +180,6 @@ endif () target_include_directories(${PROJECT_NAME} ${GODOT_CPP_SYSTEM_HEADERS_ATTRIBUTE} PUBLIC include ${CMAKE_CURRENT_BINARY_DIR}/gen/include -) - -unset( GODOT_CPP_SYSTEM_HEADERS_ATTRIBUTE ) - -# Put godot headers as SYSTEM PUBLIC to exclude warnings from irrelevant headers -target_include_directories(${PROJECT_NAME} - SYSTEM PUBLIC ${GODOT_GDEXTENSION_DIR} )