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,一切正常了,产生到了预期位置。

  • 相关阅读:
    Python内建GUI模块Tkinter(二)
    Python内建GUI模块Tkinter(一)
    验证码处理
    Python小练习
    Python中csv模块解析
    Python中xlutils解析
    Python中xlwt解析
    Python中pandas模块解析
    Python中matplotlib模块解析
    一款软件同时管理MySQL,MongoDB数据库
  • 原文地址:https://www.cnblogs.com/lansh/p/1665910.html
Copyright © 2011-2022 走看看