cmake: drop GCC-only hardcoded flags, bump CUDA to C++20

Make the build less hostile to MSVC (needed for the viewer port) and
align the CUDA standard with C++.

- Remove the CMAKE_C/CXX_FLAGS_RELEASE overrides: -O3/-DNDEBUG only
  duplicate CMake's own GCC/Clang Release defaults, and the SET()
  clobbered the MSVC defaults. The lone meaningful flag,
  -Wno-deprecated-enum-enum-conversion, merely silenced warnings from
  the vendored Xilinx ap_private.h in the FPGA path; with no -Werror
  it is just log noise, so drop it.
- CMAKE_CUDA_STANDARD 17 -> 20 (+ STANDARD_REQUIRED); CUDA >= 12.8
  already supports C++20.
- Drop the file-scoped -Ofast on JFPedestalCalc.cpp /
  JFConversionFloatingPoint.cpp: it is GCC-only and reaches the MSVC
  viewer via JFJochCommon -> JFCalibration. Those files now build at
  plain -O3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 21:02:28 +02:00
co-authored by Claude Opus 4.8
parent 1e53db8f64
commit 74c2c808de
2 changed files with 2 additions and 6 deletions
+2 -4
View File
@@ -8,9 +8,6 @@ SET(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
SET(CMAKE_CXX_STANDARD 20)
SET(CMAKE_CXX_STANDARD_REQUIRED True)
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wno-deprecated-enum-enum-conversion -DNDEBUG")
SET(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
SET(JFJOCH_WRITER_ONLY OFF CACHE BOOL "Compile HDF5 writer only")
SET(JFJOCH_INSTALL_DRIVER_SOURCE OFF CACHE BOOL "Install kernel driver source (ignored if building writer only; necessary for RPM building)")
SET(JFJOCH_USE_CUDA ON CACHE BOOL "Compile Jungfraujoch with CUDA")
@@ -42,7 +39,8 @@ INCLUDE(CheckIncludeFile)
CHECK_LANGUAGE(CUDA)
SET(CMAKE_CUDA_ARCHITECTURES 75 80 86 89 90 100 120) # T4, A100, RTX A4000, L4
SET(CMAKE_CUDA_STANDARD 17)
SET(CMAKE_CUDA_STANDARD 20)
SET(CMAKE_CUDA_STANDARD_REQUIRED True)
SET(CMAKE_CUDA_FLAGS_RELEASE "-O3 -lineinfo")
SET(CMAKE_CUDA_RUNTIME_LIBRARY Static)
-2
View File
@@ -6,5 +6,3 @@ ADD_LIBRARY(JFCalibration STATIC
JFPedestalCalc.cpp JFPedestalCalc.h)
TARGET_LINK_LIBRARIES(JFCalibration JFJochCommon)
SET_SOURCE_FILES_PROPERTIES(JFPedestalCalc.cpp JFConversionFloatingPoint.cpp PROPERTIES COMPILE_FLAGS -Ofast)