Skip to content

Commit 5d9f739

Browse files
adharshreimerix
andauthored
CMake patches for QNX Support (#178)
Patches to support building Starling on QNX --------- Co-authored-by: Christian Reimer <[email protected]>
1 parent fa93409 commit 5d9f739

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.cmake-format.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ lint:
5454
max_branches: 40 # Default target: 12
5555
max_arguments: 6 # Default target: 5
5656
max_localvars: 15
57-
max_statements: 125 # Default target: 50
57+
max_statements: 130 # Default target: 50
5858
encode:
5959
emit_byteorder_mark: false
6060
input_encoding: utf-8

CompileOptions.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ function(swift_set_compile_options)
135135
endif()
136136
endif()
137137

138+
if(CMAKE_SYSTEM_NAME MATCHES "QNX")
139+
list(APPEND all_flags -D_QNX_SOURCE)
140+
endif ()
141+
138142
list(APPEND all_flags
139143
-Wall
140144
-Wcast-align

TestTargets.cmake

+3
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ function(swift_add_test target)
299299
endif()
300300
if(x_LINK)
301301
target_link_libraries(${target} PRIVATE ${x_LINK})
302+
if(CMAKE_SYSTEM_NAME MATCHES "QNX")
303+
target_link_libraries(${target} PRIVATE regex)
304+
endif ()
302305
endif()
303306

304307
if (NOT ${PROJECT_NAME}_BUILD_TESTS)

0 commit comments

Comments
 (0)