Skip to content

Commit 2c25759

Browse files
committed
BUG: VERSION_LESS_EQUAL introduced in cmake 3.7
Older versions of cmake, according to documentation: https://cmake.org/cmake/help/v3.5/command/if.html , do not know VERSION_LESS_EQUAL, just VERSION_LESS. This leads to errors: CMake Error at somewhere/jsoncpp/CMakeLists.txt:18 (if): if given arguments: "3.5.1" "VERSION_LESS_EQUAL" "3.13.1" Unknown arguments specified Resolves: #866
1 parent deb6cca commit 2c25759

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
# continue to generate policy warnings "CMake Warning (dev)...Policy CMP0XXX is not set:"
1414
#
1515
set(JSONCPP_OLDEST_VALIDATED_POLICIES_VERSION "3.1.0")
16-
set(JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION "3.13.1")
16+
set(JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION "3.13.2")
1717
cmake_minimum_required(VERSION ${JSONCPP_OLDEST_VALIDATED_POLICIES_VERSION})
18-
if("${CMAKE_VERSION}" VERSION_LESS_EQUAL "${JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION}")
18+
if("${CMAKE_VERSION}" VERSION_LESS "${JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION}")
1919
#Set and use the newest available cmake policies that are validated to work
2020
set(JSONCPP_CMAKE_POLICY_VERSION "${CMAKE_VERSION}")
2121
else()

0 commit comments

Comments
 (0)