mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-07-14 19:13:57 +02:00
treating warnings as errors during workflows (#1473)
Build and Deploy on local RHEL9 / build (push) Successful in 2m3s
Build on RHEL9 docker image / build (push) Successful in 4m21s
Build and Deploy on local RHEL8 / build (push) Successful in 5m0s
Build on RHEL8 docker image / build (push) Successful in 5m3s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m37s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m10s
Build and Deploy on local RHEL9 / build (push) Successful in 2m3s
Build on RHEL9 docker image / build (push) Successful in 4m21s
Build and Deploy on local RHEL8 / build (push) Successful in 5m0s
Build on RHEL8 docker image / build (push) Successful in 5m3s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m37s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m10s
* treating warnings as errors during workflows * suppress warnings for moench calibration * no format overflow * revert formatting * bettter conditional branching in cmake
This commit is contained in:
@@ -37,7 +37,8 @@ jobs:
|
||||
-DSLS_USE_PYTHON=ON \
|
||||
-DSLS_USE_HDF5=ON \
|
||||
-DSLS_USE_GUI=ON \
|
||||
-DSLS_USE_MOENCH=ON
|
||||
-DSLS_USE_MOENCH=ON \
|
||||
-DSLS_TREAT_WARNINGS_AS_ERRORS=ON
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
|
||||
+12
-3
@@ -236,6 +236,7 @@ option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF)
|
||||
option(SLS_USE_JUNGFRAU "compile post processing for Jungfrau" OFF)
|
||||
option(SLS_USE_MATTERHORN "compile matterhorn server" OFF)
|
||||
option(SLS_INSTALL_VERSIONED_BINARIES "Add version number to binaries on install" OFF) #Needed for multi version RPM
|
||||
option(SLS_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF)
|
||||
|
||||
#Convenience option to switch off defaults when building Moench binaries only
|
||||
option(SLS_BUILD_ONLY_MOENCH "compile only Moench" OFF)
|
||||
@@ -347,7 +348,9 @@ if (NOT TARGET slsProjectWarnings)
|
||||
-Wno-missing-field-initializers)
|
||||
endif()
|
||||
|
||||
|
||||
if(SLS_TREAT_WARNINGS_AS_ERRORS)
|
||||
target_compile_options(slsProjectWarnings INTERFACE -Werror)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -376,6 +379,10 @@ if (NOT TARGET slsProjectCSettings)
|
||||
target_compile_options(slsProjectCSettings INTERFACE -fsanitize=address,undefined -fno-omit-frame-pointer)
|
||||
target_link_libraries(slsProjectCSettings INTERFACE -fsanitize=address,undefined)
|
||||
endif()
|
||||
|
||||
if(SLS_TREAT_WARNINGS_AS_ERRORS)
|
||||
target_compile_options(slsProjectCSettings INTERFACE -Werror)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -483,13 +490,15 @@ if(SLS_BUILD_DOCS)
|
||||
add_subdirectory(docs)
|
||||
endif(SLS_BUILD_DOCS)
|
||||
|
||||
if(SLS_USE_MOENCH)
|
||||
if(SLS_USE_MOENCH OR SLS_USE_JUNGFRAU)
|
||||
add_subdirectory(slsDetectorCalibration/tiffio)
|
||||
endif()
|
||||
|
||||
if(SLS_USE_MOENCH)
|
||||
add_subdirectory(slsDetectorCalibration/moenchExecutables)
|
||||
endif(SLS_USE_MOENCH)
|
||||
|
||||
if(SLS_USE_JUNGFRAU)
|
||||
add_subdirectory(slsDetectorCalibration/tiffio)
|
||||
add_subdirectory(slsDetectorCalibration/jungfrauExecutables)
|
||||
endif(SLS_USE_JUNGFRAU)
|
||||
|
||||
|
||||
@@ -76,6 +76,14 @@ foreach(exe ${MOENCH_EXECUTABLES})
|
||||
slsProjectOptions
|
||||
)
|
||||
|
||||
target_compile_options(${exe} PRIVATE
|
||||
-Wno-unused-but-set-variable
|
||||
-Wno-format-nonliteral
|
||||
-Wno-format-security
|
||||
-Wno-double-promotion
|
||||
-Wno-unused-variable
|
||||
-Wno-format-overflow)
|
||||
|
||||
|
||||
set_target_properties(${exe} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
|
||||
@@ -204,9 +204,9 @@ int main(int argc, char *argv[]) {
|
||||
*/
|
||||
//#endif
|
||||
|
||||
if (totquad > cmin && cl.x >= xmin && cl.x <= xmax &&
|
||||
if (totquad > static_cast<double>(cmin) && cl.x >= xmin && cl.x <= xmax &&
|
||||
cl.y >= ymin && cl.y <= ymax &&
|
||||
totquad < cmax) {
|
||||
totquad < static_cast<double>(cmax)) {
|
||||
|
||||
// if (sum > cmin && totquad / sum > 0.8 && totquad / sum < 1.2 &&
|
||||
// sum < cmax) {
|
||||
|
||||
Reference in New Issue
Block a user