You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to change the CmakeLists.txt file so that it can support Cmake version 2.8.12? If not directly, then I'd appreciate it if someone can tell me what features of the library are enabled by 3.1 and I'll see if I can try to work without them
The text was updated successfully, but these errors were encountered:
ok looks like Cmake 2.8 prevents you from setting the version number in the project declaration, which in turn prevents stops write_basic_package_version_file from working. commenting out these sections seems to let cmake compile it thanks
okay I managed to figure out a workaround that let me run write_basic_package_version_file() using Cmake 2.8.12 , which basically has me using the VERSION parameter as well and changing SameMajorVersion to AnyNewerVersion. Dunno if that breaks anything but for now it's compiling and running my code so it probably works
these are the specific parts I changed, Gonna close it then
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)
##
## PROJECT
## name and version
##
project(nlohmann_json)
set (NLOHMANN_JSON_VERSION 3.6.1)
...
...
##
## INSTALL
## install header files, generate and install cmake config files for find_package()
##
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE} VERSION ${NLOHMANN_JSON_VERSION} COMPATIBILITY AnyNewerVersion
)
Is it possible to change the CmakeLists.txt file so that it can support Cmake version 2.8.12? If not directly, then I'd appreciate it if someone can tell me what features of the library are enabled by 3.1 and I'll see if I can try to work without them
The text was updated successfully, but these errors were encountered: