mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-30 21:51:12 +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
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
env:
|
||||
|
@ -26,12 +29,12 @@ jobs:
|
|||
|
||||
- name: build and install library
|
||||
run: |
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||
sudo cmake --build build --target install
|
||||
rm -rf build
|
||||
|
||||
- name: configure
|
||||
run: cmake -Stest -Bbuild -DTEST_INSTALLED_VERSION=1
|
||||
run: cmake -S test -B build -DTEST_INSTALLED_VERSION=1
|
||||
|
||||
- name: build
|
||||
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
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
env:
|
||||
|
@ -25,7 +28,7 @@ jobs:
|
|||
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
|
||||
- name: configure
|
||||
run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=Debug
|
||||
run: cmake -S test -B build -DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
- name: build
|
||||
run: cmake --build build -j4
|
||||
|
|
5
.github/workflows/standalone.yml
vendored
5
.github/workflows/standalone.yml
vendored
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
name: Standalone
|
||||
|
||||
on:
|
||||
|
@ -24,10 +25,10 @@ jobs:
|
|||
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
|
||||
- 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
|
||||
run: cmake --build build -j4
|
||||
|
||||
- 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
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
env:
|
||||
|
@ -29,7 +32,7 @@ jobs:
|
|||
pip3 install cmake_format==0.6.11 pyyaml
|
||||
|
||||
- name: configure
|
||||
run: cmake -Stest -Bbuild
|
||||
run: cmake -S test -B build
|
||||
|
||||
- name: check style
|
||||
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
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
env:
|
||||
|
@ -26,7 +29,7 @@ jobs:
|
|||
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
|
||||
- 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
|
||||
run: cmake --build build -j4
|
||||
|
|
9
.github/workflows/windows.yml
vendored
9
.github/workflows/windows.yml
vendored
|
@ -4,9 +4,11 @@ name: Windows
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
env:
|
||||
|
@ -26,7 +28,7 @@ jobs:
|
|||
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
|
||||
|
||||
- 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
|
||||
run: cmake --build build --config Debug -j4
|
||||
|
@ -34,8 +36,5 @@ jobs:
|
|||
- name: test
|
||||
run: |
|
||||
cd build
|
||||
tree bin\Debug
|
||||
tree x64\Debug
|
||||
dir Debug
|
||||
Debug/GreeterTests.exe -s
|
||||
tree
|
||||
ctest --build-config Debug --verbose
|
||||
|
|
|
@ -20,9 +20,10 @@ endif()
|
|||
|
||||
# ---- Project settings ----
|
||||
|
||||
# XXX if(NOT MSVC)
|
||||
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)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
|
|
@ -6,7 +6,7 @@ ROOT?=${CURDIR}/stagedir
|
|||
GENERATOR?=Ninja
|
||||
|
||||
#XXX export CXX=clang++
|
||||
export CPM_USE_LOCAL_PACKAGES=1
|
||||
export CPM_USE_LOCAL_PACKAGES=0
|
||||
export CPM_SOURCE_CACHE=${HOME}/.cache/CPM
|
||||
|
||||
.PHONY: update format all test standalone doc check clean distclean lock
|
||||
|
|
|
@ -9,6 +9,10 @@ endif()
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/CPM.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)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
|
|
@ -61,7 +61,7 @@ endif()
|
|||
|
||||
enable_testing()
|
||||
|
||||
add_test(greeterTests GreeterTests)
|
||||
add_test(NAME greeterTests COMMAND GreeterTests)
|
||||
|
||||
# ---- code coverage ----
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue