cmake will not compile to C++ 11 standard

前端 未结 4 1452
面向向阳花
面向向阳花 2021-02-03 12:26

I\'m new to C++ and have been struggling with compiling/making/linking/building/whatever, lets see if somebody can help me out. I did some searches and found other people with

4条回答
  •  日久生厌
    2021-02-03 12:39

    Since the current cmake release is 3.10, I thought it may be appropriate to identify the newer method. While the suggestion to use add_compiler_

    For anyone looking here at a more modern version of cmake (3.1+), The most appropriate answer is not to identify a version of a given compiler but to let CMAKE know what features need to be available.

    target_compile_features(engine
        PRIVATE cxx_range_for
        )
    

提交回复
热议问题