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)
This repo tries to recognize faces in the dataset you created

YÜZ TANIMA SİSTEMİ Bu repo oluşturacağınız yüz verisetlerini tanımaya çalışan ma

Mehdi KOŞACA 2 Dec 30, 2021
Codes for building and training the neural network model described in Domain-informed neural networks for interaction localization within astroparticle experiments.

Domain-informed Neural Networks Codes for building and training the neural network model described in Domain-informed neural networks for interaction

DIDACTS 0 Dec 13, 2021
TDN: Temporal Difference Networks for Efficient Action Recognition

TDN: Temporal Difference Networks for Efficient Action Recognition Overview We release the PyTorch code of the TDN(Temporal Difference Networks).

Multimedia Computing Group, Nanjing University 326 Dec 13, 2022
Meaningful titles for tabs and PDF downloads! Also supports tab search.

arxiv-utils If you are a researcher that reads a lot on ArXiv, you'll benefit a lot from this web extension. Renames the title of PDF page to the pape

Johnson 174 Dec 20, 2022
CNN Based Meta-Learning for Noisy Image Classification and Template Matching

CNN Based Meta-Learning for Noisy Image Classification and Template Matching Introduction This master thesis used a few-shot meta learning approach to

Kumar Manas 2 Dec 09, 2021
SMPLpix: Neural Avatars from 3D Human Models

subject0_validation_poses.mp4 Left: SMPL-X human mesh registered with SMPLify-X, middle: SMPLpix render, right: ground truth video. SMPLpix: Neural Av

Sergey Prokudin 292 Dec 30, 2022
Learning Temporal Consistency for Low Light Video Enhancement from Single Images (CVPR2021)

StableLLVE This is a Pytorch implementation of "Learning Temporal Consistency for Low Light Video Enhancement from Single Images" in CVPR 2021, by Fan

99 Dec 19, 2022
Code of the paper "Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition"

SEW (Squeezed and Efficient Wav2vec) The repo contains the code of the paper "Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speec

ASAPP Research 67 Dec 01, 2022
nn_builder lets you build neural networks with less boilerplate code

nn_builder lets you build neural networks with less boilerplate code. You specify the type of network you want and it builds it. Install pip install n

Petros Christodoulou 157 Nov 20, 2022
Reference models and tools for Cloud TPUs.

Cloud TPUs This repository is a collection of reference models and tools used with Cloud TPUs. The fastest way to get started training a model on a Cl

5k Jan 05, 2023
A PyTorch based deep learning library for drug pair scoring.

Documentation | External Resources | Datasets | Examples ChemicalX is a deep learning library for drug-drug interaction, polypharmacy side effect and

AstraZeneca 597 Dec 30, 2022
E2C implementation in PyTorch

Embed to Control implementation in PyTorch Paper can be found here: https://arxiv.org/abs/1506.07365 You will need a patched version of OpenAI Gym in

Yicheng Luo 42 Dec 12, 2022
Implement some metaheuristics and cost functions

Metaheuristics This repot implement some metaheuristics and cost functions. Metaheuristics JAYA Implement Jaya optimizer without constraints. Cost fun

Adri1G 1 Mar 23, 2022
Parametric Contrastive Learning (ICCV2021)

Parametric-Contrastive-Learning This repository contains the implementation code for ICCV2021 paper: Parametric Contrastive Learning (https://arxiv.or

DV Lab 156 Dec 21, 2022
DA2Lite is an automated model compression toolkit for PyTorch.

DA2Lite (Deep Architecture to Lite) is a toolkit to compress and accelerate deep network models. ⭐ Star us on GitHub — it helps!! Frameworks & Librari

Sinhan Kang 7 Mar 22, 2022
Rapid experimentation and scaling of deep learning models on molecular and crystal graphs.

LitMatter A template for rapid experimentation and scaling deep learning models on molecular and crystal graphs. How to use Clone this repository and

Nathan Frey 32 Dec 06, 2022
ML-Decoder: Scalable and Versatile Classification Head

ML-Decoder: Scalable and Versatile Classification Head Paper Official PyTorch Implementation Tal Ridnik, Gilad Sharir, Avi Ben-Cohen, Emanuel Ben-Baru

189 Jan 04, 2023
Keras Model Implementation Walkthrough

Keras Model Implementation Walkthrough

Luke Wood 17 Sep 27, 2022
BasicNeuralNetwork - This project looks over the basic structure of a neural network and how machine learning training algorithms work

BasicNeuralNetwork - This project looks over the basic structure of a neural network and how machine learning training algorithms work. For this project, I used the sigmoid function as an activation

Manas Bommakanti 1 Jan 22, 2022
Denoising Diffusion Probabilistic Models

Denoising Diffusion Probabilistic Models Jonathan Ho, Ajay Jain, Pieter Abbeel Paper: https://arxiv.org/abs/2006.11239 Website: https://hojonathanho.g

Jonathan Ho 1.5k Jan 08, 2023