CMake test for processor feature

后端 未结 2 2013
独厮守ぢ
独厮守ぢ 2021-01-24 14:04

I am wondering if it is possible for CMake to run tests like one might run with a configure script. Specifically I want to test if the system I am compiling on has support for

2条回答
  •  清歌不尽
    2021-01-24 14:52

    execute_process(COMMAND cat /proc/cpuinfo
        COMMAND head -n 19
        COMMAND tail -1
        COMMAND grep -c rdtscp
        OUTPUT_VARIABLE OUT)
    

提交回复
热议问题