Skip to content

Commit fb4fcc1

Browse files
authored
[cmake] convert warnings into errors if a conflict is found
1 parent 86e52fe commit fb4fcc1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

cmake/modules/SearchInstalledSoftware.cmake

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ if(mathmore OR builtin_gsl OR (tmva-cpu AND use_gsl_cblas))
643643
set(GSL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/GSL-prefix/src/GSL-build)
644644
set(GSL_FOUND ON)
645645
if(NOT mathmore)
646-
message(WARNING "builtin_gls was enabled but mathmore wasn't")
646+
message(FATAL_ERROR "builtin_gls was enabled, conflict with mathmore=OFF")
647647
endif()
648648
endif()
649649
endif()
@@ -931,7 +931,7 @@ if(fftw3)
931931
endif()
932932
if(builtin_fftw3)
933933
if(NOT fftw3)
934-
message(WARNING "fftw3 is OFF, hence ignoring the activated setting 'builtin_fftw3'")
934+
message(FATAL_ERROR "fftw3 is OFF, conflict with the activated setting 'builtin_fftw3'")
935935
else()
936936
set(FFTW_VERSION 3.3.8)
937937
message(STATUS "Downloading and building FFTW version ${FFTW_VERSION}")
@@ -960,7 +960,7 @@ if(fitsio OR builtin_cfitsio)
960960
endif()
961961
if(builtin_cfitsio)
962962
if(NOT fitsio)
963-
message(WARNING "fitsio is OFF, hence ignoring the activated setting 'builtin_cfitsio'")
963+
message(FATAL_ERROR "fitsio is OFF, conflict with the activated setting 'builtin_cfitsio'")
964964
else()
965965
add_library(CFITSIO::CFITSIO STATIC IMPORTED GLOBAL)
966966
add_subdirectory(builtins/cfitsio)
@@ -1026,7 +1026,7 @@ endif()
10261026

10271027
if(builtin_xrootd)
10281028
if(NOT xrootd)
1029-
message(WARNING "xrootd is OFF, hence ignoring the activated setting 'builtin_xrootd'")
1029+
message(FATAL_ERROR "xrootd is OFF, conflict with the activated setting 'builtin_xrootd'")
10301030
else()
10311031
ROOT_CHECK_CONNECTION("builtin_xrootd=OFF")
10321032
if(NO_CONNECTION)
@@ -1200,7 +1200,7 @@ endif()
12001200

12011201
if(builtin_davix)
12021202
if(NOT davix)
1203-
message(WARNING "davix is OFF, hence ignoring the activated setting 'builtin_davix'")
1203+
message(FATAL_ERROR "davix is OFF, conflict with the activated setting 'builtin_davix'")
12041204
else()
12051205
ROOT_CHECK_CONNECTION("builtin_davix=OFF")
12061206
if(NO_CONNECTION)
@@ -1305,7 +1305,7 @@ endif()
13051305

13061306
if(builtin_tbb)
13071307
if(NOT imt)
1308-
message(WARNING "imt is OFF, hence ignoring the activated setting 'builtin_tbb'")
1308+
message(FATAL_ERROR "imt is OFF, conflict with the activated setting 'builtin_tbb'")
13091309
else()
13101310
ROOT_CHECK_CONNECTION("builtin_tbb=OFF")
13111311
if(NO_CONNECTION)
@@ -1390,7 +1390,7 @@ endif()
13901390
#---Check for Vc---------------------------------------------------------------------
13911391
if(builtin_vc)
13921392
if(NOT vc)
1393-
message(WARNING "vc is OFF, hence ignoring the activated setting 'builtin_vc'")
1393+
message(FATAL_ERROR "vc is OFF, conflict with the activated setting 'builtin_vc'")
13941394
else()
13951395
unset(Vc_FOUND)
13961396
unset(Vc_FOUND CACHE)
@@ -1513,7 +1513,7 @@ endif()
15131513

15141514
if(builtin_veccore)
15151515
if(NOT veccore)
1516-
message(WARNING "veccore is OFF, hence ignoring the activated setting 'builtin_veccore'")
1516+
message(FATAL_ERROR "veccore is OFF, conflict with the activated setting 'builtin_veccore'")
15171517
else()
15181518
set(VecCore_VERSION "0.8.2")
15191519
set(VecCore_PROJECT "VecCore-${VecCore_VERSION}")
@@ -1605,7 +1605,7 @@ if(vdt OR builtin_vdt)
16051605
endif()
16061606
if(builtin_vdt)
16071607
if(NOT vdt)
1608-
message(WARNING "vdt is OFF, hence ignoring the activated setting 'builtin_vdt'")
1608+
message(FATAL_ERROR "vdt is OFF, conflict with the activated setting 'builtin_vdt'")
16091609
else()
16101610
set(vdt_version 0.4.6)
16111611
set(VDT_FOUND True)

0 commit comments

Comments
 (0)