zoukankan      html  css  js  c++  java
  • CMake,如何将临时文件产生到一个特定的目录里面

    How can I build multiple modes without switching ?

    To build multiple modes (e.g. Debug and Release) in one shot without constantly running cmake -DCMAKE_BUILD_TYPE=Debug and cmake -DCMAKE_BUILD_TYPE=Release in source tree create a directory for builds eg.:

    Project-directory/
      /Build
    

    Inside you can place as many target directories for out-of-source build modes as you want, e.g.:

    Project-directory/
      /Build
        /Debug
        /Release
    

    In each of these directories issue a command (assuming that you have CMakeLists.txt directly in Project-directory)

    cmake -DCMAKE_BUILD_TYPE=type_of_build ../../
    

    to create a cmake cache configured for requested build type.

    Now you can make each build just by entering appropriate directory and executing a make command.

    到这里为止,应该可以将所有的零时文件产生到各自目录里面了。但是实际运行情况却还是老样子,还是产生到了根目录。通过上网查找,发现了一个可能因素:CMakeCache.txt文件。

    于是将根目录下面的这个文件删除掉,OK,一切正常了,产生到了预期位置。

  • 相关阅读:
    腾讯云通信服务端返回签名
    synchronized同步语句块
    synchronized同步方法
    springjdbc的批量操作
    yield方法
    暂停线程
    【jdk源码学习】HashMap
    diamond types are not supported at this language level
    【java基础系列】一、常用命令行
    Socket通信综合示例
  • 原文地址:https://www.cnblogs.com/lansh/p/1665910.html
Copyright © 2011-2022 走看看