Skip to content

Commit

Permalink
Merge branch 'main' into update_compiler_support
Browse files Browse the repository at this point in the history
  • Loading branch information
Twon committed Dec 30, 2024
2 parents 6eda180 + 1216212 commit 94e25b3
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ jobs:
lib: "libc++",
}
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2

- name: Cache Conan data
uses: actions/cache@v3.3.2
uses: actions/cache@v4.1.2
env:
cache-name: cache-conan-data
with:
Expand All @@ -191,7 +191,7 @@ jobs:

- name: Add msbuild to PATH
if: matrix.settings.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.3.1
uses: microsoft/setup-msbuild@v2
with:
vs-version: "16.5"

Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
xcode-version: '${{matrix.settings.compiler.version}}'

- name: Set up Python
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.3.0
with:
python-version: '3.11'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
os: [ "ubuntu-latest" ]

steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2

- name: Cache Conan data
uses: actions/[email protected]
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
sudo apt-get install libdatetime-perl
- name: Set up Python
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.3.0
with:
python-version: '3.11'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
os: [ "ubuntu-latest" ]

steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2

- name: Cache Conan data
uses: actions/[email protected]
Expand All @@ -64,7 +64,7 @@ jobs:
platform: x64

- name: Set up Python
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.3.0
with:
python-version: '3.11'

Expand Down
35 changes: 34 additions & 1 deletion cmake/targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ Overview
Locates all targets with in a directory and its subdirectories.
.. code-block:: cmake
targets_get_all(
[DIRECTORY <directory>]
[RESULT <result>]
)
``DIRECTORY``
The ``DIRECTORY`` option specifies the directory to recursively search for targets
from.
``RESULT``
The ``RESULT`` option is required to store the results of the function. The list
of all targets from the specified directory and below.
#]=======================================================================]
function(targets_get_all)
Expand Down Expand Up @@ -60,6 +74,20 @@ Overview
Given a list of targets will return a list of targets containing sources to be
compiled.
.. code-block:: cmake
targets_filter_for_sources(
[TARGETS <targets...>]
[RESULT <result>]
)
``TARGETS``
The ``TARGETS`` option specifies a list of targets to retrieve source files for.
``RESULT``
The ``RESULT`` option is required to store the results of the function. The list
of source files for all requested targets.
#]=======================================================================]
function(targets_filter_for_sources)
set(options)
Expand Down Expand Up @@ -137,10 +165,15 @@ function(targets_get_translation_units)
list(APPEND targetTranslationUnits ${filteredTargetSource})
endforeach()

get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
get_target_property(targetBinaryDir ${ARGS_TARGET} BINARY_DIR)
foreach(file IN LISTS targetTranslationUnits)
targets_relative_path_of_source(TARGET_NAME ${ARGS_TARGET} RESULT file SOURCE_FILE ${file})
set(translationUnitLocation "${targetBinaryDir}/CMakeFiles/${ARGS_TARGET}.dir/${file}")
if(IS_MULTI_CONFIG)
set(translationUnitLocation "${targetBinaryDir}/CMakeFiles/${ARGS_TARGET}.dir/$<CONFIG>/${file}")
else()
set(translationUnitLocation "${targetBinaryDir}/CMakeFiles/${ARGS_TARGET}.dir/${file}")
endif()
list(APPEND targetTranslationUnitLocations ${translationUnitLocation})
endforeach()

Expand Down

0 comments on commit 94e25b3

Please sign in to comment.