Skip to content

Commit 1a9a548

Browse files
authored
Feat/aui.boot isolate src (#690)
* Revert "fix aui.toolbox interfering version (#684)" This reverts commit 12554c2. * u * use git_shallow, use isloated source dirs * update deps to use git instead of archive * update docs * do not change host toolbox version PLEASE * update pathing * update docs
1 parent 73e3515 commit 1a9a548

File tree

5 files changed

+23
-38
lines changed

5 files changed

+23
-38
lines changed

aui.boot.cmake

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -697,22 +697,12 @@ function(auib_import AUI_MODULE_NAME URL)
697697
_auib_update_imported_targets_list()
698698
endif()
699699

700+
# the AUI_MODULE_NAME-TAG_OR_HASH is used to hint IDEs (i.e. CLion) about actual project name
701+
set(DEP_SOURCE_DIR "${AUIB_CACHE_DIR}/repo/${AUI_MODULE_PREFIX}-${TAG_OR_HASH}")
702+
set(DEP_BINARY_DIR "${AUIB_CACHE_DIR}/builds/${AUI_MODULE_PREFIX}-${BUILD_SPECIFIER}")
703+
set(DEP_FETCHED_FLAG ${DEP_SOURCE_DIR}/FETCHED)
700704
if (DEP_ADD_SUBDIRECTORY)
701-
set(DEP_AS_DIR "${AUIB_CACHE_DIR}/repo/${AUI_MODULE_PREFIX}/as/${TAG_OR_HASH}")
702-
703-
# the AUI_MODULE_NAME is used to hint IDEs (i.e. CLion) about actual project name
704-
set(DEP_SOURCE_DIR "${DEP_AS_DIR}/${AUI_MODULE_NAME_LOWER}")
705-
set(DEP_BINARY_DIR "${DEP_AS_DIR}/build/${BUILD_SPECIFIER}")
706-
set(DEP_FETCHED_FLAG ${DEP_AS_DIR}/FETCHED)
707-
else()
708-
if (AUIB_ISOLATE_SOURCE_DIRS)
709-
set(DEP_SOURCE_DIR "${AUIB_CACHE_DIR}/repo/${AUI_MODULE_PREFIX}-${TAG_OR_HASH}/src")
710-
set(DEP_BINARY_DIR "${AUIB_CACHE_DIR}/repo/${AUI_MODULE_PREFIX}-${TAG_OR_HASH}/build/${BUILD_SPECIFIER}")
711-
else()
712-
set(DEP_SOURCE_DIR "${AUIB_CACHE_DIR}/repo/${AUI_MODULE_PREFIX}/src")
713-
set(DEP_BINARY_DIR "${AUIB_CACHE_DIR}/repo/${AUI_MODULE_PREFIX}/build/${BUILD_SPECIFIER}")
714-
endif()
715-
set(DEP_FETCHED_FLAG ${DEP_SOURCE_DIR}/FETCHED)
705+
set(DEP_BINARY_DIR "${AUIB_CACHE_DIR}/builds/${AUI_MODULE_PREFIX}-${BUILD_SPECIFIER}-as")
716706
endif()
717707

718708
# invalidate all previous values.
@@ -843,6 +833,7 @@ function(auib_import AUI_MODULE_NAME URL)
843833
GIT_PROGRESS TRUE # show progress of download
844834
USES_TERMINAL_DOWNLOAD TRUE # show progress in ninja generator
845835
USES_TERMINAL_UPDATE TRUE # show progress in ninja generator
836+
GIT_SHALLOW TRUE # clone just the specified commit
846837
${SOURCE_BINARY_DIRS_ARG}
847838
)
848839
else()
@@ -853,6 +844,7 @@ function(auib_import AUI_MODULE_NAME URL)
853844
GIT_PROGRESS TRUE # show progress of download
854845
USES_TERMINAL_DOWNLOAD TRUE # show progress in ninja generator
855846
USES_TERMINAL_UPDATE TRUE # show progress in ninja generator
847+
GIT_SHALLOW TRUE # clone just the specified commit
856848
${SOURCE_BINARY_DIRS_ARG}
857849
)
858850

aui.curl/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ else()
88
VERSION curl-7_84_0
99
CMAKE_ARGS -DCURL_USE_MBEDTLS=ON -DCURL_TARGET_WINDOWS_VERSION=0x0501)
1010
else()
11-
auib_import(CURL https://github.com/aui-framework/curl/archive/75a1d9954a4184b42a9365c7d4225b802530634c.zip
12-
ARCHIVE
11+
auib_import(CURL https://github.com/aui-framework/curl/
12+
VERSION 75a1d9954a4184b42a9365c7d4225b802530634c
1313
CMAKE_ARGS -DCURL_USE_MBEDTLS=ON -DBUILD_CURL_EXE=OFF -DUSE_NGHTTP2=OFF -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_USE_LIBSSH2=OFF
1414
)
1515
endif()

aui.views/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ if (OPENGL_FOUND OR ANDROID OR IOS)
1515
# Freetype 2.14.1 fails to build with recent CMake versions due to policy issues.
1616
# Setting CMAKE_POLICY_VERSION_MINIMUM to 3.5 is a workaround.
1717
# See also: https://github.com/aui-framework/aui/pull/687
18-
auib_import(Freetype https://github.com/freetype/freetype/archive/refs/tags/VER-2-14-1.zip ARCHIVE
18+
auib_import(Freetype https://github.com/freetype/freetype
19+
VERSION VER-2-14-1
1920
CONFIG_ONLY
2021
CMAKE_ARGS
2122
-DFT_DISABLE_BZIP2=ON

cmake/aui.build.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ _aui_check_toolbox()
846846
AUIB_FORCE_PRECOMPILED)
847847
list(APPEND _forwarded_args "-D${_name}=${${_name}}")
848848
endforeach()
849-
execute_process(COMMAND ${CMAKE_COMMAND} .. -G${_generator} -DAUIB_CACHE_DIR=${AUIB_CACHE_DIR} -DAUIB_SKIP_REPOSITORY_WAIT=ON -DAUIB_ISOLATE_SOURCE_DIRS=ON ${_forwarded_args}
849+
execute_process(COMMAND ${CMAKE_COMMAND} .. -G${_generator} -DAUIB_CACHE_DIR=${AUIB_CACHE_DIR} -DAUIB_SKIP_REPOSITORY_WAIT=ON ${_forwarded_args}
850850
WORKING_DIRECTORY ${_workdir}/b
851851
RESULT_VARIABLE _r
852852
OUTPUT_FILE ${_build_log}

docs/aui.boot.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -453,17 +453,6 @@ Disables aui.boot. All calls to `auib_import` are forwarded to `find_package`.
453453
454454
Disables "Waiting for repository".
455455
456-
This flag is unsafe because one aui.boot process might interfere with the work of another aui.boot process.
457-
458-
The following flags are recommended to be set to true as well:
459-
460-
- `AUIB_ISOLATE_SOURCE_DIRS`
461-
462-
### AUIB_ISOLATE_SOURCE_DIRS (=FALSE|TRUE)
463-
464-
By default, aui.boot will reuse the same [repository directory](#AUIB_REPO_DIR) for all dependencies. This flag adds
465-
unique suffix to each source directory.
466-
467456
### AUIB_NO_PRECOMPILED (=FALSE|TRUE) { #AUIB_NO_PRECOMPILED }
468457
469458
Disables precompiled binaries, building all dependencies locally. You may want to set up [CI_CACHING].
@@ -656,17 +645,20 @@ Here's how exactly it is computed:
656645

657646
Contains dependencies source code (if any), downloaded by `auib_import`.
658647

659-
- `~/.aui/repo/<PackageName>/src` - source code of `<PackageName>`. If it is a git repository, AUI.Boot will try to
660-
checkout a specific version first instead of cloning the whole repo again.
661-
- `~/.aui/repo/<PackageName>/src/FETCHED` - indicates the latest download is successful.
662-
- `~/.aui/repo/<PackageName>/build` - `<PackageName>` build directory. Cleaned up after a successful installation.
648+
- `~/.aui/repo/<PackageName>-<VERSION_OR_HASH>` - source code of `<PackageName>` for the specific version/hash.
649+
If it is a git repository, AUI.Boot will try to checkout that specific version first instead of cloning the whole repo
650+
again.
651+
- `~/.aui/repo/<PackageName>-<VERSION_OR_HASH>/FETCHED` - indicates the latest download was successful.
652+
653+
### ~/.aui/builds
654+
655+
- `~/.aui/builds/<PackageName>-<BUILD_SPECIFIER>` - `<PackageName>` build directory for that build configuration.
656+
Cleaned up after a successful installation.
663657

664658
If the dependency imported as a [subdirectory](#AUIB_ADD_SUBDIRECTORY), these paths are used instead:
665659

666-
- `~/.aui/repo/<PackageName>/as/<VERSION>/<PackageName>` - a copy of source to be used by CMake's `add_subdirectory`.
667-
The second `<PackageName>` helps IDEs such as CLion to identify dependency name.
668-
- `~/.aui/repo/<PackageName>/as/<VERSION>/<PackageName>/FETCHED` - indicates the latest download is successful.
669-
- `~/.aui/repo/<PackageName>/as/<VERSION>/build` - build directory.
660+
- `~/.aui/builds/<PackageName>-<BUILD_SPECIFIER>-as` - `<PackageName>` build directory for that build configuration.
661+
Cleaned up after a successful installation.
670662

671663
### ~/.aui/crosscompile-host
672664

0 commit comments

Comments
 (0)