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)
A collection of 100 Deep Learning images and visualizations

A collection of Deep Learning images and visualizations. The project has been developed by the AI Summer team and currently contains almost 100 images.

AI Summer 65 Sep 12, 2022
Charsiu: A transformer-based phonetic aligner

Charsiu: A transformer-based phonetic aligner [arXiv] Note. This is a preview version. The aligner is under active development. New functions, new lan

jzhu 166 Dec 09, 2022
A simple configurable bot for sending arXiv article alert by mail

arXiv-newsletter A simple configurable bot for sending arXiv article alert by mail. Prerequisites PyYAML=5.3.1 arxiv=1.4.0 Configuration All config

SXKDZ 21 Nov 09, 2022
Python package provinding tools for artistic interactive applications using AI

Documentation redrawing Python package provinding tools for artistic interactive applications using AI Created by ReDrawing Campinas team for the Open

ReDrawing Campinas 1 Sep 30, 2021
Official code for UnICORNN (ICML 2021)

UnICORNN (Undamped Independent Controlled Oscillatory RNN) [ICML 2021] This repository contains the implementation to reproduce the numerical experime

Konstantin Rusch 21 Dec 22, 2022
An index of algorithms for learning causality with data

awesome-causality-algorithms An index of algorithms for learning causality with data. Please cite our survey paper if this index is helpful. @article{

Ruocheng Guo 2.3k Jan 08, 2023
Official implementation for TTT++: When Does Self-supervised Test-time Training Fail or Thrive

TTT++ This is an official implementation for TTT++: When Does Self-supervised Test-time Training Fail or Thrive? TL;DR: Online Feature Alignment + Str

VITA lab at EPFL 39 Dec 25, 2022
IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020)

This repo is the official implementation of our paper "Instance Adaptive Self-training for Unsupervised Domain Adaptation". The purpose of this repo is to better communicate with you and respond to y

CVSM Group - email: <a href=[email protected]"> 84 Dec 12, 2022
Code for "Continuous-Time Meta-Learning with Forward Mode Differentiation" (ICLR 2022)

Continuous-Time Meta-Learning with Forward Mode Differentiation ICLR 2022 (Spotlight) - Installation - Example - Citation This repository contains the

Tristan Deleu 25 Oct 20, 2022
Official PyTorch implementation of "Adversarial Reciprocal Points Learning for Open Set Recognition"

Adversarial Reciprocal Points Learning for Open Set Recognition Official PyTorch implementation of "Adversarial Reciprocal Points Learning for Open Se

Guangyao Chen 78 Dec 28, 2022
Multi-Scale Progressive Fusion Network for Single Image Deraining

Multi-Scale Progressive Fusion Network for Single Image Deraining (MSPFN) This is an implementation of the MSPFN model proposed in the paper (Multi-Sc

Kuijiang 128 Nov 21, 2022
A Marvelous ChatBot implement using PyTorch.

PyTorch Marvelous ChatBot [Update] it's 2019 now, previously model can not catch up state-of-art now. So we just move towards the future a transformer

JinTian 223 Oct 18, 2022
Python版OpenCVのTracking APIのサンプルです。DaSiamRPNアルゴリズムまで対応しています。

OpenCV-Object-Tracker-Sample Python版OpenCVのTracking APIのサンプルです。   Requirement opencv-contrib-python 4.5.3.56 or later Algorithm 2021/07/16時点でOpenCVには以

KazuhitoTakahashi 36 Jan 01, 2023
Out-of-boundary View Synthesis towards Full-frame Video Stabilization

Out-of-boundary View Synthesis towards Full-frame Video Stabilization Introduction | Update | Results Demo | Introduction This repository contains the

25 Oct 10, 2022
Dense matching library based on PyTorch

Dense Matching A general dense matching library based on PyTorch. For any questions, issues or recommendations, please contact Prune at

Prune Truong 399 Dec 28, 2022
DiffWave is a fast, high-quality neural vocoder and waveform synthesizer.

DiffWave DiffWave is a fast, high-quality neural vocoder and waveform synthesizer. It starts with Gaussian noise and converts it into speech via itera

LMNT 498 Jan 03, 2023
Experiment about Deep Person Re-identification with EfficientNet-v2

We evaluated the baseline with Resnet50 and Efficienet-v2 without using pretrained models. Also Resnet50-IBN-A and Efficientnet-v2 using pretrained on ImageNet. We used two datasets: Market-1501 and

lan.nguyen2k 77 Jan 03, 2023
Python Classes: Medical Insurance Project using Object Oriented Programming Concepts

Medical-Insurance-Project-OOP Python Classes: Medical Insurance Project using Object Oriented Programming Concepts Classes are an incredibly useful pr

Hugo B. 0 Feb 04, 2022
Text and code for the forthcoming second edition of Think Bayes, by Allen Downey.

Think Bayes 2 by Allen B. Downey The HTML version of this book is here. Think Bayes is an introduction to Bayesian statistics using computational meth

Allen Downey 1.5k Jan 08, 2023
QuadTree Attention for Vision Transformers (ICLR2022)

This repository contains codes for quadtree attention. This repo contains codes for feature matching, image classficiation, object detection and seman

tangshitao 222 Dec 28, 2022