Skip to content

Commit

Permalink
Enable Catch2 3.7.1 usage only with c++14 standard or higher
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Oct 2, 2024
1 parent 8805ce5 commit 0fa06a4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -805,11 +805,6 @@ VP_OPTION(WITH_STBIMAGE "" "" "Use std_image built-in third-party
VP_OPTION(WITH_TINYEXR "" "" "Use tinyexr built-in third-party" "" ON)

if(VISP_CXX_STANDARD LESS VISP_CXX_STANDARD_11)
if(WITH_CATCH2)
message(WARNING "catch2 3rd party needs at least c++11 standard compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable catch2 usage turning WITH_CATCH2=OFF.")
unset(WITH_CATCH2)
set(WITH_CATCH2 OFF CACHE BOOL "Use catch2 built-in library" FORCE)
endif()
if(WITH_POLOLU)
message(WARNING "pololu 3rd party needs at least c++11 standard compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable pololu usage turning WITH_POLOLU=OFF.")
unset(WITH_POLOLU)
Expand All @@ -827,6 +822,14 @@ if(VISP_CXX_STANDARD LESS VISP_CXX_STANDARD_11)
endif()
endif()

if(VISP_CXX_STANDARD LESS VISP_CXX_STANDARD_14)
if(WITH_CATCH2)
message(WARNING "catch2 3rd party needs at least c++14 standard compiler flag while you have set c++${USE_CXX_STANDARD}. Thus we disable catch2 usage turning WITH_CATCH2=OFF.")
unset(WITH_CATCH2)
set(WITH_CATCH2 OFF CACHE BOOL "Use catch2 built-in library" FORCE)
endif()
endif()

# ----------------------------------------------------------------------------
# Check for specific functions. Should be after cxx standard detection in VISPDetectCXXStandard.cmake and
# potential modification depending on pcl, realsense2, libfranka
Expand Down

0 comments on commit 0fa06a4

Please sign in to comment.