首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

求大牛帮忙看一下配置的办法,该怎么处理

2013-11-20 
求大牛帮忙看一下配置的办法This project is using the CMake build system.-----------------------CMake

求大牛帮忙看一下配置的办法
This project is using the CMake build system.
-----------------------
CMake is a complete stand-alone platform-independent build-system 
replacing autoconf/autoheader/automake/etc. completely. 
It depends just on installed cmake (tested with version 2.2, 2.4 and 2.6)
See www.cmake.org for details.
-----------------------

USAGE: 
=====

1. install Cmake 2.42 (or newer) from www.cmake.org
   alternatively an rpm is available in /data/software/linux/develop/CMake/
   Note: Cmake 2.43 does NOT work due to .hh issues.
2. check out our additional CMake modules from CVS repository "CMakeModules"
   'cvs -d :pserver:<user name>@nil.mip.informatik.uni-kiel.de:/home/cvs/bias CMakeModules`
3. set the environment variable CMAKE_MODULE_PATH to point to the above 
   directory. 
   `export CMAKE_MODULE_PATH=~/cvs/CMakeModules`
4. check out BIAS source code
   `cvs -d :pserver:<user name>@nil.mip.informatik.uni-kiel.de:/home/cvs/bias BIAS`

   For building you have got the option of "in-place" or "out-of-place" builds. 求大牛帮忙看一下配置的办法,该怎么处理求大牛帮忙看一下配置的办法,该怎么处理


引用:
Quote: 引用:

2.使用CVS检出CMake模块;
3.设置环境变量(貌似这是类UNIX/LINUX系统的设置方式);
4.使用CVS检出BIAS源代码。



This project is using the CMake build system.
-----------------------
CMake is a complete stand-alone platform-independent build-system 
replacing autoconf/autoheader/automake/etc. completely. 
It depends just on installed cmake (tested with version 2.2, 2.4 and 2.6)
See www.cmake.org for details.
-----------------------

USAGE: 
=====

1. install Cmake 2.42 (or newer) from www.cmake.org
   alternatively an rpm is available in /data/software/linux/develop/CMake/
   Note: Cmake 2.43 does NOT work due to .hh issues.
2. check out our additional CMake modules from CVS repository "CMakeModules"
   'cvs -d :pserver:<user name>@nil.mip.informatik.uni-kiel.de:/home/cvs/bias CMakeModules`
3. set the environment variable CMAKE_MODULE_PATH to point to the above 
   directory. 
   `export CMAKE_MODULE_PATH=~/cvs/CMakeModules`
4. check out BIAS source code
   `cvs -d :pserver:<user name>@nil.mip.informatik.uni-kiel.de:/home/cvs/bias BIAS`

   For building you have got the option of "in-place" or "out-of-place" builds.

--- Linux ---
5.1 In-place example:
  cd <source dir>;  
  ccmake .  
    or for defaults:  cmake .
  make 

5.2 Or out-of-place builds 
    (very useful for different parallel build configurations: 
  mkdir <build dir>
  cd <build dir>
  ccmake <source dir>   
    or for defaults:  cmake <source dir>
  make

--- WIN32 ---
use cmake or CMakeSetupGui or run the configure.bat for default in-place build.
Set environment variables and proceed as described for Linux



Important Files:
===============

- CMakeLists.txt:
    overall configuration file

- BIASBuildSettings.cmake:


    SET commands for most important variables, i.e.
      PROJECT_NAME
      CMAKE_VERSION
      C(XX)_COMPILER
      C(XX)_FLAGS(_*)
      BUILD_TYPE
      BUILD_TOOL
    It can be included from third cmake projects.
    It is generated automatically by cmake ?
    
- bias_config.h.in / bias_config.h:
    bias_config.h.in is the source for bias_config.h.
    bias_config.h is generated in CMakeList.txt by the command
     INCLUDE(${BIAS_SOURCE_DIR}/CMakeModules/GenerateConfigHeader.cmake)
    bias_config.h contains preprocessor defines like HAVE_GTK and is included 
       in most header files (*.hh) to allow system dependent code usage 

- BIASConfig.cmake.in / BIASConfig.cmake:
    BIASConfig.cmake contains SET command for some basic variables like
      BIAS_INCLUDE_DIR, BIAS_LINK_DIRECTORIES, BIAS_BUILD_SETTINGS_FILE,
      BIAS_SOURCE_DIR, BIAS_LIBRARIES and BIAS_USE_FILE
    BIASConfig.cmake can be used by by third cmake projects to make these
      variables available.
    BIASConfig.cmake.in is the source for BIASConfig.cmake
    BIASConfig.cmake is generated in CMakeList.txt by the command
      CONFIGURE_FILE(${BIAS_SOURCE_DIR}/BIASConfig.cmake.in
                     ${BIAS_BINARY_DIR}/BIASConfig.cmake
                     @ONLY IMMEDIATE )

- BIASLibraryDepends.cmake:
    Contains the inter-library dependencies.
    They are attended manually.

- bias-config.in / bias-config:
    bias-config is a shell script for third projects not using cmake to get 
      hold of cflags, libs, cxxflags, ldflags, prefix
    It is generated from bias-config.in by the module 
      ${BIAS_SOURCE_DIR}/CMakeModules/GenerateConfigScript.cmake
    in CMakeList.txt





HOWTO:
======

1. Add more files to clean target:
   ------------------------------
   SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES 
                            "file_to_remove")


2. Do a optimized build:
   --------------------
   INCLUDE(${CMAKE_MODULE_PATH}/DefineFlags.cmake OPTIONAL)
   cmake -DCMAKE_BUILD_TYPE:STRING=<build type>

   available build types can be checked with:
     `cmake -LA .
[解决办法]
grep CMAKE_C_FLAGS_
[解决办法]
cut -d: -f 1
[解决办法]
sed -e s/CMAKE_C_FLAGS_//g`
   (substitute . with the source dir if required)

   the flags according to the different build types can be seen with
      cmake -LA <source_dir>


3. Use BIAS with another cmake project:
   ----------------------------------------
   Include the following into your CMakeList.txt:

    FIND_PACKAGE(BIAS REQUIRED)
    IF(NOT BIAS_FOUND)
      MESSAGE(FATAL_ERROR "BIAS lib not found.")
    ELSE(NOT BIAS_FOUND)
      INCLUDE(${BIAS_USE_FILE})
      # use -isystem flag for gtk to avoid warnigs from gtk.h
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_BUILD_SETTING_CXX_FLAGS}")
    ENDIF(NOT BIAS_FOUND)
   
   Set the environment variable BIAS_DIR or
   issue `cmake -DBIAS_DIR=<path to bias> <source dir>`




4. Use BIAS with a common Makefile:
   -------------------------------
   a: Install BIAS: 
      - configure bias using cmake, particularly set the install prefix
        (cmake -DCMAKE_INSTALL_PREFIX:PATH=<install prefix>)
      - build bias: make
      - install bias by:
           make install
   make postinstall
or
           make fullinstall   
   b: Make sure, the bias-config shell script is found by the makefile:
   export PATH=$PATH:<install prefix>/bin
   c: Use `bias-config --libs/--cflags/--cxxflags/--ldflags/--prefix`
           to get the compiler/linker flags needed to use bias
         
  
5. View compiler and linker options used:
   -------------------------------------
   cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON <source dir>


6. View all available options/variables:
   ------------------------------------
    ccmake <source dir> 
    type 't' to toggle display of advanced variables
   or 
    cmake -LA <source dir>


7. Build only some examples:
   ------------------------
   cmake -DBUILD_EXAMPLES:BOOL=OFF <source dir>
   make
   cmake -DBUILD_EXAMPLES:BOOL=ON <source dir>
   make -C <path to examples dir>


8. Remove Cache:
   ------------
   cd <build dir>
   rm CMakeCache.txt




------------------------

Jan Woetzel, Felix Woelk
12/2003, 06/2004, 08/2004

You can change configuration easily with ccmakes GUI.
Useful options: 

* CMAKE_BUILD_TYPE 
generate Debug build with CMAKE_CXX_FLAGS_*
e.g. - Debug   to use CMAKE_CXX_FLAGS_DEBUG
     - Release to use CMAKE_CXX_FLAGS_RELEASE

* CMAKE_VERBOSE_MAKEFILE
generate more 'verbose' makefile including compiler calls instead of default "SILENT" 

*BUILD_SHARED_LIBS
produce shared libraries (.so) instead of static (.a)

Almost complete docu of cmake commands: 
  cmake --help-full  and  www.cmake.org

12/2003, 06/2004
Jan Woetzel (jw@mip.informatik.uni-kiel.de)




大牛再帮我看看那,,稍微解释一下,这个是readme的完整内容,迷惑的很

我很不清楚啊,为啥这个图形库咋还需要cvs的支持?

[解决办法]
这文档写得很清晰了,连make在哪里都告诉你了。
唉……像俺们拿到个东西,还要到处找工具,找依赖库……你这多幸福啊。

引用:
Quote: 引用:

学习下cvs


大牛再帮我看看那,,稍微解释一下,这个是readme的完整内容,迷惑的很

[解决办法]
不是说需要cvs的支持,而是它的源代码是通过cvs下载下来的。

热点排行