1. cmake 的几个变量:CMAKE_INSTALL_PREFIX, CMAKE_CXX_FLAGS, CMAKE_EXE_LINKER_FLAGS
/PROJ/GR/share/Software/cmake/current/bin/cmake ../ -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=../mybin/ -DCMAKE_CXX_FLAGS="-I/PROJ/GR/share/Software/medinfo/01bin/samtools/samtools-0.1.6" -DCMAKE_EXE_LINKER_FLAGS="-L/PROJ/GR/share/Software/medinfo/01bin/samtools/samtools-0.1.6"
常见变量
CMAKE_CXX_FLAGS
CMAKE_C_FLAGS
CMAKE_EXE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS
CMAKE_C_COMPILER
CMAKE_CXX_COMPILER
往往系统会找到/usr/bin/下的gcc,c++,可能不是正确的版本而会出现编译错误,此时需要设置CMAKE_C_COMPILER和CMAKE_CXX_COMPILER
/PROJ/GR/share/Software/cmake/current/bin/cmake ../ -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=../mybin/ -DCMAKE_CXX_FLAGS="-I/PROJ/GR/share/Software/medinfo/01bin/samtools/samtools-0.1.6" -DCMAKE_EXE_LINKER_FLAGS="-L/PROJ/GR/share/Software/medinfo/01bin/samtools/samtools-0.1.6"
常见变量
CMAKE_CXX_FLAGS
CMAKE_C_FLAGS
CMAKE_EXE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS
CMAKE_C_COMPILER
CMAKE_CXX_COMPILER
往往系统会找到/usr/bin/下的gcc,c++,可能不是正确的版本而会出现编译错误,此时需要设置CMAKE_C_COMPILER和CMAKE_CXX_COMPILER