Use NOT ... VERSION_LESS instead of VERSION_GREATER_EQUAL
authorJeff Bolz <jbolz@nvidia.com>
Thu, 30 Jan 2020 03:39:13 +0000 (21:39 -0600)
committerJeff Bolz <jbolz@nvidia.com>
Thu, 30 Jan 2020 03:39:13 +0000 (21:39 -0600)
CMakeLists.txt

index c5f9f8b..24e8950 100644 (file)
@@ -101,7 +101,7 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
                         -Wunused-parameter -Wunused-value  -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions)
     add_compile_options(-Wno-reorder)  # disable this from -Wall, since it happens all over.
     add_compile_options(-fno-rtti)
-    if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.0.0")
+    if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0")
         add_compile_options(-Werror=deprecated-copy)
     endif()
 elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")