diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e5b7dd..60892d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,109 +1,233 @@ ##================================================================================================== ## SPY - C++ Informations Broker -## Copyright 2020 Joel FALCOU +## Copyright 2020-2021 Joel FALCOU ## ## Licensed under the MIT License . ## SPDX-License-Identifier: MIT ##================================================================================================== version: 2.1 -##================================================================================================== -## Docker images -##================================================================================================== -docker_gcc: &docker_gcc - docker: - - image: compilaction/gcc-dev:latest - environment: - COMPILER: g++ -docker_clang: &docker_clang - docker: - - image: compilaction/clang-dev:latest - environment: - COMPILER: clang++ -docker_aarch64: &docker_aarch64 - docker: - - image: compilaction/gcc-dev:latest - environment: - RUN_COMMAND: qemu-aarch64 - COMPILER: aarch64-linux-gnu-g++ - +commands: + run_test: + description: "Configure and run tests from a CMake Toolchain" + parameters: + desc: + type: string + tool: + type: string + proc: + type: integer + default: 8 + steps: + - run: + name: << parameters.desc >> + command: | + mkdir -p build && cd build && + cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=<< parameters.tool >> && + ninja unit -j << parameters.proc >> && ctest -j << parameters.proc >> -##================================================================================================== -## Build configurations -##================================================================================================== -config_gcc_amd64: &config_gcc_amd64 - <<: *docker_gcc -config_clang_amd64: &config_clang_amd64 - <<: *docker_clang -config_clang_x86: &config_clang_x86 - <<: *docker_clang -config_aarch64: &config_aarch64 - <<: *docker_aarch64 -##================================================================================================== -## Jobs list -##================================================================================================== jobs: - ##================================================================================================ - ## X86/AMD64 Tests - ##================================================================================================ - gcc_amd64: - <<: *config_gcc_amd64 + x86_clang_debug: + docker: + - image: jfalcou/compilers:latest steps: - checkout - - run: - name: Running Basic Tests - SSE2 - command: VARIANT="sse2" OPTIONS="-O3 -msse2" . .circleci/run.sh - - run: - name: Running Basic Tests - SSE4 - command: VARIANT="sse4" OPTIONS="-O3 -msse4" . .circleci/run.sh - - run: - name: Running Basic Tests - AVX - command: VARIANT="avx" OPTIONS="-O3 -mavx" . .circleci/run.sh - - run: - name: Running Basic Tests - FMA3 - command: VARIANT="fma" OPTIONS="-O3 -mavx -mfma" . .circleci/run.sh - - run: - name: Running Basic Tests - AVX2 - command: VARIANT="avx2" OPTIONS="-O3 -mavx2" . .circleci/run.sh - - run: - name: Running Basic Tests - AVX512 - command: VARIANT="avx2" OPTIONS="-O3 -mavx512f" . .circleci/run.sh + - run_test: + desc: Running Debug tests + tool: "../test/toolchain/clang.x86.debug.cmake" - clang_amd64: - <<: *config_clang_amd64 + x86_clang_release: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Release tests + tool: "../test/toolchain/clang.x86.release.cmake" + + ppc64le_clang_debug: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Debug tests + tool: "../test/toolchain/clang.ppc64le.debug.cmake" + + ppc64le_clang_release: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Release tests + tool: "../test/toolchain/clang.ppc64le.release.cmake" + + arm_clang_debug: + docker: + - image: jfalcou/compilers:latest steps: - checkout - run: - name: Running Basic Tests - SSE2 - command: VARIANT="sse2" OPTIONS="-O3 -msse2" . .circleci/run.sh - - run: - name: Running Basic Tests - SSE4 - command: VARIANT="sse4" OPTIONS="-O3 -msse4" . .circleci/run.sh - - run: - name: Running Basic Tests - AVX - command: VARIANT="avx" OPTIONS="-O3 -mavx" . .circleci/run.sh + name: Update ARM processor model to emulate + command: | + mkdir -p build && cd build && + echo "qemu-arm -cpu cortex-a15 \$@" >> run_arm && chmod +x run_arm && + cd .. + - run_test: + desc: Running Debug tests + tool: "../test/toolchain/clang.arm.debug.cmake" + + arm_clang_release: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout - run: - name: Running Basic Tests - FMA3 - command: VARIANT="fma" OPTIONS="-O3 -mavx -mfma" . .circleci/run.sh + name: Update ARM processor model to emulate + command: | + mkdir -p build && cd build && + echo "qemu-arm -cpu cortex-a15 \$@" >> run_arm && chmod +x run_arm && + cd .. + - run_test: + desc: Running Release tests + tool: "../test/toolchain/clang.arm.release.cmake" + + aarch64_clang_debug: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Debug tests + tool: "../test/toolchain/clang.aarch64.debug.cmake" + + aarch64_clang_release: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Release tests + tool: "../test/toolchain/clang.aarch64.release.cmake" + + x86_gcc_debug: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Debug tests + tool: "../test/toolchain/gcc.x86.debug.cmake" + + x86_gcc_release: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Release tests + tool: "../test/toolchain/gcc.x86.release.cmake" + + ppc64_gcc_debug: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Debug tests + tool: "../test/toolchain/gcc.ppc64.debug.cmake" + + ppc64_gcc_release: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Release tests + tool: "../test/toolchain/gcc.ppc64.release.cmake" + + arm_gcc_debug: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout - run: - name: Running Basic Tests - AVX2 - command: VARIANT="avx2" OPTIONS="-O3 -mavx2" . .circleci/run.sh + name: Update ARM processor model to emulate + command: | + mkdir -p build && cd build && + echo "qemu-arm -cpu cortex-a15 \$@" >> run_arm && chmod +x run_arm && + cd .. + - run_test: + desc: Running Debug tests + tool: "../test/toolchain/gcc.arm.debug.cmake" - arm_aarch64: - <<: *config_aarch64 + arm_gcc_release: + docker: + - image: jfalcou/compilers:latest steps: - checkout - run: - name: Running Basic Tests - AARCH64 NEON - command: VARIANT="aarch64" OPTIONS="-O3 -Wno-psabi" . .circleci/run.sh + name: Update ARM processor model to emulate + command: | + mkdir -p build && cd build && + echo "qemu-arm -cpu cortex-a15 \$@" >> run_arm && chmod +x run_arm && + cd .. + - run_test: + desc: Running Release tests + tool: "../test/toolchain/gcc.arm.release.cmake" + + aarch64_gcc_debug: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Debug tests + tool: "../test/toolchain/gcc.aarch64.debug.cmake" + + aarch64_gcc_release: + docker: + - image: jfalcou/compilers:latest + steps: + - checkout + - run_test: + desc: Running Release tests + tool: "../test/toolchain/gcc.aarch64.release.cmake" workflows: version: 2 build_and_test: jobs: - ##============================================================================================== - ## All tests - ##============================================================================================== - - gcc_amd64 - - clang_amd64 - - arm_aarch64 + - x86_clang_debug + - ppc64le_clang_debug + - arm_clang_debug + - aarch64_clang_debug + - x86_gcc_debug + - ppc64_gcc_debug + - arm_gcc_debug + - aarch64_gcc_debug + - x86_clang_release: + requires: + - x86_clang_debug + - ppc64le_clang_release: + requires: + - ppc64le_clang_debug + - arm_clang_release: + requires: + - arm_clang_debug + - aarch64_clang_release: + requires: + - aarch64_clang_debug + - x86_gcc_release: + requires: + - x86_gcc_debug + - ppc64_gcc_release: + requires: + - ppc64_gcc_debug + - arm_gcc_release: + requires: + - arm_gcc_debug + - aarch64_gcc_release: + requires: + - aarch64_gcc_debug diff --git a/.circleci/run.sh b/.circleci/run.sh deleted file mode 100644 index 3e3c1af..0000000 --- a/.circleci/run.sh +++ /dev/null @@ -1,31 +0,0 @@ -##================================================================================================== -## SPY - C++ Informations Broker -## Copyright 2020 Joel FALCOU -## -## Licensed under the MIT License . -## SPDX-License-Identifier: MIT -##================================================================================================== -#!/usr/bin/env bash - -##================================================================================================== -## Prepare variant's folder -##================================================================================================== -mkdir -p build/$VARIANT -cd build/$VARIANT - -##================================================================================================== -## CMAKE -##================================================================================================== -if [[ -v RUN_COMMAND ]] -then - echo "Running tests with $RUN_COMMAND ..." - cmake ../.. -G Ninja $CMAKE_OPTIONS -DCMAKE_CXX_COMPILER="$COMPILER" -DCMAKE_CXX_FLAGS="$OPTIONS" -DCMAKE_CROSSCOMPILING_CMD="$RUN_COMMAND" -else - cmake ../.. -G Ninja $CMAKE_OPTIONS -DCMAKE_CXX_COMPILER="$COMPILER" -DCMAKE_CXX_FLAGS="$OPTIONS" -fi - -##================================================================================================== -## Run every tests -##================================================================================================== -ninja unit -j 8 -ctest -j 8 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4043f4d..c6475bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ ## ------------------------------------------------------------------------------------------------- ## SPY - C++ Informations Broker -## Copyright 2020 Joel FALCOU +## Copyright 2020-2021 Joel FALCOU ## ## Licensed under the MIT License . ## SPDX-License-Identifier: MIT diff --git a/README.md b/README.md index db6d101..1c4cb18 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ advertise it here. ``` The MIT License (MIT) -Copyright (c) 2018-2020 Joel FALCOU +Copyright (c) 2018-2021 Joel FALCOU Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/appveyor.yml b/appveyor.yml index 6f55fd3..c78732e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ ## ------------------------------------------------------------------------------------------------- ## SPY - C++ Informations Broker -## Copyright 2020 Joel FALCOU +## Copyright 2020-2021 Joel FALCOU ## ## Licensed under the MIT License . ## SPDX-License-Identifier: MIT diff --git a/docs/index.html b/docs/index.html index f103747..d81a810 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,3 +1,10 @@ + ![**The C++ Informations Broker**](https://github.com/jfalcou/spy/raw/develop/logo.png) @@ -15,7 +22,6 @@ **References:** - ![**Our CppCon 2019 Ligthning talk video**](https://www.youtube.com/watch?v=t406o2EhG-A) - [Our CppCon 2019 Ligthning talk slides](https://docs.google.com/presentation/d/1nSBhU4pr5EWznni0MYsyDkMCr3O3q2XS-KQdz2_BRRI/edit?usp=sharing) @@ -211,7 +217,7 @@ | ------------- | ----------------------------------------------------------------------------------- | | X86 | `sse1_`, `sse2_`, `sse3_`, `ssse3_`, `sse41_`, `sse42_`, `avx_`, `avx2_`, `avx512_` | | Power PC | `vmx_`, `vsx_` | -| ARM | `neon_` | +| ARM | `neon_`,`asimd_` | Complete set of comparison operators is provided for those sets. Order of instructions sets are built so that if an instructions set supersedes another, it is considered greater than. For @@ -298,11 +304,6 @@ { std::cout << "This code has been compiled with AV512-VNNI support.\n"; } - - if constexpr( spy::supports::aarch64_ ) - { - std::cout << "This code has been compiled with AARCH64 support.\n"; - } } ~~~~~ @@ -313,7 +314,6 @@ | ------------- | ------------------------------------------------------------------------------------------------------------------------------- | | X86 AVX | `xop_`, `fma_`, `fma4_` | | X86 AVX512 | `avx512::bw_`, `avx512::cd_`, `avx512::dq_`, `avx512::er_`, `avx512::ifma_`, `avx512::pf_`, `avx512::vl_`, `avx512::popcntdq_`, `avx512::_4fmaps_`, `avx512::vnniw_`, `avx512::vbmi_`, `avx512::bf16_`, `avx512::bitalg_`, `avx512::vbmi2_`, `avx512::vnni_`, `avx512::vpintersect_` | -| ARM | `spy::supports::aarch64_` | Caveat with `if constexpr` ---------------------------------------------------------------------------------------------------- @@ -367,7 +367,7 @@ ``` The MIT License (MIT) -Copyright (c) 2018-2020 Joel FALCOU +Copyright (c) 2018-2021 Joel FALCOU Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/include/spy.hpp b/include/spy.hpp index ded5a2b..85c9af4 100644 --- a/include/spy.hpp +++ b/include/spy.hpp @@ -1,14 +1,14 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT */ //================================================================================================== #ifndef SPY_SPY_HPP_INCLUDED #define SPY_SPY_HPP_INCLUDED -#include +#include namespace spy::detail { enum class archs { undefined_ = -1 @@ -76,7 +76,7 @@ namespace spy constexpr inline auto arm_ = detail::arch_info{}; } #include -#include +#include namespace spy::detail { template constexpr int find(int i0) @@ -498,7 +498,7 @@ namespace spy::literal return detail::literal_wrap(); } } -#include +#include #if !defined(SPY_SIMD_DETECTED) && defined(__AVX512F__) # define SPY_SIMD_IS_X86_AVX512 # define SPY_SIMD_DETECTED ::spy::detail::simd_version::avx512_ @@ -707,7 +707,11 @@ namespace avx512 #endif } } -#if !defined(SPY_SIMD_DETECTED) && (defined(__ARM_NEON__) || defined(_M_ARM) || defined(__aarch64__)) +#if !defined(SPY_SIMD_DETECTED) && defined(__aarch64__) +# define SPY_SIMD_IS_ARM_ASIMD +# define SPY_SIMD_DETECTED ::spy::detail::simd_version::asimd_ +#endif +#if !defined(SPY_SIMD_DETECTED) && ((defined(__ARM_NEON__) || defined(_M_ARM)) && (__ARM_ARCH == 7)) # define SPY_SIMD_IS_ARM_NEON # define SPY_SIMD_DETECTED ::spy::detail::simd_version::neon_ #endif @@ -715,15 +719,6 @@ namespace avx512 # define SPY_SIMD_IS_ARM # define SPY_SIMD_VENDOR ::spy::detail::simd_isa::arm_ #endif -namespace spy::supports -{ -#if defined(__aarch64__) -# define SPY_SIMD_SUPPORTS_AARCH64 - constexpr inline auto aarch64_ = true; -#else - constexpr inline auto aarch64_ = false; -#endif -} #if !defined(SPY_SIMD_DETECTED) && defined(__VSX__) # define SPY_SIMD_IS_PPC_VSX # define SPY_SIMD_DETECTED ::spy::detail::simd_version::vsx_ @@ -744,7 +739,7 @@ namespace spy::detail , sse41_ = 1141, sse42_ = 1142, avx_ = 1201, avx2_ = 1202 , avx512_ = 1300 , vmx_ = 2001, vsx_ = 2002 - , neon_ = 3001 + , neon_ = 3001, asimd_ = 3002 }; template struct simd_info @@ -765,8 +760,8 @@ namespace spy::detail else if constexpr ( Version == simd_version::vmx_ ) os << "PPC VMX"; else if constexpr ( Version == simd_version::vsx_ ) os << "PPC VSX"; else if constexpr ( Version == simd_version::neon_ ) os << "ARM NEON"; + else if constexpr ( Version == simd_version::asimd_ ) os << "ARM ASIMD"; else return os << "Undefined SIMD instructions set"; - if constexpr (spy::supports::aarch64_) os << " (with AARCH64 support)"; if constexpr (spy::supports::fma_) os << " (with FMA3 support)"; if constexpr (spy::supports::fma4_) os << " (with FMA4 support)"; if constexpr (spy::supports::xop_) os << " (with XOP support)"; @@ -837,6 +832,7 @@ namespace spy using arm_simd_info = detail::simd_info; constexpr inline auto arm_simd_ = arm_simd_info<>{}; constexpr inline auto neon_ = arm_simd_info{}; + constexpr inline auto asimd_ = arm_simd_info{}; } #include #if defined(__APPLE__) || defined(__APPLE_CC__) || defined(macintosh) diff --git a/include/spy/arch.hpp b/include/spy/arch.hpp index 6731f21..217292c 100644 --- a/include/spy/arch.hpp +++ b/include/spy/arch.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT @@ -10,7 +10,7 @@ #ifndef SPY_ARCH_HPP_INCLUDED #define SPY_ARCH_HPP_INCLUDED -#include +#include namespace spy::detail { diff --git a/include/spy/compiler.hpp b/include/spy/compiler.hpp index 30496e4..ab10d43 100644 --- a/include/spy/compiler.hpp +++ b/include/spy/compiler.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT diff --git a/include/spy/data_model.hpp b/include/spy/data_model.hpp index 395b36c..3b1c80e 100644 --- a/include/spy/data_model.hpp +++ b/include/spy/data_model.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT diff --git a/include/spy/detail.hpp b/include/spy/detail.hpp index 7e0022e..9654702 100644 --- a/include/spy/detail.hpp +++ b/include/spy/detail.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT @@ -10,7 +10,7 @@ #ifndef SPY_DETAIL_HPP_INCLUDED #define SPY_DETAIL_HPP_INCLUDED -#include +#include namespace spy::detail { diff --git a/include/spy/libc.hpp b/include/spy/libc.hpp index 3f273ca..6f016d4 100644 --- a/include/spy/libc.hpp +++ b/include/spy/libc.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT diff --git a/include/spy/os.hpp b/include/spy/os.hpp index 1361fc9..be080a2 100644 --- a/include/spy/os.hpp +++ b/include/spy/os.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT diff --git a/include/spy/simd.hpp b/include/spy/simd.hpp index 5ded5e3..e329ac3 100644 --- a/include/spy/simd.hpp +++ b/include/spy/simd.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT @@ -10,7 +10,7 @@ #ifndef SPY_SIMD_HPP_INCLUDED #define SPY_SIMD_HPP_INCLUDED -#include +#include #include #include #include @@ -24,7 +24,7 @@ namespace spy::detail , sse41_ = 1141, sse42_ = 1142, avx_ = 1201, avx2_ = 1202 , avx512_ = 1300 , vmx_ = 2001, vsx_ = 2002 - , neon_ = 3001 + , neon_ = 3001, asimd_ = 3002 }; template @@ -47,9 +47,9 @@ namespace spy::detail else if constexpr ( Version == simd_version::vmx_ ) os << "PPC VMX"; else if constexpr ( Version == simd_version::vsx_ ) os << "PPC VSX"; else if constexpr ( Version == simd_version::neon_ ) os << "ARM NEON"; + else if constexpr ( Version == simd_version::asimd_ ) os << "ARM ASIMD"; else return os << "Undefined SIMD instructions set"; - if constexpr (spy::supports::aarch64_) os << " (with AARCH64 support)"; if constexpr (spy::supports::fma_) os << " (with FMA3 support)"; if constexpr (spy::supports::fma4_) os << " (with FMA4 support)"; if constexpr (spy::supports::xop_) os << " (with XOP support)"; @@ -143,6 +143,7 @@ namespace spy constexpr inline auto arm_simd_ = arm_simd_info<>{}; constexpr inline auto neon_ = arm_simd_info{}; + constexpr inline auto asimd_ = arm_simd_info{}; } #endif diff --git a/include/spy/simd/arm.hpp b/include/spy/simd/arm.hpp index 15c88dc..bcd9bc4 100644 --- a/include/spy/simd/arm.hpp +++ b/include/spy/simd/arm.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT @@ -10,7 +10,12 @@ #ifndef SPY_SIMD_ARM_HPP_INCLUDED #define SPY_SIMD_ARM_HPP_INCLUDED -#if !defined(SPY_SIMD_DETECTED) && (defined(__ARM_NEON__) || defined(_M_ARM) || defined(__aarch64__)) +#if !defined(SPY_SIMD_DETECTED) && defined(__aarch64__) +# define SPY_SIMD_IS_ARM_ASIMD +# define SPY_SIMD_DETECTED ::spy::detail::simd_version::asimd_ +#endif + +#if !defined(SPY_SIMD_DETECTED) && ((defined(__ARM_NEON__) || defined(_M_ARM)) && (__ARM_ARCH == 7)) # define SPY_SIMD_IS_ARM_NEON # define SPY_SIMD_DETECTED ::spy::detail::simd_version::neon_ #endif @@ -20,18 +25,4 @@ # define SPY_SIMD_VENDOR ::spy::detail::simd_isa::arm_ #endif -namespace spy::supports -{ - //================================================================================================ - // Supplemental ISA - //================================================================================================ -#if defined(__aarch64__) -# define SPY_SIMD_SUPPORTS_AARCH64 - constexpr inline auto aarch64_ = true; -#else - constexpr inline auto aarch64_ = false; -#endif - -} - #endif diff --git a/include/spy/simd/ppc.hpp b/include/spy/simd/ppc.hpp index 3c55c51..5ae3bfd 100644 --- a/include/spy/simd/ppc.hpp +++ b/include/spy/simd/ppc.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT diff --git a/include/spy/simd/x86.hpp b/include/spy/simd/x86.hpp index 4f22152..039c4c8 100644 --- a/include/spy/simd/x86.hpp +++ b/include/spy/simd/x86.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT diff --git a/include/spy/spy.hpp b/include/spy/spy.hpp index 6534b6d..a2f34c9 100644 --- a/include/spy/spy.hpp +++ b/include/spy/spy.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT diff --git a/include/spy/stdlib.hpp b/include/spy/stdlib.hpp index 9a5d614..3e655fe 100644 --- a/include/spy/stdlib.hpp +++ b/include/spy/stdlib.hpp @@ -1,7 +1,7 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT diff --git a/script/embed.py b/script/embed.py index 4a4dce0..eb308fc 100755 --- a/script/embed.py +++ b/script/embed.py @@ -2,7 +2,7 @@ #============================================================================== # SPY - C++ Informations Broker -# Copyright 2020 Joel FALCOU +# Copyright 2020-2021 Joel FALCOU # # Licensed under the MIT License . # SPDX-License-Identifier: MIT @@ -224,4 +224,3 @@ def embed(): # The entry point! if __name__ == '__main__': embed() - diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 77ab585..b1fe25c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,17 +1,25 @@ -## ------------------------------------------------------------------------------------------------- +##================================================================================================== ## SPY - C++ Informations Broker -## Copyright 2020 Joel FALCOU +## Copyright 2020-2021 Joel FALCOU ## ## Licensed under the MIT License . ## SPDX-License-Identifier: MIT -## ------------------------------------------------------------------------------------------------- +##================================================================================================== -if( MSVC ) - set( options /std:c++latest /W3 /EHsc ) +##================================================================================================== +# Unit test Configuration +##================================================================================================== +add_library(spy_test INTERFACE) +target_compile_features ( spy_test INTERFACE cxx_std_17 ) +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_compile_options( spy_test INTERFACE /W3 /EHsc) else() - set( options -std=c++17 -Wall -Wunused-parameter -Werror) + target_compile_options( spy_test INTERFACE -Wall -Werror) endif() +##================================================================================================== +# Generate a test +##================================================================================================== function(generate_test root file) string(REPLACE ".cpp" ".unit" base ${file}) string(REPLACE "/" "." base ${base}) @@ -19,7 +27,7 @@ function(generate_test root file) set(test "${root}.${base}") add_executable( ${test} "${file}") - target_compile_options ( ${test} PUBLIC ${options} ) + target_link_libraries(${test} PUBLIC spy_test) set_property( TARGET ${test} PROPERTY RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/unit" @@ -56,6 +64,9 @@ add_custom_target(unit) add_custom_target(spy.unit) add_dependencies(unit spy.unit) +##================================================================================================== +# All tests +##================================================================================================== generate_test("spy" "arch.cpp") generate_test("spy" "compiler.cpp") generate_test("spy" "data_model.cpp") @@ -63,4 +74,3 @@ generate_test("spy" "libc.cpp") generate_test("spy" "os.cpp") generate_test("spy" "simd.cpp") generate_test("spy" "stdlib.cpp") - diff --git a/test/arch.cpp b/test/arch.cpp index e6b550f..e4f79c9 100644 --- a/test/arch.cpp +++ b/test/arch.cpp @@ -1,13 +1,14 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT */ //================================================================================================== #include +#include #include int main() diff --git a/test/compiler.cpp b/test/compiler.cpp index 2e099d0..41a7427 100644 --- a/test/compiler.cpp +++ b/test/compiler.cpp @@ -1,13 +1,14 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT */ //================================================================================================== #include +#include #include int main() @@ -71,15 +72,15 @@ int main() using namespace spy::literal; #if defined(_MSC_VER) - auto const wrong_constexpr_behavior = 1'42'1337_msvc; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_msvc; #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) - auto const wrong_constexpr_behavior = 1'42'1337_intel; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_intel; #elif defined(__clang__) - auto const wrong_constexpr_behavior = 1'42'1337_clang; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_clang; #elif defined(__GNUC__) - auto const wrong_constexpr_behavior = 1'42'1337_gcc; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_gcc; #else - auto const wrong_constexpr_behavior = false; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = false; #endif if constexpr(spy::compiler) diff --git a/test/data_model.cpp b/test/data_model.cpp index 6a4f8bd..7e39d1c 100644 --- a/test/data_model.cpp +++ b/test/data_model.cpp @@ -1,13 +1,14 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT */ //================================================================================================== #include +#include #include int main() diff --git a/test/libc.cpp b/test/libc.cpp index 413dee9..e2cc4f3 100644 --- a/test/libc.cpp +++ b/test/libc.cpp @@ -1,13 +1,14 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT */ //================================================================================================== #include +#include #include int main() @@ -59,17 +60,17 @@ int main() using namespace spy::literal; #if defined(__cloudlibc__) - auto const wrong_constexpr_behavior = 1'42'1337_cloud; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_cloud; #elif defined(__UCLIBC__) - auto const wrong_constexpr_behavior = 1'42'1337_uc; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_uc; #elif defined(__CRTL_VER) - auto const wrong_constexpr_behavior = 1'42'1337_vms; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_vms; #elif defined(__LIBREL__) - auto const wrong_constexpr_behavior = 1'42'1337_zos; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_zos; #elif defined(__GLIBC__) || defined(__GNU_LIBRARY__) - auto const wrong_constexpr_behavior = 1'42'1337_gnu; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_gnu; #else - auto const wrong_constexpr_behavior = false; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = false; #endif if constexpr(spy::libc) diff --git a/test/os.cpp b/test/os.cpp index b303a9c..1e4609f 100644 --- a/test/os.cpp +++ b/test/os.cpp @@ -1,13 +1,14 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT */ //================================================================================================== #include +#include #include int main() diff --git a/test/simd.cpp b/test/simd.cpp index 034acfc..311add8 100644 --- a/test/simd.cpp +++ b/test/simd.cpp @@ -1,13 +1,14 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT */ //================================================================================================== #include +#include #include int main() @@ -49,8 +50,8 @@ int main() std::cout << "Check that ARM SIMD extension detection is correct: " << std::endl; { std::cout << "ARM SIMD status: " << std::boolalpha << (spy::simd_instruction_set == spy::arm_simd_ ) << std::endl; - std::cout << "NEON status: " << std::boolalpha << (spy::simd_instruction_set >= spy::neon_ ) << std::endl; - std::cout << "AARCH64 support: " << std::boolalpha << (spy::supports::aarch64_ ) << std::endl; + std::cout << "NEON status: " << std::boolalpha << (spy::simd_instruction_set >= spy::neon_ ) << std::endl; + std::cout << "ASIMD status: " << std::boolalpha << (spy::simd_instruction_set >= spy::asimd_) << std::endl; } std::cout << std::endl; diff --git a/test/stdlib.cpp b/test/stdlib.cpp index a665588..6c729ed 100644 --- a/test/stdlib.cpp +++ b/test/stdlib.cpp @@ -1,13 +1,14 @@ //================================================================================================== /* SPY - C++ Informations Broker - Copyright 2020 Joel FALCOU + Copyright 2020-2021 Joel FALCOU Licensed under the MIT License . SPDX-License-Identifier: MIT */ //================================================================================================== #include +#include #include int main() @@ -33,11 +34,11 @@ int main() using namespace spy::literal; #if defined(_LIBCPP_VERSION) - auto const wrong_constexpr_behavior = 1'42'1337_libcpp; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_libcpp; #elif defined(__GLIBCXX__) - auto const wrong_constexpr_behavior = 1'42'1337_gnucpp; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = 1'42'1337_gnucpp; #else - auto const wrong_constexpr_behavior = false; + [[maybe_unused]] auto constexpr wrong_constexpr_behavior = false; #endif if constexpr(spy::stdlib) diff --git a/test/toolchain/clang.aarch64.debug.cmake b/test/toolchain/clang.aarch64.debug.cmake new file mode 100644 index 0000000..070064e --- /dev/null +++ b/test/toolchain/clang.aarch64.debug.cmake @@ -0,0 +1,18 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR arm ) + +set(CMAKE_SYSROOT /usr/aarch64-linux-gnu) +set(CMAKE_C_COMPILER clang-10 ) +set(CMAKE_CXX_COMPILER clang++-10 ) +set(CMAKE_BUILD_TYPE Debug ) + +set(CMAKE_CXX_FLAGS "--target=aarch64-pc-linux-gnu -I/usr/aarch64-linux-gnu/include/c++/10/aarch64-linux-gnu" ) +set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld") +set(CMAKE_CROSSCOMPILING_CMD qemu-aarch64) diff --git a/test/toolchain/clang.aarch64.release.cmake b/test/toolchain/clang.aarch64.release.cmake new file mode 100644 index 0000000..43918bc --- /dev/null +++ b/test/toolchain/clang.aarch64.release.cmake @@ -0,0 +1,18 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR arm) + +set(CMAKE_SYSROOT /usr/aarch64-linux-gnu) +set(CMAKE_C_COMPILER clang-10 ) +set(CMAKE_CXX_COMPILER clang++-10 ) +set(CMAKE_BUILD_TYPE Release ) + +set(CMAKE_CXX_FLAGS "--target=aarch64-pc-linux-gnu -I/usr/aarch64-linux-gnu/include/c++/10/aarch64-linux-gnu" ) +set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld") +set(CMAKE_CROSSCOMPILING_CMD qemu-aarch64) diff --git a/test/toolchain/clang.arm.debug.cmake b/test/toolchain/clang.arm.debug.cmake new file mode 100644 index 0000000..144ad6b --- /dev/null +++ b/test/toolchain/clang.arm.debug.cmake @@ -0,0 +1,18 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR arm ) + +set(CMAKE_SYSROOT /usr/arm-linux-gnueabihf/ ) +set(CMAKE_C_COMPILER clang-10 ) +set(CMAKE_CXX_COMPILER clang++-10 ) +set(CMAKE_BUILD_TYPE Debug ) + +set(CMAKE_CXX_FLAGS "--target=armv7a-linux-gnueabihf -I/usr/arm-linux-gnueabihf/include/c++/10/arm-linux-gnueabihf" ) +set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" ) +set(CMAKE_CROSSCOMPILING_CMD ../run_arm ) diff --git a/test/toolchain/clang.arm.release.cmake b/test/toolchain/clang.arm.release.cmake new file mode 100644 index 0000000..9366b13 --- /dev/null +++ b/test/toolchain/clang.arm.release.cmake @@ -0,0 +1,18 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR arm ) + +set(CMAKE_SYSROOT /usr/arm-linux-gnueabihf/ ) +set(CMAKE_C_COMPILER clang-10 ) +set(CMAKE_CXX_COMPILER clang++-10 ) +set(CMAKE_BUILD_TYPE Release ) + +set(CMAKE_CXX_FLAGS "--target=armv7a-linux-gnueabihf -I/usr/arm-linux-gnueabihf/include/c++/10/arm-linux-gnueabihf" ) +set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" ) +set(CMAKE_CROSSCOMPILING_CMD ../run_arm ) diff --git a/test/toolchain/clang.ppc64le.debug.cmake b/test/toolchain/clang.ppc64le.debug.cmake new file mode 100644 index 0000000..0a05ef9 --- /dev/null +++ b/test/toolchain/clang.ppc64le.debug.cmake @@ -0,0 +1,18 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR powerpc ) + +set(CMAKE_SYSROOT /usr/powerpc64le-linux-gnu/ ) +set(CMAKE_C_COMPILER clang-10 ) +set(CMAKE_CXX_COMPILER clang++-10 ) +set(CMAKE_BUILD_TYPE Debug ) + +set(CMAKE_CXX_FLAGS "--target=powerpc64le-linux-gnu -I/usr/powerpc64le-linux-gnu/include/c++/10/powerpc64le-linux-gnu" ) +set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld") +set(CMAKE_CROSSCOMPILING_CMD qemu-ppc64le) diff --git a/test/toolchain/clang.ppc64le.release.cmake b/test/toolchain/clang.ppc64le.release.cmake new file mode 100644 index 0000000..ae513c9 --- /dev/null +++ b/test/toolchain/clang.ppc64le.release.cmake @@ -0,0 +1,18 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR powerpc ) + +set(CMAKE_SYSROOT /usr/powerpc64le-linux-gnu/ ) +set(CMAKE_C_COMPILER clang-10 ) +set(CMAKE_CXX_COMPILER clang++-10 ) +set(CMAKE_BUILD_TYPE Release ) + +set(CMAKE_CXX_FLAGS "--target=powerpc64le-linux-gnu -I/usr/powerpc64le-linux-gnu/include/c++/10/powerpc64le-linux-gnu" ) +set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld") +set(CMAKE_CROSSCOMPILING_CMD qemu-ppc64le) diff --git a/test/toolchain/clang.x86.debug.cmake b/test/toolchain/clang.x86.debug.cmake new file mode 100644 index 0000000..abdac84 --- /dev/null +++ b/test/toolchain/clang.x86.debug.cmake @@ -0,0 +1,10 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_C_COMPILER clang-10 ) +set(CMAKE_CXX_COMPILER clang++-10 ) +set(CMAKE_BUILD_TYPE Debug ) diff --git a/test/toolchain/clang.x86.release.cmake b/test/toolchain/clang.x86.release.cmake new file mode 100644 index 0000000..18391a4 --- /dev/null +++ b/test/toolchain/clang.x86.release.cmake @@ -0,0 +1,10 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_C_COMPILER clang-10 ) +set(CMAKE_CXX_COMPILER clang++-10 ) +set(CMAKE_BUILD_TYPE Release ) diff --git a/test/toolchain/gcc.aarch64.debug.cmake b/test/toolchain/gcc.aarch64.debug.cmake new file mode 100644 index 0000000..acdf097 --- /dev/null +++ b/test/toolchain/gcc.aarch64.debug.cmake @@ -0,0 +1,15 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR arm ) + +set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc-10 ) +set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++-10 ) +set(CMAKE_BUILD_TYPE Debug ) + +set(CMAKE_CROSSCOMPILING_CMD qemu-aarch64) diff --git a/test/toolchain/gcc.aarch64.release.cmake b/test/toolchain/gcc.aarch64.release.cmake new file mode 100644 index 0000000..332bfd7 --- /dev/null +++ b/test/toolchain/gcc.aarch64.release.cmake @@ -0,0 +1,15 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR arm) + +set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc-10 ) +set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++-10 ) +set(CMAKE_BUILD_TYPE Release ) + +set(CMAKE_CROSSCOMPILING_CMD qemu-aarch64) diff --git a/test/toolchain/gcc.arm.debug.cmake b/test/toolchain/gcc.arm.debug.cmake new file mode 100644 index 0000000..178dc0a --- /dev/null +++ b/test/toolchain/gcc.arm.debug.cmake @@ -0,0 +1,16 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR arm ) + +set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc-10 ) +set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++-10 ) +set(CMAKE_BUILD_TYPE Debug ) +set(CMAKE_CXX_FLAGS "-Wno-psabi" ) + +set(CMAKE_CROSSCOMPILING_CMD ../run_arm ) diff --git a/test/toolchain/gcc.arm.release.cmake b/test/toolchain/gcc.arm.release.cmake new file mode 100644 index 0000000..45a8e5f --- /dev/null +++ b/test/toolchain/gcc.arm.release.cmake @@ -0,0 +1,16 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR arm ) + +set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc-10 ) +set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++-10 ) +set(CMAKE_BUILD_TYPE Release ) +set(CMAKE_CXX_FLAGS "-Wno-psabi" ) + +set(CMAKE_CROSSCOMPILING_CMD ../run_arm ) diff --git a/test/toolchain/gcc.ppc64.debug.cmake b/test/toolchain/gcc.ppc64.debug.cmake new file mode 100644 index 0000000..85c4ad5 --- /dev/null +++ b/test/toolchain/gcc.ppc64.debug.cmake @@ -0,0 +1,16 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR powerpc ) + +set(CMAKE_C_COMPILER powerpc64-linux-gnu-gcc-10 ) +set(CMAKE_CXX_COMPILER powerpc64-linux-gnu-g++-10 ) +set(CMAKE_BUILD_TYPE Debug ) +set(CMAKE_CXX_FLAGS "-static" ) + +set(CMAKE_CROSSCOMPILING_CMD qemu-ppc64) diff --git a/test/toolchain/gcc.ppc64.release.cmake b/test/toolchain/gcc.ppc64.release.cmake new file mode 100644 index 0000000..f742a93 --- /dev/null +++ b/test/toolchain/gcc.ppc64.release.cmake @@ -0,0 +1,16 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_SYSTEM_NAME Linux ) +set(CMAKE_SYSTEM_PROCESSOR powerpc ) + +set(CMAKE_C_COMPILER powerpc64-linux-gnu-gcc-10 ) +set(CMAKE_CXX_COMPILER powerpc64-linux-gnu-g++-10 ) +set(CMAKE_BUILD_TYPE Release ) +set(CMAKE_CXX_FLAGS "-static" ) + +set(CMAKE_CROSSCOMPILING_CMD qemu-ppc64) diff --git a/test/toolchain/gcc.x86.debug.cmake b/test/toolchain/gcc.x86.debug.cmake new file mode 100644 index 0000000..417c520 --- /dev/null +++ b/test/toolchain/gcc.x86.debug.cmake @@ -0,0 +1,10 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_C_COMPILER gcc-10 ) +set(CMAKE_CXX_COMPILER g++-10 ) +set(CMAKE_BUILD_TYPE Debug ) diff --git a/test/toolchain/gcc.x86.release.cmake b/test/toolchain/gcc.x86.release.cmake new file mode 100644 index 0000000..d1cfab6 --- /dev/null +++ b/test/toolchain/gcc.x86.release.cmake @@ -0,0 +1,10 @@ +##================================================================================================== +## SPY - C++ Informations Broker +## Copyright 2020-2021 Joel FALCOU +## +## Licensed under the MIT License . +## SPDX-License-Identifier: MIT +##================================================================================================== +set(CMAKE_C_COMPILER gcc-10 ) +set(CMAKE_CXX_COMPILER g++-10 ) +set(CMAKE_BUILD_TYPE Release )