Merge pull request #113 from build-cpp/editorconfig

Add `.editorconfig` and linting
main
Duncan Ogilvie 2 years ago committed by GitHub
commit bdd9d393d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,7 +19,7 @@ AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true AlwaysBreakTemplateDeclarations: true
BinPackArguments: true BinPackArguments: true
BinPackParameters: true BinPackParameters: true
BraceWrapping: BraceWrapping:
AfterClass: false AfterClass: false
AfterControlStatement: false AfterControlStatement: false
AfterEnum: false AfterEnum: false

@ -0,0 +1,24 @@
root = true
[*]
end_of_line = lf
trim_trailing_whitespace = true
charset = utf-8
[*.{c,h,cpp,hpp,toml}]
indent_style = space
insert_final_newline = true
[{CMakeLists.txt, *.cmake}]
indent_style = tab
tab_width = 8
insert_final_newline = true
# Exclude the third_party folder
[/third_party/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

@ -1,9 +1,9 @@
name: CMake name: build
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build: cmake:
# Skip building pull requests from the same repository # Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }} if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

@ -3,7 +3,7 @@ name: lint
on: [push] on: [push]
jobs: jobs:
lint: clang-format:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -24,4 +24,14 @@ jobs:
run: | run: |
# Instructions for fixing the formatting errors # Instructions for fixing the formatting errors
echo -e "\n\033[0;31mTo fix the formatting, run:\nclang-format -style=file -i \$(git ls-files \"*.c\" \"*.h\" \"*.cpp\" \"*.hpp\")\033[0m\n" echo -e "\n\033[0;31mTo fix the formatting, run:\nclang-format -style=file -i \$(git ls-files \"*.c\" \"*.h\" \"*.cpp\" \"*.hpp\")\033[0m\n"
exit 1 exit 1
editorconfig:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@d4fca16fc71adef10fbe101903b654449fa9570c # master 2022-03-15

@ -1,78 +1,78 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
if(NOT CMAKE_SCRIPT_MODE_FILE) if(NOT CMAKE_SCRIPT_MODE_FILE)
message(FATAL_ERROR "Usage: cmake -P bump_version.cmake [1.2.3]") message(FATAL_ERROR "Usage: cmake -P bump_version.cmake [1.2.3]")
endif() endif()
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake.toml") if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake.toml")
message(FATAL_ERROR "Cannot find cmake.toml") message(FATAL_ERROR "Cannot find cmake.toml")
endif() endif()
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/cmkr.cmake") if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/cmkr.cmake")
message(FATAL_ERROR "Cannot find cmkr.cmake") message(FATAL_ERROR "Cannot find cmkr.cmake")
endif() endif()
# Validate branch # Validate branch
find_package(Git REQUIRED) find_package(Git REQUIRED)
execute_process(COMMAND "${GIT_EXECUTABLE}" branch --show-current OUTPUT_VARIABLE GIT_BRANCH) execute_process(COMMAND "${GIT_EXECUTABLE}" branch --show-current OUTPUT_VARIABLE GIT_BRANCH)
string(STRIP "${GIT_BRANCH}" GIT_BRANCH) string(STRIP "${GIT_BRANCH}" GIT_BRANCH)
if(NOT GIT_BRANCH STREQUAL "main") if(NOT GIT_BRANCH STREQUAL "main")
message(FATAL_ERROR "You need to be on the main branch, you are on: ${GIT_BRANCH}") message(FATAL_ERROR "You need to be on the main branch, you are on: ${GIT_BRANCH}")
endif() endif()
file(READ "${CMAKE_SOURCE_DIR}/cmake.toml" CMAKE_TOML) file(READ "${CMAKE_SOURCE_DIR}/cmake.toml" CMAKE_TOML)
string(FIND "${CMAKE_TOML}" "[project]" PROJECT_INDEX) string(FIND "${CMAKE_TOML}" "[project]" PROJECT_INDEX)
string(SUBSTRING "${CMAKE_TOML}" ${PROJECT_INDEX} -1 CMAKE_TOML_PROJECT) string(SUBSTRING "${CMAKE_TOML}" ${PROJECT_INDEX} -1 CMAKE_TOML_PROJECT)
set(SEMVER_REGEX "([0-9]+)\\.([0-9]+)\\.([0-9]+)") set(SEMVER_REGEX "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
set(VERSION_REGEX "version = \"${SEMVER_REGEX}\"") set(VERSION_REGEX "version = \"${SEMVER_REGEX}\"")
if(CMAKE_TOML_PROJECT MATCHES "${VERSION_REGEX}") if(CMAKE_TOML_PROJECT MATCHES "${VERSION_REGEX}")
set(MAJOR "${CMAKE_MATCH_1}") set(MAJOR "${CMAKE_MATCH_1}")
set(MINOR "${CMAKE_MATCH_2}") set(MINOR "${CMAKE_MATCH_2}")
set(PATCH "${CMAKE_MATCH_3}") set(PATCH "${CMAKE_MATCH_3}")
set(OLDVERSION "${MAJOR}.${MINOR}.${PATCH}") set(OLDVERSION "${MAJOR}.${MINOR}.${PATCH}")
else() else()
message(FATAL_ERROR "Failed to match semantic version in cmake.toml") message(FATAL_ERROR "Failed to match semantic version in cmake.toml")
endif() endif()
if(CMAKE_ARGV3) if(CMAKE_ARGV3)
if(NOT CMAKE_ARGV3 MATCHES "${SEMVER_REGEX}") if(NOT CMAKE_ARGV3 MATCHES "${SEMVER_REGEX}")
message(FATAL_ERROR "Invalid semantic version number '${CMAKE_ARGV3}'") message(FATAL_ERROR "Invalid semantic version number '${CMAKE_ARGV3}'")
endif() endif()
set(NEWVERSION "${CMAKE_ARGV3}") set(NEWVERSION "${CMAKE_ARGV3}")
else() else()
math(EXPR NEWPATCH "${PATCH} + 1") math(EXPR NEWPATCH "${PATCH} + 1")
set(NEWVERSION "${MAJOR}.${MINOR}.${NEWPATCH}") set(NEWVERSION "${MAJOR}.${MINOR}.${NEWPATCH}")
endif() endif()
message(STATUS "Version ${OLDVERSION} -> ${NEWVERSION}") message(STATUS "Version ${OLDVERSION} -> ${NEWVERSION}")
find_program(CMKR_EXECUTABLE "cmkr" PATHS "${CMAKE_SOURCE_DIR}/build" PATH_SUFFIXES Debug Release RelWithDebInfo MinSizeRel NO_CACHE REQUIRED) find_program(CMKR_EXECUTABLE "cmkr" PATHS "${CMAKE_SOURCE_DIR}/build" PATH_SUFFIXES Debug Release RelWithDebInfo MinSizeRel NO_CACHE REQUIRED)
message(STATUS "Found cmkr: ${CMKR_EXECUTABLE}") message(STATUS "Found cmkr: ${CMKR_EXECUTABLE}")
# Replace version in cmake.toml # Replace version in cmake.toml
string(REPLACE "version = \"${OLDVERSION}\"" "version = \"${NEWVERSION}\"" CMAKE_TOML "${CMAKE_TOML}") string(REPLACE "version = \"${OLDVERSION}\"" "version = \"${NEWVERSION}\"" CMAKE_TOML "${CMAKE_TOML}")
file(CONFIGURE file(CONFIGURE
OUTPUT "${CMAKE_SOURCE_DIR}/cmake.toml" OUTPUT "${CMAKE_SOURCE_DIR}/cmake.toml"
CONTENT "${CMAKE_TOML}" CONTENT "${CMAKE_TOML}"
@ONLY @ONLY
NEWLINE_STYLE LF NEWLINE_STYLE LF
) )
# Run cmkr gen # Run cmkr gen
execute_process(COMMAND "${CMKR_EXECUTABLE}" gen RESULT_VARIABLE CMKR_EXEC_RESULT) execute_process(COMMAND "${CMKR_EXECUTABLE}" gen RESULT_VARIABLE CMKR_EXEC_RESULT)
if(NOT CMKR_EXEC_RESULT EQUAL 0) if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "cmkr gen failed (exit code ${CMKR_EXEC_RESULT})") message(FATAL_ERROR "cmkr gen failed (exit code ${CMKR_EXEC_RESULT})")
endif() endif()
# Replace version in cmkr.cmake # Replace version in cmkr.cmake
file(READ "${CMAKE_SOURCE_DIR}/cmake/cmkr.cmake" CMKR_CMAKE) file(READ "${CMAKE_SOURCE_DIR}/cmake/cmkr.cmake" CMKR_CMAKE)
string(REGEX REPLACE "CMKR_TAG \"[^\"]+\"" "CMKR_TAG \"v${NEWVERSION}\"" CMKR_CMAKE "${CMKR_CMAKE}") string(REGEX REPLACE "CMKR_TAG \"[^\"]+\"" "CMKR_TAG \"v${NEWVERSION}\"" CMKR_CMAKE "${CMKR_CMAKE}")
file(CONFIGURE file(CONFIGURE
OUTPUT "${CMAKE_SOURCE_DIR}/cmake/cmkr.cmake" OUTPUT "${CMAKE_SOURCE_DIR}/cmake/cmkr.cmake"
CONTENT "${CMKR_CMAKE}" CONTENT "${CMKR_CMAKE}"
@ONLY @ONLY
NEWLINE_STYLE LF NEWLINE_STYLE LF
) )
# Print git commands # Print git commands
message(STATUS "Git commands to create new version:\ngit commit -a -m \"Bump to ${NEWVERSION}\"\ngit tag v${NEWVERSION}\ngit push origin main v${NEWVERSION}") message(STATUS "Git commands to create new version:\ngit commit -a -m \"Bump to ${NEWVERSION}\"\ngit tag v${NEWVERSION}\ngit push origin main v${NEWVERSION}")

@ -15,7 +15,7 @@ function(generate_documentation)
message(FATAL_ERROR "This should not happen (wrong regex?)") message(FATAL_ERROR "This should not happen (wrong regex?)")
endif() endif()
endforeach() endforeach()
# Delete previously generated examples # Delete previously generated examples
set(example_folder "${PROJECT_SOURCE_DIR}/docs/examples") set(example_folder "${PROJECT_SOURCE_DIR}/docs/examples")
file(GLOB example_files "${example_folder}/*.md") file(GLOB example_files "${example_folder}/*.md")
@ -41,21 +41,21 @@ function(generate_documentation)
# Read cmake.toml file # Read cmake.toml file
file(READ "${test_toml}" test_contents NO_HEX_CONVERSION) file(READ "${test_toml}" test_contents NO_HEX_CONVERSION)
string(LENGTH "${test_contents}" toml_length) string(LENGTH "${test_contents}" toml_length)
# Extract header text # Extract header text
string(REGEX MATCH "^(\n*(#[^\n]+\n)+\n*)" EXAMPLE_HEADER "${test_contents}") string(REGEX MATCH "^(\n*(#[^\n]+\n)+\n*)" EXAMPLE_HEADER "${test_contents}")
string(LENGTH "${EXAMPLE_HEADER}" header_length) string(LENGTH "${EXAMPLE_HEADER}" header_length)
string(STRIP "${EXAMPLE_HEADER}" EXAMPLE_HEADER) string(STRIP "${EXAMPLE_HEADER}" EXAMPLE_HEADER)
string(REGEX REPLACE "\n# ?" "\n\n" EXAMPLE_HEADER "\n${EXAMPLE_HEADER}") string(REGEX REPLACE "\n# ?" "\n\n" EXAMPLE_HEADER "\n${EXAMPLE_HEADER}")
string(STRIP "${EXAMPLE_HEADER}" EXAMPLE_HEADER) string(STRIP "${EXAMPLE_HEADER}" EXAMPLE_HEADER)
# Extract footer text # Extract footer text
string(REGEX MATCH "(((#[^\n]+)(\n+|$))+)$" EXAMPLE_FOOTER "${test_contents}") string(REGEX MATCH "(((#[^\n]+)(\n+|$))+)$" EXAMPLE_FOOTER "${test_contents}")
string(LENGTH "${EXAMPLE_FOOTER}" footer_length) string(LENGTH "${EXAMPLE_FOOTER}" footer_length)
string(STRIP "${EXAMPLE_FOOTER}" EXAMPLE_FOOTER) string(STRIP "${EXAMPLE_FOOTER}" EXAMPLE_FOOTER)
string(REGEX REPLACE "\n# ?" "\n\n" EXAMPLE_FOOTER "\n${EXAMPLE_FOOTER}") string(REGEX REPLACE "\n# ?" "\n\n" EXAMPLE_FOOTER "\n${EXAMPLE_FOOTER}")
string(STRIP "${EXAMPLE_FOOTER}" EXAMPLE_FOOTER) string(STRIP "${EXAMPLE_FOOTER}" EXAMPLE_FOOTER)
# Extract toml body # Extract toml body
math(EXPR toml_length "${toml_length}-${header_length}-${footer_length}") math(EXPR toml_length "${toml_length}-${header_length}-${footer_length}")
string(SUBSTRING "${test_contents}" ${header_length} ${toml_length} EXAMPLE_TOML) string(SUBSTRING "${test_contents}" ${header_length} ${toml_length} EXAMPLE_TOML)
@ -64,7 +64,7 @@ function(generate_documentation)
# Extract title from description # Extract title from description
if("${EXAMPLE_TOML}" MATCHES "description *= *\"([^\"]+)\"") if("${EXAMPLE_TOML}" MATCHES "description *= *\"([^\"]+)\"")
set(EXAMPLE_TITLE "${CMAKE_MATCH_1}") set(EXAMPLE_TITLE "${CMAKE_MATCH_1}")
# Generate documentation markdown page # Generate documentation markdown page
configure_file("${PROJECT_SOURCE_DIR}/cmake/example.md.in" "${example_folder}/${EXAMPLE_PERMALINK}.md" @ONLY NEWLINE_STYLE LF) configure_file("${PROJECT_SOURCE_DIR}/cmake/example.md.in" "${example_folder}/${EXAMPLE_PERMALINK}.md" @ONLY NEWLINE_STYLE LF)
else() else()

@ -1,7 +1,7 @@
namespace cmkr { namespace cmkr {
namespace resources { namespace resources {
static const char* @RESOURCE_NAME@ = R"RESOURCE(@RESOURCE_CONTENTS@)RESOURCE"; static const char* @RESOURCE_NAME@ = R"RESOURCE(@RESOURCE_CONTENTS@)RESOURCE";
} }
} }

@ -1 +1 @@
cmkr.build cmkr.build

@ -49,7 +49,7 @@ arch64 = "CMAKE_SIZEOF_VOID_P EQUAL 8"
arch32 = "CMAKE_SIZEOF_VOID_P EQUAL 4" arch32 = "CMAKE_SIZEOF_VOID_P EQUAL 4"
``` ```
This will make the `arch64` and `arch32` conditions available with their respective CMake expressions. This will make the `arch64` and `arch32` conditions available with their respective CMake expressions.
You can also prefix most keys with `condition.` to represent a conditional: You can also prefix most keys with `condition.` to represent a conditional:

@ -1,10 +1,10 @@
--- ---
layout: null layout: null
permalink: /getting-started/ permalink: /getting-started/
--- ---
<html> <html>
<head> <head>
<meta http-equiv="refresh" content="0;url=https://cmkr.build"> <meta http-equiv="refresh" content="0;url=https://cmkr.build">
</head> </head>
</html> </html>

@ -10,4 +10,4 @@ namespace fs = std::filesystem;
#ifndef GHC_USE_STD_FS #ifndef GHC_USE_STD_FS
#include <ghc/filesystem.hpp> #include <ghc/filesystem.hpp>
namespace fs = ghc::filesystem; namespace fs = ghc::filesystem;
#endif #endif

@ -212,4 +212,4 @@ struct Project {
bool is_root_path(const std::string &path); bool is_root_path(const std::string &path);
} // namespace parser } // namespace parser
} // namespace cmkr } // namespace cmkr

@ -8,4 +8,4 @@ description = "Minimal example"
type = "executable" type = "executable"
sources = ["src/basic.cpp"] sources = ["src/basic.cpp"]
# Declares an executable target called `basic` with `src/basic.cpp` as a source file. Equivalent to CMake's [add_executable](https://cmake.org/cmake/help/latest/command/add_executable.html)`(basic src/basic.cpp)`. # Declares an executable target called `basic` with `src/basic.cpp` as a source file. Equivalent to CMake's [add_executable](https://cmake.org/cmake/help/latest/command/add_executable.html)`(basic src/basic.cpp)`.

@ -1,23 +1,23 @@
[project] [project]
name = "conditions" name = "conditions"
cmake-after = "set(CUSTOM ON)" cmake-after = "set(CUSTOM ON)"
[conditions] [conditions]
custom = "CUSTOM" custom = "CUSTOM"
[target.example] [target.example]
type = "executable" type = "executable"
sources = ["src/main.cpp"] sources = ["src/main.cpp"]
windows.sources = ["src/windows_specific.cpp"] windows.sources = ["src/windows_specific.cpp"]
cmake-after = "message(STATUS cmake-after)" cmake-after = "message(STATUS cmake-after)"
windows.cmake-after = "message(STATUS win32-after)" windows.cmake-after = "message(STATUS win32-after)"
macos.cmake-after = "message(STATUS macos-after)" macos.cmake-after = "message(STATUS macos-after)"
linux.cmake-after = "message(STATUS linux-after)" linux.cmake-after = "message(STATUS linux-after)"
unix.cmake-after = "message(STATUS unix-after)" unix.cmake-after = "message(STATUS unix-after)"
custom.cmake-after = "message(STATUS custom-after)" custom.cmake-after = "message(STATUS custom-after)"
[target.example.properties] [target.example.properties]
AUTOMOC = false AUTOMOC = false
custom.OUTPUT_NAME = "example2" custom.OUTPUT_NAME = "example2"
custom.AUTORCC = true custom.AUTORCC = true
AUTOGEN = "ON" AUTOGEN = "ON"

@ -1,2 +1,2 @@
int main() { int main() {
} }

@ -1,4 +1,4 @@
#include <Windows.h> #include <Windows.h>
void foo() { void foo() {
} }

@ -1,12 +1,12 @@
# Require a C++11 compiler for the target `example`. # Require a C++11 compiler for the target `example`.
[project] [project]
name = "cxx-standard" name = "cxx-standard"
description = "Changing C++ standard" description = "Changing C++ standard"
[target.example] [target.example]
type = "executable" type = "executable"
sources = ["src/main.cpp"] sources = ["src/main.cpp"]
compile-features = ["cxx_std_11"] compile-features = ["cxx_std_11"]
# This is equivalent to CMake's [target_compile_features](https://cmake.org/cmake/help/latest/command/target_compile_features.html)`(example PRIVATE cxx_std_11)`. For more information on available C/C++ standards and features see [cmake-compile-features(7)](https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html). # This is equivalent to CMake's [target_compile_features](https://cmake.org/cmake/help/latest/command/target_compile_features.html)`(example PRIVATE cxx_std_11)`. For more information on available C/C++ standards and features see [cmake-compile-features(7)](https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html).

@ -1,7 +1,7 @@
#include <cstdio> #include <cstdio>
#include <tuple> #include <tuple>
int main() { int main() {
auto tpl = std::make_tuple(1, 2); auto tpl = std::make_tuple(1, 2);
printf("Hello from C++11 %d\n", std::get<0>(tpl)); printf("Hello from C++11 %d\n", std::get<0>(tpl));
} }

@ -12,4 +12,4 @@ type = "executable"
sources = ["src/main.cpp"] sources = ["src/main.cpp"]
link-libraries = ["fmt::fmt"] link-libraries = ["fmt::fmt"]
# This is equivalent to calling CMake's [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html). # This is equivalent to calling CMake's [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html).

@ -2,4 +2,4 @@
int main() { int main() {
fmt::print("Hello, world!\n"); fmt::print("Hello, world!\n");
} }

@ -1,18 +1,18 @@
[project] [project]
name = "globbing" name = "globbing"
description = "Globbing sources" description = "Globbing sources"
# Recursively glob in the mylib/ folder # Recursively glob in the mylib/ folder
[target.mylib] [target.mylib]
type = "static" type = "static"
alias = "mylib::mylib" alias = "mylib::mylib"
sources = ["mylib/**.hpp", "mylib/**.cpp"] sources = ["mylib/**.hpp", "mylib/**.cpp"]
include-directories = ["mylib/include"] include-directories = ["mylib/include"]
# Single-folder glob in example/src/ # Single-folder glob in example/src/
[target.example] [target.example]
type = "executable" type = "executable"
sources = ["example/src/*.cpp"] sources = ["example/src/*.cpp"]
link-libraries = ["mylib::mylib"] link-libraries = ["mylib::mylib"]
# As you can see in the example above you can use `**.ext` to glob recursively and `*.ext` to glob non-recursively. This **does not** generate `file(GLOB ...)` commands, but instead globs when cmkr is run. Files are sorted to give deterministic results regardless of the platform used. # As you can see in the example above you can use `**.ext` to glob recursively and `*.ext` to glob non-recursively. This **does not** generate `file(GLOB ...)` commands, but instead globs when cmkr is run. Files are sorted to give deterministic results regardless of the platform used.

@ -1,7 +1,7 @@
#include <iostream> #include <iostream>
#include <mylib/mylib.hpp> #include <mylib/mylib.hpp>
int main() { int main() {
std::cout << mylib::message() << std::endl; std::cout << mylib::message() << std::endl;
return 0; return 0;
} }

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <string> #include <string>
namespace mylib { namespace mylib {
std::string message(); std::string message();
} }

@ -1,5 +1,5 @@
#include <mylib/mylib.hpp> #include <mylib/mylib.hpp>
std::string mylib::message() { std::string mylib::message() {
return "cmkr is awesome!"; return "cmkr is awesome!";
} }

@ -1,13 +1,13 @@
[project] [project]
name = "interface" name = "interface"
description = "Header-only library" description = "Header-only library"
[target.mylib] [target.mylib]
type = "interface" type = "interface"
include-directories = ["include"] include-directories = ["include"]
compile-features = ["cxx_std_11"] compile-features = ["cxx_std_11"]
[target.example] [target.example]
type = "executable" type = "executable"
sources = ["src/main.cpp"] sources = ["src/main.cpp"]
link-libraries = ["mylib"] link-libraries = ["mylib"]

@ -1,5 +1,5 @@
namespace mylib { namespace mylib {
static const char *version() { static const char *version() {
return "v1.0"; return "v1.0";
} }
} // namespace mylib } // namespace mylib

@ -1,7 +1,7 @@
#include <cstdio> #include <cstdio>
#include "mylib/mylib.hpp" #include "mylib/mylib.hpp"
int main() { int main() {
printf("mylib version: %s\n", mylib::version()); printf("mylib version: %s\n", mylib::version());
} }

@ -12,4 +12,4 @@ sources = ["src/main.cpp"]
[target.dynamic-runtime] [target.dynamic-runtime]
type = "executable" type = "executable"
sources = ["src/main.cpp"] sources = ["src/main.cpp"]
msvc-runtime = "dynamic" msvc-runtime = "dynamic"

@ -22,4 +22,4 @@ compile-definitions = ["APP_A"]
type = "app" type = "app"
compile-definitions = ["APP_B"] compile-definitions = ["APP_B"]
# **Note**: In most cases you probably want to use an [interface](/examples/interface) target instead. # **Note**: In most cases you probably want to use an [interface](/examples/interface) target instead.

@ -19,4 +19,4 @@ sources = ["src/main.cpp"]
link-libraries = ["fmt::fmt"] link-libraries = ["fmt::fmt"]
# The bootstrapping of vcpkg is fully automated and no user interaction is necessary. You can disable vcpkg by setting `CMKR_DISABLE_VCPKG=ON`. # The bootstrapping of vcpkg is fully automated and no user interaction is necessary. You can disable vcpkg by setting `CMKR_DISABLE_VCPKG=ON`.
# To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`. # To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`.

@ -2,4 +2,4 @@
int main() { int main() {
fmt::print("Hello, world!\n"); fmt::print("Hello, world!\n");
} }

Loading…
Cancel
Save