Enable cmake formatting (#53)

* enable cmake formatting

* update style check workflow

* update readme

* update wording
This commit is contained in:
Lars Melchior 2020-08-11 11:10:01 +02:00 committed by GitHub
parent 4e87a9410a
commit 866ae707e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 142 additions and 85 deletions

View file

@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(GreeterStandalone
LANGUAGES CXX
)
project(GreeterStandalone LANGUAGES CXX)
# --- Import tools ----
@ -16,15 +14,10 @@ CPMAddPackage(
NAME cxxopts
GITHUB_REPOSITORY jarro2783/cxxopts
VERSION 2.2.0
OPTIONS
"CXXOPTS_BUILD_EXAMPLES Off"
"CXXOPTS_BUILD_TESTS Off"
OPTIONS "CXXOPTS_BUILD_EXAMPLES Off" "CXXOPTS_BUILD_TESTS Off"
)
CPMAddPackage(
NAME Greeter
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..
)
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
# ---- Create standalone executable ----
@ -32,9 +25,6 @@ file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)
add_executable(GreeterStandalone ${sources})
set_target_properties(GreeterStandalone PROPERTIES
CXX_STANDARD 17
OUTPUT_NAME "Greeter"
)
set_target_properties(GreeterStandalone PROPERTIES CXX_STANDARD 17 OUTPUT_NAME "Greeter")
target_link_libraries(GreeterStandalone Greeter cxxopts)