Skip to content

Commit d638ddb

Browse files
committed
Disable BUILD_INDEX64_EXT_API by default if the CMake version is less than 3.18.0
1 parent fe5c252 commit d638ddb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,18 @@ else()
107107
set(LAPACKELIB "lapacke")
108108
set(TMGLIB "tmglib")
109109
endif()
110-
# By default build extended _64 API for supported compilers only
110+
111+
# By default build extended _64 API for supported compilers only. This needs
112+
# CMake >= 3.18! Let's disable it by default for CMake < 3.18.
113+
if(CMAKE_VERSION VERSION_LESS "3.18")
114+
set(INDEX64_EXT_API_DEFAULT OFF)
115+
else()
116+
set(INDEX64_EXT_API_DEFAULT ON)
117+
endif()
111118
set(INDEX64_EXT_API_COMPILERS "Intel|GNU")
112-
option(BUILD_INDEX64_EXT_API "Build Index-64 API as extended API with _64 suffix (needs CMake >= 3.18)" ON)
119+
option(BUILD_INDEX64_EXT_API
120+
"Build Index-64 API as extended API with _64 suffix (needs CMake >= 3.18)"
121+
${INDEX64_EXT_API_DEFAULT})
113122
message(STATUS "Build Index-64 API as extended API with _64 suffix: ${BUILD_INDEX64_EXT_API}")
114123

115124
include(GNUInstallDirs)

0 commit comments

Comments
 (0)