Skip to content

Commit 2ea3258

Browse files
committed
build(cmake): add option to control
system included
1 parent d1ce305 commit 2ea3258

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED true)
88
#
99
# Project details
1010
#
11-
project("stdsharp" VERSION 0.2.4 LANGUAGES CXX)
11+
project("stdsharp" VERSION 0.2.5 LANGUAGES CXX)
1212

1313
init_proj()
1414

@@ -52,12 +52,16 @@ if(NOT is_subproject)
5252
set(is_standalone YES)
5353
else()
5454
set(is_standalone NO)
55-
target_include_as_system(${PROJECT_NAME} INTERFACE)
5655
endif()
5756

5857
include(CMakeDependentOption)
5958

6059
CMAKE_DEPENDENT_OPTION(STDSHARP_BUILD_TEST "Whether to build test" ON "${is_standalone}" OFF)
60+
CMAKE_DEPENDENT_OPTION(STDSHARP_INCLUDE_AS_SYSTEM "Whether to include stdsharp headers as system headers" OFF "${is_standalone}" ON)
61+
62+
if(STDSHARP_INCLUDE_AS_SYSTEM)
63+
target_include_as_system(${PROJECT_NAME} INTERFACE)
64+
endif()
6165

6266
if(STDSHARP_BUILD_TEST)
6367
#

0 commit comments

Comments
 (0)