Skip to content

Commit

Permalink
changed OS detection in CMakeLists.txt
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Mayer <[email protected]>
  • Loading branch information
WideAwakeTN committed Feb 18, 2023
1 parent 54db1d3 commit 92cf9dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ endif()

option(USE_PI_MUTEX "Enables priority inheritance mutexes." ON)
if(USE_PI_MUTEX)
if(WIN32 OR APPLE)
message("Mutexes with priority inheritance are not supported on your system. Using std mutexes.")
else()
if(CMAKE_SYSTEM_NAME STREQUAL Linux OR
CMAKE_SYSTEM_NAME STREQUAL VxWorks OR
CMAKE_SYSTEM_NAME STREQUAL QNX)
target_compile_definitions(${PROJECT_NAME} PUBLIC "RCPPUTILS_USE_PIMUTEX")
else()
message("Mutexes with priority inheritance are not supported on your system. Using std mutexes.")
endif()
endif()

Expand Down

0 comments on commit 92cf9dc

Please sign in to comment.