This document describes the method of constructing packages_cpm.txt
file with a concrete example.
- Set architecture like
ARCHITECTURE, amd64;
. - Set build environment like
BUILD_ENV, CPM_ENV;
,BUILD_ENV, SYSTEM_ENV;
orBUILD_ENV, DOCKER_ENV, ./cpm/build_env/docker/ubuntu18.04_for_build_gcc;
. - Set installation mode like
INSTALL_MODE, source;
,INSTALL_MODE, archive;
orINSTALL_MODE, auto;
- Set installing packages that you want.
When building the libraries from source file, set INSTALL_MODE, source;
.
- sample/packages_cpm_00.txt
ARCHITECTURE, amd64; BUILD_ENV, DOCKER_ENV, ./cpm/build_env/docker/ubuntu18.04_for_build_gcc; INSTALL_MODE, source; m4, ==1.4.15; gmp, ==6.1.0; mpfr, ==3.1.4; mpc, ==1.0.3; isl, ==0.18; gcc, ==12.1.0;
- run
sample/packages_cpm_00.txt
cpm/exe -p sample/packages_cpm_00.txt
To change the installation mode within the same packages_cpm.txt
, set INSTALL_MODE
once more. (About the scopy of INSTALL_MODE
, see INSTALL_MODE)
- sample/packages_cpm_02.txt
ARCHITECTURE, amd64; BUILD_ENV, DOCKER_ENV, ./cpm/build_env/docker/ubuntu18.04_for_build_gcc; INSTALL_MODE, archive; m4, ==1.4.15; gmp, ==6.1.0; mpfr, ==3.1.4; mpc, ==1.0.3; isl, ==0.18; INSTALL_MODE, source; gcc, ==12.1.0;
- run
sample/packages_cpm_02.txt
cpm/exe -p sample/packages_cpm_02.txt
When building a gcc-based environment, first set the gcc archive, then set the required libraries.
- sample/packages_cpm_03a.txt
ARCHITECTURE, amd64; BUILD_ENV, CPM_ENV; INSTALL_MODE, auto; /* * set gcc as a base environmet */ gcc, ==12.1.0; /* * install what you want */ cmake, ==3.*.*; googletest, ==1.*.*;
- run
sample/packages_cpm_03a.txt
cpm/exe -p sample/packages_cpm_03a.txt
In this case, the latest versions of cmake
and googletest
among the matching versions of each library will be installed.
- sample/packages_cpm_03b.txt
ARCHITECTURE, amd64; BUILD_ENV, CPM_ENV; INSTALL_MODE, auto; /* * set gcc as a base environmet */ gcc, ==12.1.0; /* * install what you want */ cmake; googletest;
- run
sample/packages_cpm_03b.txt
cpm/exe -p sample/packages_cpm_03b.txt