mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-31 22:21:13 +02:00
build all dll and executable at bin directory
This commit is contained in:
parent
78b430b172
commit
56a3c22ad9
10 changed files with 33 additions and 16 deletions
7
.github/workflows/install.yml
vendored
7
.github/workflows/install.yml
vendored
|
@ -1,11 +1,14 @@
|
||||||
|
---
|
||||||
name: Install
|
name: Install
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
@ -26,12 +29,12 @@ jobs:
|
||||||
|
|
||||||
- name: build and install library
|
- name: build and install library
|
||||||
run: |
|
run: |
|
||||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
sudo cmake --build build --target install
|
sudo cmake --build build --target install
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cmake -Stest -Bbuild -DTEST_INSTALLED_VERSION=1
|
run: cmake -S test -B build -DTEST_INSTALLED_VERSION=1
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cmake --build build --config Debug -j4
|
run: cmake --build build --config Debug -j4
|
||||||
|
|
5
.github/workflows/macos.yml
vendored
5
.github/workflows/macos.yml
vendored
|
@ -1,11 +1,14 @@
|
||||||
|
---
|
||||||
name: MacOS
|
name: MacOS
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
@ -25,7 +28,7 @@ jobs:
|
||||||
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||||
|
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=Debug
|
run: cmake -S test -B build -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cmake --build build -j4
|
run: cmake --build build -j4
|
||||||
|
|
5
.github/workflows/standalone.yml
vendored
5
.github/workflows/standalone.yml
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
name: Standalone
|
name: Standalone
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
@ -24,10 +25,10 @@ jobs:
|
||||||
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||||
|
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cmake -Sstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug
|
run: cmake -S standalone -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cmake --build build -j4
|
run: cmake --build build -j4
|
||||||
|
|
||||||
- name: run
|
- name: run
|
||||||
run: ./build/Greeter
|
run: ./build/bin/Greeter
|
||||||
|
|
5
.github/workflows/style.yml
vendored
5
.github/workflows/style.yml
vendored
|
@ -1,11 +1,14 @@
|
||||||
|
---
|
||||||
name: Style
|
name: Style
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
@ -29,7 +32,7 @@ jobs:
|
||||||
pip3 install cmake_format==0.6.11 pyyaml
|
pip3 install cmake_format==0.6.11 pyyaml
|
||||||
|
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cmake -Stest -Bbuild
|
run: cmake -S test -B build
|
||||||
|
|
||||||
- name: check style
|
- name: check style
|
||||||
run: cmake --build build --target check-format
|
run: cmake --build build --target check-format
|
||||||
|
|
5
.github/workflows/ubuntu.yml
vendored
5
.github/workflows/ubuntu.yml
vendored
|
@ -1,11 +1,14 @@
|
||||||
|
---
|
||||||
name: Ubuntu
|
name: Ubuntu
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
@ -26,7 +29,7 @@ jobs:
|
||||||
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||||
|
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug
|
run: cmake -S test -B build -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cmake --build build -j4
|
run: cmake --build build -j4
|
||||||
|
|
9
.github/workflows/windows.yml
vendored
9
.github/workflows/windows.yml
vendored
|
@ -4,9 +4,11 @@ name: Windows
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
@ -26,7 +28,7 @@ jobs:
|
||||||
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||||
|
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cmake -Stest -Bbuild # XXX -G "Visual Studio 16 2019" -T ClangCL
|
run: cmake -S test -B build # XXX -G "Visual Studio 16 2019" -T ClangCL
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: cmake --build build --config Debug -j4
|
run: cmake --build build --config Debug -j4
|
||||||
|
@ -34,8 +36,5 @@ jobs:
|
||||||
- name: test
|
- name: test
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
tree bin\Debug
|
tree
|
||||||
tree x64\Debug
|
|
||||||
dir Debug
|
|
||||||
Debug/GreeterTests.exe -s
|
|
||||||
ctest --build-config Debug --verbose
|
ctest --build-config Debug --verbose
|
||||||
|
|
|
@ -20,9 +20,10 @@ endif()
|
||||||
|
|
||||||
# ---- Project settings ----
|
# ---- Project settings ----
|
||||||
|
|
||||||
# XXX if(NOT MSVC)
|
|
||||||
option(BUILD_SHARED_LIBS "Create shared libraries if ON" YES)
|
option(BUILD_SHARED_LIBS "Create shared libraries if ON" YES)
|
||||||
# XXX endif()
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
|
@ -6,7 +6,7 @@ ROOT?=${CURDIR}/stagedir
|
||||||
GENERATOR?=Ninja
|
GENERATOR?=Ninja
|
||||||
|
|
||||||
#XXX export CXX=clang++
|
#XXX export CXX=clang++
|
||||||
export CPM_USE_LOCAL_PACKAGES=1
|
export CPM_USE_LOCAL_PACKAGES=0
|
||||||
export CPM_SOURCE_CACHE=${HOME}/.cache/CPM
|
export CPM_SOURCE_CACHE=${HOME}/.cache/CPM
|
||||||
|
|
||||||
.PHONY: update format all test standalone doc check clean distclean lock
|
.PHONY: update format all test standalone doc check clean distclean lock
|
||||||
|
|
|
@ -9,6 +9,10 @@ endif()
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake)
|
||||||
CPMUsePackageLock(package-lock.cmake)
|
CPMUsePackageLock(package-lock.cmake)
|
||||||
|
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
|
@ -61,7 +61,7 @@ endif()
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
add_test(greeterTests GreeterTests)
|
add_test(NAME greeterTests COMMAND GreeterTests)
|
||||||
|
|
||||||
# ---- code coverage ----
|
# ---- code coverage ----
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue