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)
Owner
null
noisy labels; missing labels; semi-supervised learning; entropy; uncertainty; robustness and generalisation.

ProSelfLC: CVPR 2021 ProSelfLC: Progressive Self Label Correction for Training Robust Deep Neural Networks For any specific discussion or potential fu

amos_xwang 57 Dec 4, 2022
Python package for missing-data imputation with deep learning

MIDASpy Overview MIDASpy is a Python package for multiply imputing missing data using deep learning methods. The MIDASpy algorithm offers significant

MIDASverse 77 Dec 3, 2022
Code for Subgraph Federated Learning with Missing Neighbor Generation (NeurIPS 2021)

To run the code Unzip the package to your local directory; Run 'pip install -r requirements.txt' to download required packages; Open file ~/nips_code/

null 32 Dec 26, 2022
Official Pytorch Implementation of Relational Self-Attention: What's Missing in Attention for Video Understanding

Relational Self-Attention: What's Missing in Attention for Video Understanding This repository is the official implementation of "Relational Self-Atte

mandos 43 Dec 7, 2022
Simple and Robust Loss Design for Multi-Label Learning with Missing Labels

Simple and Robust Loss Design for Multi-Label Learning with Missing Labels Official PyTorch Implementation of the paper Simple and Robust Loss Design

Xinyu Huang 28 Oct 27, 2022
Project Aquarium is a SUSE-sponsored open source project aiming at becoming an easy to use, rock solid storage appliance based on Ceph.

Project Aquarium Project Aquarium is a SUSE-sponsored open source project aiming at becoming an easy to use, rock solid storage appliance based on Cep

Aquarist Labs 73 Jul 21, 2022
This project uses reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can learn to read tape. The project is dedicated to hero in life great Jesse Livermore.

Reinforcement-trading This project uses Reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can

Deepender Singla 1.4k Dec 22, 2022
It's final year project of Diploma Engineering. This project is based on Computer Vision.

Face-Recognition-Based-Attendance-System It's final year project of Diploma Engineering. This project is based on Computer Vision. Brief idea about ou

Neel 10 Nov 2, 2022
Erpnext app for make employee salary on payroll entry based on one or more project with percentage for all project equal 100 %

Project Payroll this app for make payroll for employee based on projects like project on 30 % and project 2 70 % as account dimension it makes genral

Ibrahim Morghim 8 Jan 2, 2023
BC3407-Group-5-Project - BC3407 Group Project With Python

BC3407-Group-5-Project As the world struggles to contain the ever-changing varia

null 1 Jan 26, 2022
UpChecker is a simple opensource project to host it fast on your server and check is server up, view statistic, get messages if it is down. UpChecker - just run file and use project easy

UpChecker UpChecker is a simple opensource project to host it fast on your server and check is server up, view statistic, get messages if it is down.

Yan 4 Apr 7, 2022
The project is an official implementation of our CVPR2019 paper "Deep High-Resolution Representation Learning for Human Pose Estimation"

Deep High-Resolution Representation Learning for Human Pose Estimation (CVPR 2019) News [2020/07/05] A very nice blog from Towards Data Science introd

Leo Xiao 3.9k Jan 5, 2023
Warning: This project does not have any current developer. See bellow.

Pylearn2: A machine learning research library Warning : This project does not have any current developer. We will continue to review pull requests and

Laboratoire d’Informatique des Systèmes Adaptatifs 2.7k Dec 26, 2022
This project is for a Twitter bot that monitors a bird feeder in my backyard. Any detected birds are identified and posted to Twitter.

Backyard Birdbot Introduction This is a silly hobby project to use existing ML models to: Detect any birds sighted by a webcam Identify whic

Chi Young Moon 71 Dec 25, 2022
Generic template to bootstrap your PyTorch project with PyTorch Lightning, Hydra, W&B, and DVC.

NN Template Generic template to bootstrap your PyTorch project. Click on Use this Template and avoid writing boilerplate code for: PyTorch Lightning,

Luca Moschella 520 Dec 30, 2022
THIS IS THE **OLD** PYMC PROJECT. PLEASE USE PYMC3 INSTEAD:

Introduction Version: 2.3.8 Authors: Chris Fonnesbeck Anand Patil David Huard John Salvatier Web site: https://github.com/pymc-devs/pymc Documentation

PyMC 7.2k Jan 7, 2023
This project is the official implementation of our accepted ICLR 2021 paper BiPointNet: Binary Neural Network for Point Clouds.

BiPointNet: Binary Neural Network for Point Clouds Created by Haotong Qin, Zhongang Cai, Mingyuan Zhang, Yifu Ding, Haiyu Zhao, Shuai Yi, Xianglong Li

Haotong Qin 59 Dec 17, 2022
project page for VinVL

VinVL: Revisiting Visual Representations in Vision-Language Models Updates 02/28/2021: Project page built. Introduction This repository is the project

null 308 Jan 9, 2023