Skip to content

Commit

Permalink
Add CMAKE configuration for C standard version (#340)
Browse files Browse the repository at this point in the history
* Add C standard configuration

Signed-off-by: acuadros95 <[email protected]>

* Update C define

Signed-off-by: acuadros95 <[email protected]>

* Remove CMAKE conditional

Signed-off-by: acuadros95 <[email protected]>

---------

Signed-off-by: acuadros95 <[email protected]>
  • Loading branch information
Acuadros95 authored Feb 16, 2023
1 parent 139e05a commit 8dfd8dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ set(UCLIENT_HARD_LIVELINESS_CHECK_TIMEOUT 10000 CACHE STRING "Set the hard livel
# Off-standard features and tweaks
option(UCLIENT_TWEAK_XRCE_WRITE_LIMIT "This feature uses a tweak to allow XRCE WRITE DATA submessages grater than 64 kB." ON)

set(UCLIENT_C_STANDARD 99 CACHE STRING "Version of the C language used to build the library")

###############################################################################
# Dependencies
###############################################################################
Expand Down Expand Up @@ -319,7 +321,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
SOVERSION
${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
C_STANDARD
99
${UCLIENT_C_STANDARD}
C_STANDARD_REQUIRED
YES
POSITION_INDEPENDENT_CODE
Expand Down

0 comments on commit 8dfd8dc

Please sign in to comment.