mach3-software / MaCh3

The official repository for MaCh3
https://mach3-software.github.io/MaCh3/
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Fix CMAKE #36

Closed KSkwarczynski closed 4 months ago

KSkwarczynski commented 6 months ago

This is how it looks

CUDA

First of all update how we handle NuHepMC/CMakeModules

Secondly make proper cmake flags to turn on multithreading. If cmake found CUDA use GPU otheriwse don't Add DEBUG flags. Lot of ND280 stuff is under DEBUG and it would be nice to haveu nfied option of enabling it. -O3 are turned of under debug.

Lstly make fancy list of feautres so user know what is being used

-- [INFO]: CMAKE CXX Standard: 17
-- [INFO]: MaCh3 Features:
-- [INFO]:      DEBUG: FALSE
-- [INFO]:      MULTITHREAD: TRUE
-- [INFO]:      GPU: FALSE
-- [INFO]: Added target MaCh

Proof that flags are being set correctly, note expecially -DCPU_ONLY, -DMULTITHREAD, -O3, -fopenmp

[ 66%] Building CXX object covariance/CMakeFiles/Covariance.dir/covarianceBase.cpp.o
cd /mnt/home/kskwarczynski/T2K_OA/Refactor/FixCmake/build/covariance && /mnt/opt/spack/0.20/opt/spack/linux-centos7-ivybridge/gcc-8.5.0/gcc-8.5.0-3ldkfvyerauwz66ejs72hgm7bu7ccvco/bin/g++ -DCPU_ONLY -DCovariance_EXPORTS -DMULTITHREAD -I/mnt/home/kskwarczynski/T2K_OA/Refactor/FixCmake/throwParms/.. -I/mnt/home/kskwarczynski/T2K_OA/Refactor/FixCmake/manager/.. -I/mnt/home/kskwarczynski/T2K_OA/Refactor/FixCmake/build/_deps/yaml-cpp-src/include -isystem /mnt/home/share/t2k/kskwarczynski/CERN_ROOT/root-6.24.08/build_root/include -std=c++17 -pipe -fsigned-char -pthread -std=gnu++17 -fPIC -g -Wextra -O3 -fopenmp -pipe -fsigned-char -pthread -DMINUIT2_ENABLED -DROOT_FIT_FITTER_INTERFACE_ENABLED -MD -MT covariance/CMakeFiles/Covariance.dir/covarianceBase.cpp.o -MF CMakeFiles/Covariance.dir/covarianceBase.cpp.o.d -o CMakeFiles/Covariance.dir/covarianceBase.cpp.o -c /mnt/home/kskwarczynski/T2K_OA/Refactor/FixCmake/covariance/covarianceBase.cpp