How to set a CMake option() at command line

后端 未结 3 421
情歌与酒
情歌与酒 2020-12-07 13:01

I created a CMakeLists.txt that contains the following

project(P4V)
cmake_minimum_required(VERSION 2.6)

option(BUILD_STATIC_LIBS \"Build the static library\         


        
3条回答
  •  温柔的废话
    2020-12-07 13:39

    this works for me:

    cmake -D DBUILD_SHARED_LIBS=ON DBUILD_STATIC_LIBS=ON DBUILD_TESTS=ON ..
    

提交回复
热议问题