Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved.cmake
raw| 1 | |
| 2 | add_library(empty1 empty.cpp) |
| 3 | |
| 4 | add_library(empty2 INTERFACE) |
| 5 | add_library(empty3 INTERFACE) |
| 6 | target_compile_features(empty3 INTERFACE cxx_std_11) |
| 7 | |
| 8 | target_link_libraries(empty1 |
| 9 | $<$<COMPILE_FEATURES:cxx_nullptr>:empty2> |
| 10 | empty3 |
| 11 | ) |
| 12 | # This, or populating the COMPILE_FEATURES property with a feature in the |
| 13 | # same standard as cxx_nullptr, solves the cycle above. |
| 14 | set_property(TARGET empty1 PROPERTY CXX_STANDARD 11) |