Skip to content

Commit f0d834b

Browse files
authored
Use VERSION_LESS for comparisons involving software version numbers
1 parent 63bbd7b commit f0d834b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ endif ()
147147

148148
# Only generate .def for dll on MSVC and always produce pdb files for debug and release
149149
if(MSVC)
150-
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.4)
150+
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.4)
151151
set(OpenBLAS_DEF_FILE "${PROJECT_BINARY_DIR}/openblas.def")
152152
endif()
153153
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi")
@@ -173,7 +173,7 @@ endif()
173173

174174
# Handle MSVC exports
175175
if(MSVC AND BUILD_SHARED_LIBS)
176-
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.4)
176+
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.4)
177177
include("${PROJECT_SOURCE_DIR}/cmake/export.cmake")
178178
else()
179179
# Creates verbose .def file (51KB vs 18KB)

0 commit comments

Comments
 (0)