diff --git a/dlib/test/CMakeLists.txt b/dlib/test/CMakeLists.txt index a20640a85..f99bc1b06 100644 --- a/dlib/test/CMakeLists.txt +++ b/dlib/test/CMakeLists.txt @@ -185,7 +185,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) add_compile_options(-Wno-free-nonheap-object) endif() - if(${CMAKE_VERSION} VERSION_GREATER "3.8.0") + if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0") # strip debug symbols to make the binary smaller target_link_options(${target_name} PRIVATE $<$:-s>) endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index e8f720656..d40445d82 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -107,7 +107,7 @@ macro(add_example name) add_executable(${name} ${name}.cpp) target_link_libraries(${name} dlib::dlib ) - if(${CMAKE_VERSION} VERSION_GREATER "3.8.0") + if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0") # And strip symbols to make your binary smaller if you like. Certainly not # required though. target_link_options(${name} PRIVATE $<$:-s>)