1#
2# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
3#
4# SPDX-License-Identifier: BSD-2-Clause
5#
6
7cmake_minimum_required(VERSION 3.7.2)
8
9file(GLOB result RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" projects/*/CMakeLists.txt)
10
11# We sort the results to ensure that builds are deterministic. Whilst build scripts
12# should not be written to need a particular order of globbed results here, it is
13# better to have reliable builds than random failures
14list(SORT result)
15
16foreach(file ${result})
17    string(
18        REPLACE
19            "CMakeLists.txt"
20            ""
21            file
22            "${file}"
23    )
24    add_subdirectory("${file}")
25endforeach()
26