Skip to content

Commit 6d74648

Browse files
DwayneGitdwayne
authored andcommitted
convert c_standard to an optional pass in argument (#286)
Signed-off-by: dwayne <dewilliam0327@gmail.com> Co-authored-by: dwayne <dewilliam0327@gmail.com> (cherry picked from commit 21ed0ae)
1 parent 9648737 commit 6d74648

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

rmw_microxrcedds_c/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ set(RMW_UXRCE_STREAM_HISTORY_OUTPUT "" CACHE STRING
9393
"This value sets the number of MTUs to output buffer. It will be ignored if RMW_UXRCE_STREAM_HISTORY_INPUT is blank. \
9494
If set, must be a power of two.")
9595

96+
set(RMW_UXRCE_C_STANDARD 99 CACHE STRING "Version of the C language used to build the library")
97+
9698
if(RMW_UXRCE_STREAM_HISTORY_INPUT STREQUAL "" OR RMW_UXRCE_STREAM_HISTORY_OUTPUT STREQUAL "")
9799
unset(RMW_UXRCE_STREAM_HISTORY_INPUT)
98100
unset(RMW_UXRCE_STREAM_HISTORY_OUTPUT)
@@ -294,7 +296,7 @@ target_include_directories(${PROJECT_NAME}
294296

295297
set_target_properties(${PROJECT_NAME} PROPERTIES
296298
C_STANDARD
297-
99
299+
${RMW_UXRCE_C_STANDARD}
298300
C_STANDARD_REQUIRED
299301
YES
300302
)

0 commit comments

Comments
 (0)