summaryrefslogtreecommitdiffstats
path: root/cmake
AgeCommit message (Collapse)Author
2023-08-12cmake: use check_linker_flag for checking linker flagsRobin Voetter
check_c_compiler_flag does not actually pass the flag to the linker, and so the test file successfully compiles for any linker flag. This caused the -Wl,z,relro flag to be passed to the compiler even if it was not supported. check_c_compiler_flag was introduced in cmake 3.18, so this commit also bumps the minimum required cmake version to 3.18 (released in 2020).
2022-10-15Fix FindUDev and FindSystemd for older cmakeMaxime Schmitt
2022-10-09Udev/sd-device wrapperMaxime Schmitt
2022-10-08Preliminary Intel supportMaxime Schmitt
2022-08-26Enable format warningsMaxime Schmitt
2022-04-04Disable over-verbose warnings and enable useful onesMaxime Schmitt
2022-04-04Dev tooling improvementMaxime Schmitt
2022-04-04Use libdrm for AMDGPU supportMaxime Schmitt
2022-04-04optimization_flags.cmake: Disable quite a few warningsYiFei Zhu
Some of them are very useless. If we really want we can fix them later, but -Wall already contains most of the useful warnings.
2021-05-11Build system update following the gpuinfo redesignMaxime Schmitt
2021-05-03More paths for NVML libraryZeming Lin
2021-01-12Add additional path hints for nvmlZeming Lin
2020-08-22CMake: add nvml path hintsMaxime Schmitt
2019-10-25Fix crash bug when build with -DCURSES_NEED_WIDE=TRUEHuang Rui
Fix crash bug when build with libncursesw.so.6 and libtinfow.so.6 The FindCurses.cmake is too old to build with ```-DCURSES_NEED_WIDE=TRUE``` option. In some latest ENV, always using libncursesw.so.6 and libtinfow.so.6. The nvtop will crashed with these messages below: ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==50432==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000c8 (pc 0x7f9c4d507d39 bp 0x7f9c4d4e6de8 sp 0x7ffc057963a8 T0) ==50432==The signal is caused by a READ memory access. ==50432==Hint: address points to the zero page. #0 0x7f9c4d507d38 in termattrs_sp (/lib64/libncursesw.so.6+0x1fd38) #1 0x7f9c4d504f73 in _nc_setupscreen_sp (/lib64/libncursesw.so.6+0x1cf73) #2 0x7f9c4d50078b in newterm_sp (/lib64/libncursesw.so.6+0x1878b) #3 0x7f9c4d500c08 in newterm (/lib64/libncursesw.so.6+0x18c08) #4 0x7f9c4d4fca53 in initscr (/lib64/libncursesw.so.6+0x14a53) #5 0x55bd7f6d693d in initialize_curses (/usr/local/bin/nvtop+0x5893d) #6 0x55bd7f6c9f7a in main (/usr/local/bin/nvtop+0x4bf7a) #7 0x7f9c4c998f1a in __libc_start_main (/lib64/libc.so.6+0x23f1a) #8 0x55bd7f6ca789 in _start (/usr/local/bin/nvtop+0x4c789) ``` The load library have some problem, NOTE libtinfow.so.6 and libtinfo.so.6 load at the same time, it is the root cause. ``` ldd /usr/local/bin/nvtop linux-vdso.so.1 (0x00007ffca6d82000) libasan.so.5 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libasan.so.5 (0x00007f8823464000) libm.so.6 => /lib64/libm.so.6 (0x00007f8823326000) libnvidia-ml.so.1 => /usr/lib64/libnvidia-ml.so.1 (0x00007f8822d00000) libncursesw.so.6 => /lib64/libncursesw.so.6 (0x00007f8822cc5000) libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f8822c89000) libubsan.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libubsan.so.1 (0x00007f8822321000) libc.so.6 => /lib64/libc.so.6 (0x00007f8822152000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f882214c000) librt.so.1 => /lib64/librt.so.1 (0x00007f8822142000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8822120000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6 (0x00007f8821ea8000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libgcc_s.so.1 (0x00007f8821e8e000) /lib64/ld-linux-x86-64.so.2 (0x00007f8823fc5000) libtinfow.so.6 => /lib64/libtinfow.so.6 (0x00007f8821e4f000) ``` To fix it, the FindCurses.cmake should using libtinfow.so.6 instead of libtinfo.so.6 when DCURSES_NEED_WIDE=TRUE. So I updated the FindCurses.cmake to latest version to fix this problem. Signed-off-by: Huang Rui <vowstar@gmail.com>
2018-11-21Add recent FindCurses cmake module for ncursesw supportMaxime Schmitt
2018-11-21CMake: compilation flag helperMaxime Schmitt
2018-11-21CMake UpdateMaxime Schmitt
2018-08-19nvml header search locationMaxime Schmitt
2018-04-07Architecture aware regex search for nvml libraryMaxime Schmitt
2018-04-06Update CMake search path for NVML lib and includeMaxime Schmitt
2017-06-16Initial commitMaxime Schmitt