Command

1. configure

cmake ..

cmake .. -DUSE_MATH=ON

cmake -S . -B build

cmake -B build -G "Visual Studio 16 2019" -A [Win32|x64] -DCMAKE_GENERATOR_TOOLSET=[v140| v141]

cmake -B build -G "Visual Studio 15 2017" -DCMAKE_GENERATOR_TOOLSET=[v140|v141]

cmake -B build -G "Visual Studio 15 2017 Win64" -DCMAKE_GENERATOR_TOOLSET=[v140|v141]

cmake -B build -G "Visual Studio 15 2017" -DCMAKE_GENERATOR_TOOLSET=[v140|v141] -DCPACK_SYSTEM_NAME=win32-debug

2. generate

cmake --build .

cmake --build . --config [Debug|Release]

cmake --build . --target ${PROJECT_NAME}

cmake --build . --config [Debug|Release] --target ${TARGET}

3. install

cmake --install . --prefix ./install

cmake --install . --prefix ./install --config Debug

4. test

ctest -C Debug

ctest -C Debug -N

ctest -C Debug -V

ctest -C Debug -VV

ctest -VV -C $config_type --test-dir ./$config_type

5. cpack

cpack

cpack -G [NSIS | 7Z | ZIP | TGZ]

cpack -G NSIS --config CPackConfig.cmake

cpack -G NSIS -C Debug --config CPackConfig.cmake

cpack -G NSIS -C Release --config CPackConfig.cmake

cpack -G ZIP -B ./$config_type -C $config_type --config ./$config_type/CPackConfig.cmake
Copyright © gendloop 2024 all right reserved,powered by Gitbook该文件修订时间: 2026-04-03 03:43:16

results matching ""

    No results matching ""