The missing CMake project initializer

Overview

cmake-init - The missing CMake project initializer

Opinionated CMake project initializer to generate CMake projects that are FetchContent ready, separate consumer and developer targets, provide install rules with proper relocatable CMake packages and use modern CMake (3.14+)

See the gif in the assets folder for an example of using cmake-init.

Here are some example outputs of the script as of 0.6.1:

Goals

  • Be simple to use
    The script allows you to just mash enter to get you a correctly set up project for a library, which can be built as either static or shared. You want a project with an executable? Just choose e when prompted. Header-only library? Just choose h when prompted. Simple and correct!
  • Create FetchContent ready projects
    This is important, because in the near feature this might allow CMake to consume other projects in a trivial fashion similar to other languages, e.g. in JavaScript's case (npm).
  • Cleanly separate developer and consumer targets
    This ties into the previous point as well, but developers and consumers of a project have different needs, and separating targets achieves that goal. A developer should be able to run tests, add warning flags, run benchmarks, etc., while a consumer, such as a package maintainer, generally only wants to build the library or the executable itself, without having to patch around in the CMake scripts. Show some love to your package maintainers!
  • Use modern CMake (3.14+)
    There are too many outdated and plain wrong examples on the internet, it's time to change that.
  • Make usage of tools easy
    Code coverage (gcov), code linting and formatting (clang-format), static analysis (clang-tidy) and dynamic analysis (sanitizers, valgrind) are all very helpful ways to guide the developer in creating better software, so they should be easy to use.

Non-goals

  • Cover every possible project structure
    Doing this is pointless as an init script, because there are far too many ways people have been building software, and if you have special needs, you ought to already know CMake and you can set the project up yourself.
  • Generate files and show tips for websites other than GitHub
    While I understand the people who are against GitHub (and by proxy Microsoft), it's by far the most used website of its kind, the files and messages specific to it are small in number, and they are easily adapted for any other service.

Install

Make sure you have these programs installed:

  • Python 3.8 or newer
  • CMake 3.19 or newer
  • git
  • clang-tidy (optional, should be available in PATH as clang-tidy)

cmake-init consists of a single file that can be run using Python. Python was chosen for this, because it is cross-platform, convenient for this use-case and you likely already have it installed or the need for it will come up later anyway.

You have to just download the cmake-init.pyz script from the releases, place it somewhere in your PATH and rename it to cmake-init. On Windows, you have to create a cmake-init.bat file to proxy to the script:

@echo off

python %~dp0\cmake-init.pyz %*

clang-tidy

clang-tidy is a static analysis tool that helps you spot logical errors in your code before it is compiled. This script gives you the option to inherit the clang-tidy preset in your dev preset, enabling the CMake integration for this tool.

CI will always run clang-tidy for you, so it is entirely optional to install and use it locally, but it is recommended.

For Windows users, if you wish to use clang-tidy, then you must install Ninja and set the generator field in your dev preset to Ninja. The reason for this is that only Makefiles and Ninja are supported with CMake for use with clang-tidy. For other generators, this feature is a no-op.

Usage

  • cmake-init <path>
    This command will create a CMake project at the provided location and according to the answers given to the prompts. You may pass the -s, -e or -h flags after to quickly create a shared library, executable or a header only library respectively.
  • cmake-init --help
    Shows the help screen for more flags and switches.

Licensing

GNU GPLv3 Image

cmake-init is Free Software: You can use, study, share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Files generated by cmake-init are placed under Public Domain. Everyone is free to use, modify, republish, sell or give away these files without prior consent from anybody. These files are provided on an "as is" basis, without warranty of any kind. Use at your own risk! Under no circumstances shall the author(s) or contributor(s) be liable for damages resulting directly or indirectly from the use or non-use of these files.

Comments
  • Update install-rules.cmake

    Update install-rules.cmake

    The current install-rules double indent the include folder: as in installation_prefix/include/libname/libname/header.hpp. At least when running: cmake --install build_folder_path --prefix=./installation_prefix

    Removing these three lines seems to be a better default behavior. When we tried to get our library on vcpkg, this was an issue which blocked us from merging.

    opened by anders-wind 9
  • cmake does not detect some vcpkg installed libraries when using cmake-init

    cmake does not detect some vcpkg installed libraries when using cmake-init

    I have created a sample project without cmake-init to test if vcpkg/cmakke/etc were working correctly.

    With a CMakeLists.txt containing

    cmake_minimum_required(VERSION 3.20)
    project(fibo CXX)
    
    find_package(fmt  REQUIRED)
    find_package(range-v3  REQUIRED)
    
    add_executable(fibo main.cpp)
    target_compile_features(fibo PRIVATE cxx_std_17)
    
    target_link_libraries(fibo
      PRIVATE
        fmt::fmt
        range-v3::range-v3)
    

    everything works fine.

    When I create a project with cmake-init, it stops being able to detect range-v3, but it does detect fmt.

    environment:

    cmake version 3.20.2 cmake-init version 0.31.2

    steps to reproduce

    1. create a cmake-init project, select vcpkg as the package manager
    2. Open project in clion, and add "-DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake" to the cmake profile.
    3. add these lines to the generated CMakeLists.txt:
    find_package(fmt  REQUIRED)
    find_package(range-v3  REQUIRED)
    target_link_libraries(cmtest_lib PRIVATE fmt::fmt range-v3::range-v3)
    
    1. reset cmake cache and reload project

    Result:

    "C:\Program Files\JetBrains\CLion 2021.2.3\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_DEPENDS_USE_COMPILER=FALSE -G "CodeBlocks - NMake Makefiles" C:\Users\Massiveatoms\Desktop\compsci\cmtest
    -- Running vcpkg install
    Detecting compiler hash for triplet x64-windows...
    Detecting compiler hash for triplet x86-windows...
    All requested packages are currently installed.
    Restored 0 package(s) from C:\Users\Massiveatoms\AppData\Local\vcpkg\archives in 336.4 us. Use --debug to see more details.
    
    Total elapsed time: 14.25 s
    
    The package fmt provides CMake targets:
    
        find_package(fmt CONFIG REQUIRED)
        target_link_libraries(main PRIVATE fmt::fmt)
    
        # Or use the header-only version
        find_package(fmt CONFIG REQUIRED)
        target_link_libraries(main PRIVATE fmt::fmt-header-only)
    
    -- Running vcpkg install - done
    CMake Error at C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package):
      By not providing "Findrange-v3.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "range-v3",
      but CMake did not find one.
    
      Could not find a package configuration file provided by "range-v3" with any
      of the following names:
    
        range-v3Config.cmake
        range-v3-config.cmake
    
      Add the installation prefix of "range-v3" to CMAKE_PREFIX_PATH or set
      "range-v3_DIR" to a directory containing one of the above files.  If
      "range-v3" provides a separate development package or SDK, be sure it has
      been installed.
    Call Stack (most recent call first):
      CMakeLists.txt:32 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Massiveatoms/Desktop/compsci/cmtest/cmake-build-debug/CMakeFiles/CMakeOutput.log".
    
    [Failed to reload]
    
    

    I have no idea what other information you need, so if you need further information, feel free to ask

    opened by TinyAtoms 8
  • --std flag not working

    --std flag not working

    From a fresh install, all attempts to use the --std flag are failing

    $ uname -a
    Linux user 5.13.4-200.fc34.x86_64 #1 SMP Tue Jul 20 2021 x86_64 x86_64 x86_64 GNU/Linux
    
    $ pip install --user cmake-init
    ...
    Successfully installed cmake-init-0.20.4
    
    $ cmake-init -h .
    ...
    You are all set. Have fun programming and create something awesome!
    
    $ cmake-init -h --std c++17 .
    Traceback (most recent call last):
      File "/home/user/.local/bin/cmake-init", line 8, in <module>
        sys.exit(pypi_main())
      File "/home/user/.local/lib/python3.8/site-packages/cmake_init_lib/__init__.py", line 14, in pypi_main
        main(zip)
      File "/home/user/.local/lib/python3.8/site-packages/cmake_init_lib/cmake_init.py", line 489, in main
        create(args, zip)
      File "/home/user/.local/lib/python3.8/site-packages/cmake_init_lib/cmake_init.py", line 299, in create
        d = get_substitutes(args, os.path.basename(path))
      File "/home/user/.local/lib/python3.8/site-packages/cmake_init_lib/cmake_init.py", line 133, in get_substitutes
        "std": ask(
      File "/home/user/.local/lib/python3.8/site-packages/cmake_init_lib/cmake_init.py", line 83, in ask
        return prompt(*args, **kwargs, no_prompt=no_prompt)
      File "/home/user/.local/lib/python3.8/site-packages/cmake_init_lib/cmake_init.py", line 61, in prompt
        raise ValueError()
    ValueError
    
    
    opened by willwray 5
  • Get catch2 as build requirement with host config

    Get catch2 as build requirement with host config

    The build_requirements method is better suitable for test framework dependencies because tests are only relevant during a package build from sources and provide no good use in delivered packages. Relevant documentation links: https://docs.conan.io/en/latest/reference/conanfile/methods.html#build-requirements https://docs.conan.io/en/latest/migrating_to_2.0/recipes.html#requirements

    opened by dornbirndevelops 4
  • Default dependencies for C project when using a package manager

    Default dependencies for C project when using a package manager

    Related to #42

    I looked at the available dependencies in Conan Center Index for C and there doesn't seem to be one that strikes me as one that would be nice to use as a default to have as an example. For C++ project, the obvious defaults are fmt (dependency) and Catch2 (dev dependency).

    One that I think could be okay is json-c, because it has a proper CMake package that can be consistently consumed via either package managers. This makes setting the install config up for library type projects trivial.
    I haven't look at a dev dependency for C projects yet.

    opened by friendlyanon 4
  • Minimal boilerplate for Conan and vcpkg (now in preview)

    Minimal boilerplate for Conan and vcpkg (now in preview)

    I am thinking of adding a -p flag for package manager biolerplate. C++ projects would be importing the fmt library, I'll have to thing about what to import for C projects.

    enhancement 
    opened by friendlyanon 4
  • Make build directory compatible with `find_package`

    Make build directory compatible with `find_package`

    Hello! First, thank you for the wonderful project! This is a great reference for modern and essential CMake practices.

    I am wondering whether it would be useful to have the build directory be compatible with find_package. With the changes, a user would be able to find and use the targets of this project from the build directory instead of requiring installation.

    Not requiring installation can help to reduce the development cycle if this project is being actively developed to support features of the project depending on this project.

    As a motivating concrete example, using the test directory since it's also a standalone project, a user would be able to do the following:

    cmake-init /tmp/shared -s
    
    cd /tmp/shared
    cmake --preset=dev
    cmake --build --preset=dev
    
    cmake -S /tmp/shared/test \
      -B /tmp/shared/test/build \
      -Dshared_DIR=/tmp/shared/build/dev
    cmake --build /tmp/shared/test/build
    ctest --test-dir /tmp/shared/test/build
    

    Notice that the installation command is not executed.

    I have a working branch (feature/export-build-dir) in my fork, but I wanted to check here first to see whether a PR would have a chance of acceptance. The branch uses CMake's export and configure_package_config_file to achieve this.

    Thank you!

    opened by ekilmer 4
  • Python packaging

    Python packaging

    zipapp is used to create a self-contained runnable artifact, but I'm not sure if this is the best way to go about things.

    This hack is also not something I like to see in the code, but after local testing, this is the only thing that stopped Python from closing the file handle to the zip.

    enhancement 
    opened by friendlyanon 4
  • Slowdown gif in the main readme

    Slowdown gif in the main readme

    Currently, gif in the main readme played incredibly fast. There is a lot of text there, interesting text that advertised the library, but I can't read it because of the speed. It seems it needs a 5-10x slowdown to be useful.

    enhancement 
    opened by YarikTH 3
  • Not Compatible with Conan 1.51.x

    Not Compatible with Conan 1.51.x

    Environment: Platform: Mac mini (M1, 2020) OS: macOS 12.4 CMake version: 3.24.0 cmake-init version: 0.31.2 conan version: 1.51.2

    If I use Conan 1.50.2, it works.

    error message for cmake-init with Conan 1.51.2: $ cmake --preset=dev

    -- Using Conan toolchain: /Users/xanaduw/tmp/greatness/conan/conan_toolchain.cmake -- Conan: Component target declared 'fmt::fmt' CMake Error (dev) at conan/fmt-Target-debug.cmake:5 (set): uninitialized variable 'fmt_COMPILE_OPTIONS_CXX_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:5 (set):
    uninitialized variable 'fmt_COMPILE_OPTIONS_C_DEBUG'
    Call Stack (most recent call first):
    conan/fmtTargets.cmake:26 (include)
    conan/fmt-config.cmake:10 (include)
    CMakeLists.txt:31 (find_package)
    This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:9 (set):
    uninitialized variable 'fmt_SHARED_LINK_FLAGS_DEBUG'
    Call Stack (most recent call first):
    conan/fmtTargets.cmake:26 (include)
    conan/fmt-config.cmake:10 (include)
    CMakeLists.txt:31 (find_package)
    This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:9 (set):
    uninitialized variable 'fmt_SHARED_LINK_FLAGS_DEBUG'
    Call Stack (most recent call first):
    conan/fmtTargets.cmake:26 (include)
    conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:9 (set): uninitialized variable 'fmt_EXE_LINK_FLAGS_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:15 (conan_find_apple_frameworks): uninitialized variable 'fmt_FRAMEWORKS_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:15 (conan_find_apple_frameworks): [155/1907] uninitialized variable 'fmt_FRAMEWORK_DIRS_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:25 (set_property): uninitialized variable 'fmt_SYSTEM_LIBS_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:34 (conan_package_library_targets): uninitialized variable 'fmt_LIBS_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:34 (conan_package_library_targets): uninitialized variable 'fmt_LIB_DIRS_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:42 (set): uninitialized variable 'fmt_BUILD_DIRS_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-Target-debug.cmake:43 (set): uninitialized variable 'fmt_BUILD_DIRS_DEBUG' Call Stack (most recent call first): conan/fmtTargets.cmake:26 (include) conan/fmt-config.cmake:10 (include) CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-config.cmake:23 (set): [107/1907] uninitialized variable 'fmt_INCLUDE_DIRS_DEBUG' Call Stack (most recent call first): CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-config.cmake:24 (set): uninitialized variable 'fmt_INCLUDE_DIRS_DEBUG' Call Stack (most recent call first): CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/fmt-config.cmake:26 (set): uninitialized variable 'fmt_DEFINITIONS_DEBUG' Call Stack (most recent call first): CMakeLists.txt:31 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    -- Conan: Component target declared 'Catch2::Catch2' -- Conan: Component target declared 'Catch2::Catch2WithMain' CMake Error (dev) at conan/Catch2-Target-debug.cmake:5 (set): uninitialized variable 'catch2_COMPILE_OPTIONS_CXX_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it. CMake Error (dev) at conan/Catch2-Target-debug.cmake:5 (set): uninitialized variable 'catch2_COMPILE_OPTIONS_C_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:9 (set): uninitialized variable 'catch2_SHARED_LINK_FLAGS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:9 (set): uninitialized variable 'catch2_SHARED_LINK_FLAGS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:9 (set): uninitialized variable 'catch2_EXE_LINK_FLAGS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:15 (conan_find_apple_frameworks): uninitialized variable 'catch2_FRAMEWORKS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:15 (conan_find_apple_frameworks): uninitialized variable 'catch2_FRAMEWORK_DIRS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:25 (set_property): uninitialized variable 'catch2_SYSTEM_LIBS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:34 (conan_package_library_targets): uninitialized variable 'catch2_LIBS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:34 (conan_package_library_targets): uninitialized variable 'catch2_LIB_DIRS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:42 (set): uninitialized variable 'catch2_BUILD_DIRS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2-Target-debug.cmake:43 (set): uninitialized variable 'catch2_BUILD_DIRS_DEBUG' Call Stack (most recent call first): conan/Catch2Targets.cmake:26 (include) conan/Catch2Config.cmake:10 (include) test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2Config.cmake:23 (set): uninitialized variable 'catch2_INCLUDE_DIRS_DEBUG' Call Stack (most recent call first): test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2Config.cmake:24 (set): uninitialized variable 'catch2_INCLUDE_DIRS_DEBUG' Call Stack (most recent call first): test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    CMake Error (dev) at conan/Catch2Config.cmake:26 (set): uninitialized variable 'catch2_DEFINITIONS_DEBUG' Call Stack (most recent call first): test/CMakeLists.txt:9 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it.

    opened by xrloong 2
  • Invalid workflow file generated by cmake-init

    Invalid workflow file generated by cmake-init

    I have set up the project using cmake-init with vcpkg. I made an initial commit after the generation of code but GitHub reported that ci.yml generated has syntax error near the vcpkg installation step.

    The file generated is here: https://pastebin.com/gQTA8p43

    And the error reported by GitHub action is near line 55: image

    I did a check on the yaml syntax and think it has no issue. Can someone help me out with this?

    opened by fsgmhoward 2
  • Web cmake-init

    Web cmake-init

    Would a web version of cmake-init be of any use? Something similar to https://start.spring.io/

    Some tools already require Python that generated projects offer integration with, so this is a really low priority issue in my book, especially since the Python code would need to be rewritten in JS.

    enhancement question 
    opened by friendlyanon 0
  • Alternative to Doxygen

    Alternative to Doxygen

    As Doxygen doesn't quite work as well as one would hope ([1]), it might be time to look into alternatives.

    One candidate so far is https://github.com/hdoc/hdoc

    enhancement docs 
    opened by friendlyanon 0
  • Building on MacOS

    Building on MacOS

    Hi, I got error CMAKE_MAKE_PROGRAM is not set.

    My env is MacOS 11.3.1.

    CMake version:

    ❯ cmake --version
    cmake version 3.23.1
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    

    Error in Root dir after cmake-init

    ❯ cmake --preset=dev
    Preset CMake variables:
    
      BUILD_MCSS_DOCS="ON"
      CMAKE_BUILD_TYPE="Debug"
      CMAKE_CXX_CLANG_TIDY="clang-tidy;--header-filter=/Users/angel/Work/explore-cpp/idtaxes/*"
      CMAKE_CXX_CPPCHECK="cppcheck;--inline-suppr"
      CMAKE_CXX_EXTENSIONS="OFF"
      CMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wcast-qual -Wshadow -Wformat=2 -Wundef -Werror=float-equal"
      CMAKE_CXX_STANDARD="20"
      CMAKE_CXX_STANDARD_REQUIRED="ON"
      CMAKE_TOOLCHAIN_FILE="/scripts/buildsystems/vcpkg.cmake"
      VCPKG_MANIFEST_FEATURES="test"
      idtaxes_DEVELOPER_MODE="ON"
    
    CMake Error at /Applications/CMake.app/Contents/share/cmake-3.23/Modules/CMakeDetermineSystem.cmake:130 (message):
      Could not find toolchain file: /scripts/buildsystems/vcpkg.cmake
    Call Stack (most recent call first):
      CMakeLists.txt:9 (project)
    
    
    CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    -- Configuring incomplete, errors occurred!
    

    Can anyone help me?

    Thank you

    enhancement 
    opened by rhzs 7
  • C++ modules

    C++ modules

    This issue is just for tracking the progress of modules.

    At the moment, no generally available compiler seems to properly support modules.

    CMake is also designing its API to properly integrate C++ modules: https://discourse.cmake.org/t/api-design-c-modules-source-listings-and-interface-properties/5389

    enhancement 
    opened by friendlyanon 0
  • Caching for Conan dependencies

    Caching for Conan dependencies

    I realised while writing https://github.com/friendlyanon/cmake-init/issues/53#issuecomment-1094290250 that Conan dependencies are not cached in CI.

    The vcpkg template uses the friendlyanon/setup-vcpkg action, which handles vcpkg's binary cache automatically.

    I'm tagging this issue as a question, because maybe this action could be provided by the Conan team itself.

    question 
    opened by friendlyanon 0
  • Conan v2 usage

    Conan v2 usage

    The generated build instructions and CI workflow aren't compatible with Conan v2.

    Hoping @SpaceIm can chip in here with an example that shows how to use conanfile.txt with the new CMake generators.

    enhancement 
    opened by friendlyanon 6
Releases(v0.33.0)
existing and custom freqtrade strategies supporting the new hyperstrategy format.

freqtrade-strategies Description Existing and self-developed strategies, rewritten to support the new HyperStrategy format from the freqtrade-develop

39 Aug 20, 2021
Airborne magnetic data of the Osborne Mine and Lightning Creek sill complex, Australia

Osborne Mine, Australia - Airborne total-field magnetic anomaly This is a section of a survey acquired in 1990 by the Queensland Government, Australia

Fatiando a Terra Datasets 1 Jan 21, 2022
This is a model to classify Vietnamese sign language using Motion history image (MHI) algorithm and CNN.

Vietnamese sign lagnuage recognition using MHI and CNN This is a model to classify Vietnamese sign language using Motion history image (MHI) algorithm

Phat Pham 3 Feb 24, 2022
Light-weight network, depth estimation, knowledge distillation, real-time depth estimation, auxiliary data.

light-weight-depth-estimation Boosting Light-Weight Depth Estimation Via Knowledge Distillation, https://arxiv.org/abs/2105.06143 Junjie Hu, Chenyou F

Junjie Hu 13 Dec 10, 2022
code for Grapadora research paper experimentation

Road feature embedding selection method Code for research paper experimentation Abstract Traffic forecasting models rely on data that needs to be sens

Eric López Manibardo 0 May 26, 2022
Adversarial Reweighting for Partial Domain Adaptation

Adversarial Reweighting for Partial Domain Adaptation Code for paper "Xiang Gu, Xi Yu, Yan Yang, Jian Sun, Zongben Xu, Adversarial Reweighting for Par

12 Dec 01, 2022
Using image super resolution models with vapoursynth and speeding them up with TensorRT

vs-RealEsrganAnime-tensorrt-docker Using image super resolution models with vapoursynth and speeding them up with TensorRT. Also a docker image since

4 Aug 23, 2022
CIFS: Improving Adversarial Robustness of CNNs via Channel-wise Importance-based Feature Selection

CIFS This repository provides codes for CIFS (ICML 2021). CIFS: Improving Adversarial Robustness of CNNs via Channel-wise Importance-based Feature Sel

Hanshu YAN 19 Nov 12, 2022
Video Representation Learning by Recognizing Temporal Transformations. In ECCV, 2020.

Video Representation Learning by Recognizing Temporal Transformations [Project Page] Simon Jenni, Givi Meishvili, and Paolo Favaro. In ECCV, 2020. Thi

Simon Jenni 46 Nov 14, 2022
Code accompanying paper: Meta-Learning to Improve Pre-Training

Meta-Learning to Improve Pre-Training This folder contains code to run experiments in the paper Meta-Learning to Improve Pre-Training, NeurIPS 2021. P

28 Dec 31, 2022
PyTorch implementation of MoCo: Momentum Contrast for Unsupervised Visual Representation Learning

MoCo: Momentum Contrast for Unsupervised Visual Representation Learning This is a PyTorch implementation of the MoCo paper: @Article{he2019moco, aut

Meta Research 3.7k Jan 02, 2023
WSDM‘2022: Knowledge Enhanced Sports Game Summarization

Knowledge Enhanced Sports Game Summarization Cooming Soon! :) Data will be released after approval process. Code will be published once the author of

Jiaan Wang 14 Jul 13, 2022
KIDA: Knowledge Inheritance in Data Aggregation

KIDA: Knowledge Inheritance in Data Aggregation This project releases our 1st place solution on NeurIPS2021 ML4CO Dual Task. Slide and model weights a

24 Sep 08, 2022
Unified MultiWOZ evaluation scripts for the context-to-response task.

MultiWOZ Context-to-Response Evaluation Standardized and easy to use Inform, Success, BLEU ~ See the paper ~ Easy-to-use scripts for standardized eval

Tomáš Nekvinda 38 Dec 13, 2022
A library for implementing Decentralized Graph Neural Network algorithms.

decentralized-gnn A package for implementing and simulating decentralized Graph Neural Network algorithms for classification of peer-to-peer nodes. De

Multimedia Knowledge and Social Analytics Lab 5 Nov 07, 2022
Joint Gaussian Graphical Model Estimation: A Survey

Joint Gaussian Graphical Model Estimation: A Survey Test Models Fused graphical lasso [1] Group graphical lasso [1] Graphical lasso [1] Doubly joint s

Koyejo Lab 1 Aug 10, 2022
Learning to Draw: Emergent Communication through Sketching

Learning to Draw: Emergent Communication through Sketching This is the official code for the paper "Learning to Draw: Emergent Communication through S

19 Jul 22, 2022
Qt-GUI implementation of the YOLOv5 algorithm (ver.6 and ver.5)

YOLOv5-GUI 🎉 YOLOv5算法(ver.6及ver.5)的Qt-GUI实现 🎉 Qt-GUI implementation of the YOLOv5 algorithm (ver.6 and ver.5). 基于YOLOv5的v5版本和v6版本及Javacr大佬的UI逻辑进行编写

EricFang 12 Dec 28, 2022
Two-Stage Peer-Regularized Feature Recombination for Arbitrary Image Style Transfer

Two-Stage Peer-Regularized Feature Recombination for Arbitrary Image Style Transfer Paper on arXiv Public PyTorch implementation of two-stage peer-reg

NNAISENSE 38 Oct 14, 2022
LERP : Label-dependent and event-guided interpretable disease risk prediction using EHRs

LERP : Label-dependent and event-guided interpretable disease risk prediction using EHRs This is the code for the LERP. Dataset The dataset used is MI

5 Jun 18, 2022