Ine8b6b7a, we relaxed the cmake version check down to 3.1, the first version to expose target_compile_features(). However, an error while testing that change improperly concluded that the change was OK. While target_compile_features() was indeed introduced in cmake 3.1, the actual feature we use it to test, cxx_std_11, was really introduced only with cmake-3.8, which explained the actual version that was requested beforee8b6b7a. Coming up with a working test is not as trivial as initially thought, so a better solution will have to be devised in the future. In the mean time, revert to the previously-working situation. This reverts commite8b6b7adc1. Reported-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
13 lines
336 B
CMake
13 lines
336 B
CMake
cmake_minimum_required(VERSION 3.8)
|
|
|
|
project(DummyImport CXX)
|
|
|
|
find_package(nlohmann_json REQUIRED)
|
|
|
|
add_executable(with_namespace_target main.cpp)
|
|
target_link_libraries(with_namespace_target nlohmann_json::nlohmann_json)
|
|
|
|
add_executable(without_namespace_target main.cpp)
|
|
target_link_libraries(without_namespace_target nlohmann_json)
|
|
|