This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new f24dea2 ARROW-9351: [C++] Fix CMake 3.2 detection in option value
validation
f24dea2 is described below
commit f24dea22842174ca47f4ad166099e19f26026e68
Author: Sutou Kouhei <[email protected]>
AuthorDate: Wed Jul 8 09:13:19 2020 +0900
ARROW-9351: [C++] Fix CMake 3.2 detection in option value validation
Closes #7669 from kou/cpp-cmake32-options
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/cmake_modules/DefineOptions.cmake | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/cpp/cmake_modules/DefineOptions.cmake
b/cpp/cmake_modules/DefineOptions.cmake
index 8d0a87b..3b22984 100644
--- a/cpp/cmake_modules/DefineOptions.cmake
+++ b/cpp/cmake_modules/DefineOptions.cmake
@@ -398,11 +398,12 @@ macro(validate_config)
set(possible_values ${${name}_OPTION_POSSIBLE_VALUES})
set(value "${${name}}")
if(possible_values)
- if(NOT CMAKE_VERSION VERSION_LESS "3.3"
- AND NOT ("${value}" IN_LIST possible_values))
- message(
- FATAL_ERROR "Configuration option ${name} got invalid value
'${value}'. "
- "Allowed values: ${${name}_OPTION_ENUM}.")
+ if(NOT CMAKE_VERSION VERSION_LESS "3.3")
+ if(NOT "${value}" IN_LIST possible_values)
+ message(
+ FATAL_ERROR "Configuration option ${name} got invalid value
'${value}'. "
+ "Allowed values: ${${name}_OPTION_ENUM}.")
+ endif()
endif()
endif()
endforeach()