Name
Date
Size
#Lines
LOC

..--

FindARM.cmakeH A D25-Apr-20253.4 KiB8272

FindAVX.cmakeH A D25-Apr-20252.4 KiB8471

FindAtlas.cmakeH A D25-Apr-20251.6 KiB5242

FindBLAS.cmakeH A D25-Apr-202511.3 KiB420389

FindBLIS.cmakeH A D25-Apr-20251.7 KiB7160

FindBenchmark.cmakeH A D25-Apr-2025798 2822

FindCUB.cmakeH A D25-Apr-2025494 2015

FindCUDAToolkit.cmakeH A D25-Apr-202537.9 KiB1,082845

FindCUDSS.cmakeH A D25-Apr-20252.6 KiB6856

FindCUSPARSELT.cmakeH A D25-Apr-20253 KiB6856

FindFlexiBLAS.cmakeH A D25-Apr-20251.7 KiB6656

FindGloo.cmakeH A D25-Apr-20251.3 KiB5042

FindITT.cmakeH A D25-Apr-2025613 2218

FindLAPACK.cmakeH A D25-Apr-20258.4 KiB249225

FindMAGMA.cmakeH A D25-Apr-20251.7 KiB5647

FindMKL.cmakeH A D25-Apr-202516.9 KiB480451

FindMKLDNN.cmakeH A D25-Apr-20257.4 KiB187167

FindNCCL.cmakeH A D25-Apr-20253.6 KiB9180

FindNuma.cmakeH A D25-Apr-2025772 2924

FindOpenBLAS.cmakeH A D25-Apr-20251.7 KiB6757

FindOpenMP.cmakeH A D25-Apr-202527.1 KiB661599

FindOpenTelemetryApi.cmakeH A D25-Apr-2025613 2014

FindSYCLToolkit.cmakeH A D25-Apr-20252.5 KiB9785

FindSanitizer.cmakeH A D25-Apr-20254.2 KiB125116

FindVSX.cmakeH A D25-Apr-20251.3 KiB3533

FindZVECTOR.cmakeH A D25-Apr-20251.3 KiB4036

Findpybind11.cmakeH A D25-Apr-2025527 1914

FindvecLib.cmakeH A D25-Apr-20251.4 KiB3729

README.mdH A D25-Apr-20252.2 KiB3523

README.md

1This folder contains various custom cmake modules for finding libraries and packages. Details about some of them are listed below.
2
3### [`FindOpenMP.cmake`](./FindOpenMP.cmake)
4
5This is modified from [the file included in CMake 3.13 release](https://github.com/Kitware/CMake/blob/05a2ca7f87b9ae73f373e9967fde1ee5210e33af/Modules/FindOpenMP.cmake), with the following changes:
6
7+ Replace `VERSION_GREATER_EQUAL` with `NOT ... VERSION_LESS` as `VERSION_GREATER_EQUAL` is not supported in CMake 3.5 (our min supported version).
8
9+ Update the `separate_arguments` commands to not use `NATIVE_COMMAND` which is not supported in CMake 3.5 (our min supported version).
10
11+ Make it respect the `QUIET` flag so that, when it is set, `try_compile` failures are not reported.
12
13+ For `AppleClang` compilers, use `-Xpreprocessor` instead of `-Xclang` as the later is not documented.
14
15+ For `AppleClang` compilers, an extra flag option is tried, which is `-Xpreprocessor -openmp -I${DIR_OF_omp_h}`, where `${DIR_OF_omp_h}` is a obtained using `find_path` on `omp.h` with `brew`'s default include directory as a hint. Without this, the compiler will complain about missing headers as they are not natively included in Apple's LLVM.
16
17+ For non-GNU compilers, whenever we try a candidate OpenMP flag, first try it with directly linking MKL's `libomp` if it has one. Otherwise, we may end up linking two `libomp`s and end up with this nasty error:
18
19  ```
20  OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already
21  initialized.
22
23  OMP: Hint This means that multiple copies of the OpenMP runtime have been
24  linked into the program. That is dangerous, since it can degrade performance
25  or cause incorrect results. The best thing to do is to ensure that only a
26  single OpenMP runtime is linked into the process, e.g. by avoiding static
27  linking of the OpenMP runtime in any library. As an unsafe, unsupported,
28  undocumented workaround you can set the environment variable
29  KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but
30  that may cause crashes or silently produce incorrect results. For more
31  information, please see http://openmp.llvm.org/
32  ```
33
34  See NOTE [ Linking both MKL and OpenMP ] for details.
35