toys/admake
anjingyu e78b318b05 feat: update 2024-09-06 19:57:31 +08:00
..
adtools feat: update 2024-09-06 19:57:31 +08:00
docker feat: admake 2024-04-14 23:29:46 +08:00
scripts feat: admake 2024-04-14 23:29:46 +08:00
.gitignore feat: admake 2024-04-14 23:29:46 +08:00
LICENSE feat: admake 2024-04-14 23:29:46 +08:00
README.md feat: admake 2024-04-14 23:29:46 +08:00
build.sh feat: admake 2024-04-14 23:29:46 +08:00
pyproject.toml feat: admake 2024-04-14 23:29:46 +08:00
reinstall.ps1 feat: admake 2024-04-14 23:29:46 +08:00
reinstall.sh feat: admake 2024-04-14 23:29:46 +08:00
requirements.txt feat: admake 2024-04-14 23:29:46 +08:00
setup.cfg feat: admake 2024-04-14 23:29:46 +08:00
setup.py feat: admake 2024-04-14 23:29:46 +08:00

README.md

Advanced Make Tools

Install

On Linux:

sudo apt install cmake git clang

./reinstall.sh

On Windows:

winget install git
winget install cmake
# OR
scoop install cmake
scoop install git

./reinstall.ps1

On macOS:

brew install cmake
brew install git
xcode-select --install

NOTE

For IDE users, please append the following code snippets into your CMakeLists.txt:

# For IDEs
# When using IDE to open this cmake project, it will never to append the
# argument `CMAKE_MODULE_PATH`, so we must set it in the CMakeLists.txt file
# before including the cmake modules of admake.
if (NOT DEFINED CMAKE_MODULE_PATH)
    execute_process (COMMAND admake dirs -c
                OUTPUT_STRIP_TRAILING_WHITESPACE
                RESULT_VARIABLE _ADMAKE_CODE
                OUTPUT_VARIABLE _ADMAKE_CMAKE_DIR
                ERROR_VARIABLE _ADMAKE_ERROR)
    if (NOT _ADMAKE_CODE EQUAL "0")
        message (FATAL_ERROR "Failed to append cmake modules of admake: ${_ADMAKE_ERROR}")
    else ()
        set (CMAKE_MODULE_PATH "${_ADMAKE_CMAKE_DIR}")
    endif ()

    set (IN_IDE ON)
endif ()

# ...

include (admake)

# Add the OS definitions manually
if (IN_IDE)
    add_compile_definitions (${ADMAKE_OS_DEF})
endif ()

Publish

NOTE: I will migrate to poetry in the near future.

# Install twine
pip install -U twine

./build.sh

twine upload --repository-url <repo-url> -u <username> -p <password>

TODO

  • Cross-compiling environment based on docker.
  • Code coverage.
  • Import/export 3rd-party libraries.
  • Refactor the link/compile options via add_library (INTERFACE).