diff --git a/.gitignore b/.gitignore index 6ea113dc6099..6c946c893997 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ build/ /.settings/ # Visual Studio Code project files -.vscode/ +.vscode # Visual Studio project files .vs/ @@ -57,3 +57,6 @@ jobs.yml # pipenv files Pipfile Pipfile.lock + +# user specific cmake preset settings +CMakeUserPresets.json diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000000..348eea26b8e8 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,407 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 22, + "patch": 0 + }, + "configurePresets": [ + { + "name": "develop", + "description": "enable tests and examples", + "hidden": true, + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "alpaka_BUILD_EXAMPLES": { + "type": "BOOL", + "value": "ON" + }, + "BUILD_TESTING": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-serial-gcc", + "description": "use g++ compiler with serial back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "g++" + }, + "alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-omp2b-gcc", + "description": "use g++ compiler with OpenMP 2 Grid Block back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "g++" + }, + "alpaka_ACC_CPU_B_OMP2_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-omp2t-gcc", + "description": "use g++ compiler with OpenMP 2 Block Thread back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "g++" + }, + "alpaka_ACC_CPU_B_SEQ_T_OMP2_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-stdthreads-gcc", + "description": "use g++ compiler with std::thread back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "g++" + }, + "alpaka_ACC_CPU_B_SEQ_T_THREADS_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-tbb-gcc", + "description": "use g++ compiler with Intel TBB back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "g++" + }, + "alpaka_ACC_CPU_B_TBB_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-serial-clang", + "description": "use clang++ compiler with serial back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "clang++" + }, + "alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-omp2b-clang", + "description": "use clang++ compiler with OpenMP 2 Grid Block back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "clang++" + }, + "alpaka_ACC_CPU_B_OMP2_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-omp2t-clang", + "description": "use clang++ compiler with OpenMP 2 Block Thread back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "clang++" + }, + "alpaka_ACC_CPU_B_SEQ_T_OMP2_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-stdthreads-clang", + "description": "use clang++ compiler with std::thread back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "clang++" + }, + "alpaka_ACC_CPU_B_SEQ_T_THREADS_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "cpu-tbb-clang", + "description": "use clang++ compiler with Intel TBB back-end", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "clang++" + }, + "alpaka_ACC_CPU_B_TBB_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "gpu-hip", + "description": "use HIP back-end on AMD GPUs", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "hipcc" + }, + "alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + }, + "alpaka_ACC_GPU_HIP_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "gpu-sycl-intel", + "description": "use Sycl back-end on Intel GPUs", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "icpx" + }, + "alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + }, + "alpaka_ACC_SYCL_ENABLE": { + "type": "BOOL", + "value": "ON" + }, + "alpaka_SYCL_ONEAPI_GPU": { + "type": "BOOL", + "value": "ON" + }, + "alpaka_SYCL_ONEAPI_GPU_DEVICES": { + "type": "STRING", + "value": "spir64" + } + } + }, + { + "name": "gpu-cuda-nvcc-gcc", + "description": "use cuda back-end on Nvidia GPUs with nvcc device compiler and g++ host compiler", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "g++" + }, + "alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + }, + "alpaka_ACC_GPU_CUDA_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "gpu-cuda-nvcc-clang", + "description": "use cuda back-end on Nvidia GPUs with nvcc device compiler and clang++ host compiler", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "clang++" + }, + "alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + }, + "alpaka_ACC_GPU_CUDA_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + }, + { + "name": "gpu-clang-cuda", + "description": "use cuda back-end on Nvidia GPUs with clang++ device compiler and clang++ host compiler", + "inherits": "develop", + "cacheVariables": { + "CMAKE_CXX_COMPILER": { + "type": "STRING", + "value": "clang++" + }, + "CMAKE_CUDA_COMPILER": { + "type": "STRING", + "value": "clang++" + }, + "alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": { + "type": "BOOL", + "value": "ON" + }, + "alpaka_ACC_GPU_CUDA_ENABLE": { + "type": "BOOL", + "value": "ON" + } + } + } + ], + "buildPresets": [ + { + "name": "cpu-serial-gcc", + "configurePreset": "cpu-serial-gcc" + }, + { + "name": "cpu-omp2b-gcc", + "configurePreset": "cpu-omp2b-gcc" + }, + { + "name": "cpu-omp2t-gcc", + "configurePreset": "cpu-omp2t-gcc" + }, + { + "name": "cpu-stdthreads-gcc", + "configurePreset": "cpu-stdthreads-gcc" + }, + { + "name": "cpu-tbb-gcc", + "configurePreset": "cpu-tbb-gcc" + }, + { + "name": "cpu-serial-clang", + "configurePreset": "cpu-serial-clang" + }, + { + "name": "cpu-omp2b-clang", + "configurePreset": "cpu-omp2b-clang" + }, + { + "name": "cpu-omp2t-clang", + "configurePreset": "cpu-omp2t-clang" + }, + { + "name": "cpu-stdthreads-clang", + "configurePreset": "cpu-stdthreads-clang" + }, + { + "name": "cpu-tbb-clang", + "configurePreset": "cpu-tbb-clang" + }, + { + "name": "gpu-hip", + "configurePreset": "gpu-hip" + }, + { + "name": "gpu-sycl-intel", + "configurePreset": "gpu-sycl-intel" + }, + { + "name": "gpu-cuda-nvcc-gcc", + "configurePreset": "gpu-cuda-nvcc-gcc" + }, + { + "name": "gpu-cuda-nvcc-clang", + "configurePreset": "gpu-cuda-nvcc-clang" + }, + { + "name": "gpu-clang-cuda", + "configurePreset": "gpu-clang-cuda" + } + ], + "testPresets": [ + { + "name": "cpu-serial-gcc", + "configurePreset": "cpu-serial-gcc" + }, + { + "name": "cpu-omp2b-gcc", + "configurePreset": "cpu-omp2b-gcc" + }, + { + "name": "cpu-omp2t-gcc", + "configurePreset": "cpu-omp2t-gcc" + }, + { + "name": "cpu-stdthreads-gcc", + "configurePreset": "cpu-stdthreads-gcc" + }, + { + "name": "cpu-tbb-gcc", + "configurePreset": "cpu-tbb-gcc" + }, + { + "name": "cpu-serial-clang", + "configurePreset": "cpu-serial-clang" + }, + { + "name": "cpu-omp2b-clang", + "configurePreset": "cpu-omp2b-clang" + }, + { + "name": "cpu-omp2t-clang", + "configurePreset": "cpu-omp2t-clang" + }, + { + "name": "cpu-stdthreads-clang", + "configurePreset": "cpu-stdthreads-clang" + }, + { + "name": "cpu-tbb-clang", + "configurePreset": "cpu-tbb-clang" + }, + { + "name": "gpu-hip", + "configurePreset": "gpu-hip" + }, + { + "name": "gpu-sycl-intel", + "configurePreset": "gpu-sycl-intel" + }, + { + "name": "gpu-cuda-nvcc-gcc", + "configurePreset": "gpu-cuda-nvcc-gcc" + }, + { + "name": "gpu-cuda-nvcc-clang", + "configurePreset": "gpu-cuda-nvcc-clang" + }, + { + "name": "gpu-clang-cuda", + "configurePreset": "gpu-clang-cuda" + } + ] +}