diff --git a/3rdparty/carotene/CMakeLists.txt b/3rdparty/carotene/CMakeLists.txt index bfa9368d79d58b7f972a0d1f1c25487e8af9465c..528fcf62e15bbf0c22c43128d67618732a524b7e 100644 --- a/3rdparty/carotene/CMakeLists.txt +++ b/3rdparty/carotene/CMakeLists.txt @@ -20,8 +20,11 @@ if(CMAKE_COMPILER_IS_GNUCC) # - matchTemplate about 5-10% # - goodFeaturesToTrack 10-20% # - cornerHarris 30% for some cases - - set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0") + set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") + else() + set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipa-cp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") + endif() endif() add_library(carotene_objs OBJECT diff --git a/3rdparty/carotene/hal/CMakeLists.txt b/3rdparty/carotene/hal/CMakeLists.txt index 819954de13781edceb424f91e10a3f834c6e0e6c..b94d8511e8ad463f5df714cd80934089c3d67d36 100644 --- a/3rdparty/carotene/hal/CMakeLists.txt +++ b/3rdparty/carotene/hal/CMakeLists.txt @@ -88,7 +88,11 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${carotene_defs}) # matchTemplate about 5-10% # goodFeaturesToTrack 10-20% # cornerHarris 30% for some cases - set_source_files_properties(impl.cpp $ COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0") + set_source_files_properties(impl.cpp $ COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") + else() + set_source_files_properties(impl.cpp $ COMPILE_FLAGS "--param ipa-cp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") + endif() # set_source_files_properties(impl.cpp $ COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") endif()