-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathSearchInstalledSoftware.cmake
More file actions
1760 lines (1626 loc) · 71.8 KB
/
SearchInstalledSoftware.cmake
File metadata and controls
1760 lines (1626 loc) · 71.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 1995-2022, Rene Brun and Fons Rademakers.
# All rights reserved.
#
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.
#----------------------------------------------------------------------------
# macro ROOT_CHECK_CONNECTION(option)
# Try to download a file to check internet connection.
# If fail-on-missing=ON is set, a failed connection check will cause a fatal
# configuration error.
# Input variables:
# option:
# A hint to the user on which option to set to avoid the part of the
# configuration that requested the connection check.
# Output variables:
# NO_CONNECTION:
# This variable is set based on the result of the connection check:
# - FALSE: An active internet connection was found.
# - TRUE: No internet connection was found or the download failed.
# Note: if the value of NO_CONNECTION is already FALSE, when calling the
# macro, the connection check will not run again.
#----------------------------------------------------------------------------
macro(ROOT_CHECK_CONNECTION option)
# Do something only if connection check is not already done
if(NOT DEFINED NO_CONNECTION)
if(NOT check_connection)
# If the connection check is disabled, just assume there is internet
# connection
set(NO_CONNECTION FALSE)
else()
message(STATUS "Checking internet connectivity")
file(DOWNLOAD https://root.cern/files/cmake_connectivity_test.txt ${CMAKE_CURRENT_BINARY_DIR}/cmake_connectivity_test.txt
TIMEOUT 10 STATUS DOWNLOAD_STATUS
)
# Get the status code from the download status
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
# Check if download was successful.
if(${STATUS_CODE} EQUAL 0)
# Success
message(STATUS "Checking internet connectivity - found")
# Now let's delete the file
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/cmake_connectivity_test.txt)
set(NO_CONNECTION FALSE)
else()
# Error
if(fail-on-missing)
message(FATAL_ERROR "No internet connection. Please check your connection, set '-D${option}' or disable 'fail-on-missing' to automatically disable options requiring internet access. You can also bypass the connection check with -Dcheck_connection=OFF.")
endif()
message(STATUS "Checking internet connectivity - failed: will not automatically download external dependencies. You can bypass the connection check with -Dcheck_connection=OFF.")
set(NO_CONNECTION TRUE)
endif()
endif()
endif()
endmacro()
#----------------------------------------------------------------------------
# macro ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION(option_name)
# Check internet connection. If no connection, either disable the option or
# stop the configuration with a FATAL_ERROR in case of fail-on-missing=ON.
#----------------------------------------------------------------------------
macro(ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION option_name)
ROOT_CHECK_CONNECTION("${option_name}=OFF")
if(NO_CONNECTION)
message(STATUS "No internet connection, disabling '${option_name}' option")
set(${option_name} OFF CACHE BOOL "Disabled because there is no internet connection" FORCE)
endif()
endmacro()
# Building Clad requires an internet connection, if we're not side-loading the source directory
if(clad AND NOT DEFINED CLAD_SOURCE_DIR)
ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("clad")
endif()
#---Check for installed packages depending on the build options/components enabled --
include(CheckCXXSourceCompiles)
include(CheckIncludeFileCXX)
include(ExternalProject)
include(FindPackageHandleStandardArgs)
set(lcgpackages https://lcgpackages.web.cern.ch/lcgpackages/tarFiles/sources)
string(REPLACE "-Werror " "" ROOT_EXTERNAL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
#--- Search for packages that are absolutely necessary--------------------------
#----------------------------------------------------------------------------
# ROOT_FIND_REQUIRED_DEP(PACKAGE_NAME BUILTIN_CONFIG_OPTION)
# Search for a required dependency, unless it's meant to be a built-in.
# A list of all missing required packages will be printed in case they could
# not be found.
macro(ROOT_FIND_REQUIRED_DEP PACKAGE_NAME BUILTIN_CONFIG_OPTION)
if(NOT ${BUILTIN_CONFIG_OPTION})
find_package(${PACKAGE_NAME})
if(NOT ${PACKAGE_NAME}_FOUND)
message(SEND_ERROR "The required package ${PACKAGE_NAME} was not found. "
"Please install it in the system (preferred), set the corresponding CMake search variable, "
"or opt in to downloading it using '-D${BUILTIN_CONFIG_OPTION}=ON'.")
list(APPEND MISSING_PACKAGES ${PACKAGE_NAME})
endif()
endif()
endmacro()
# Clear cache variables, or LLVM may use old values for ZLIB
# TODO: Still needed? This was ported here during a refactoring.
# When (re-)configuring cleanly (cmake --fresh), this is should be unnecessary.
foreach(suffix FOUND INCLUDE_DIR LIBRARY LIBRARY_DEBUG LIBRARY_RELEASE LIBRARIES CF)
unset(ZLIB_${suffix} CACHE)
unset(ZSTD_${suffix} CACHE)
endforeach()
# Request explicit user opt-in for required dependencies
if(asimage)
ROOT_FIND_REQUIRED_DEP(GIF builtin_gif)
ROOT_FIND_REQUIRED_DEP(JPEG builtin_jpeg)
# We cannot PNG here because while searching PNG, CMake will also find ZLIB.
# If found, CMake will define the default variables and target:
# see https://cmake.org/cmake/help/latest/module/FindZLIB.html).
# For this reason, the check has to be put below, after ZLIB is searched for.
#ROOT_FIND_REQUIRED_DEP(PNG builtin_png)
endif()
ROOT_FIND_REQUIRED_DEP(LZ4 builtin_lz4)
ROOT_FIND_REQUIRED_DEP(LibLZMA builtin_lzma)
ROOT_FIND_REQUIRED_DEP(ZLIB builtin_zlib)
ROOT_FIND_REQUIRED_DEP(ZSTD builtin_zstd)
if(NOT "${MISSING_PACKAGES}" STREQUAL "")
message(FATAL_ERROR "The following packages need to be installed or enabled to build ROOT: ${MISSING_PACKAGES}")
endif()
#--- Redefine find_package for LLVM to pick up ROOT's builtins ----------------------
# TODO: Make this only local to LLVM?
macro(find_package)
if(NOT "${ARGV0}" IN_LIST ROOT_BUILTINS) # ROOT_BUILTINS are the variable names, not the same as ROOT_BUILTIN_TARGETS used for move-header dependency
_find_package(${ARGV})
endif()
endmacro()
#---On MacOSX, try to find frameworks after standard libraries or headers------------
set(CMAKE_FIND_FRAMEWORK LAST)
#---If -Dshared=Off, prefer static libraries-----------------------------------------
if(NOT shared)
if(WINDOWS)
message(FATAL_ERROR "Option \"shared=Off\" not supported on Windows!")
else()
message("Preferring static libraries.")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;${CMAKE_FIND_LIBRARY_SUFFIXES}")
endif()
endif()
#---Check for Zlib ------------------------------------------------------------------
if(builtin_zlib)
list(APPEND ROOT_BUILTINS ZLIB)
add_subdirectory(builtins/zlib)
else()
# If not built-in, check if this is zlib-ng
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
message(STATUS "Checking whether zlib-ng is provided")
check_c_source_compiles("
#include <zlib.h>
#ifndef ZLIBNG_VERNUM
#error Not zlib-ng
#endif
int main() { return 0; }
" ZLIB_NG)
endif()
if(ZLIB_NG)
message(STATUS "Zlib-ng detected")
else()
message(STATUS "Zlib detected")
endif()
if(asimage)
# This check can be added only now because of the reasons explained above, where all
# other required dependencies are checked.
ROOT_FIND_REQUIRED_DEP(PNG builtin_png)
endif()
#---Check for nlohmann/json.hpp---------------------------------------------------------
if(NOT builtin_nlohmannjson)
message(STATUS "Looking for nlohmann/json.hpp")
if(fail-on-missing)
find_package(nlohmann_json 3.9 REQUIRED)
else()
find_package(nlohmann_json 3.9 QUIET)
if(nlohmann_json_FOUND)
get_target_property(_nlohmann_json_incl nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "Found nlohmann/json.hpp in ${_nlohmann_json_incl} (found version ${nlohmann_json_VERSION})")
else()
message(STATUS "nlohmann/json.hpp not found. Switching on builtin_nlohmannjson option")
set(builtin_nlohmannjson ON CACHE BOOL "Enabled because nlohmann/json.hpp not found" FORCE)
endif()
endif()
# ROOTEve wants to know if it comes with json_fwd.hpp:
if(TARGET nlohmann_json::nlohmann_json)
get_target_property(inc_dirs nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES)
foreach(dir ${inc_dirs})
if(EXISTS "${dir}/nlohmann/json_fwd.hpp")
target_compile_definitions(nlohmann_json::nlohmann_json INTERFACE NLOHMANN_JSON_PROVIDES_FWD_HPP)
endif()
endforeach()
endif()
endif()
if(builtin_nlohmannjson)
add_subdirectory(builtins/nlohmann)
endif()
#--- Check for civetweb ---------------------------------------------------------
if(http AND NOT builtin_civetweb)
message(STATUS "Looking for civetweb")
if(NOT "$ENV{CIVETWEB_BUILD}" STREQUAL "" AND NOT "$ENV{CIVETWEB_SRC}" STREQUAL "")
set(civetweb_LIBRARIES $ENV{CIVETWEB_BUILD}/src/libcivetweb.so)
set(civetweb_INCLUDE_DIR $ENV{CIVETWEB_SRC}/include)
message(STATUS "Use civetweb ${civetweb_LIBRARIES} and ${civetweb_INCLUDE_DIR}")
else()
if(fail-on-missing)
find_package(civetweb 1.15 REQUIRED)
else()
find_package(civetweb 1.15 QUIET)
if(civetweb_FOUND)
message(STATUS "Found civetweb version ${civetweb_VERSION}")
else()
message(STATUS "civetweb not found. Switching on builtin_civetweb option")
set(builtin_civetweb ON CACHE BOOL "Enabled because civetweb not found" FORCE)
endif()
endif()
endif()
endif()
#---Check for Unuran ------------------------------------------------------------------
if(unuran AND NOT builtin_unuran)
message(STATUS "Looking for Unuran")
if(fail-on-missing)
find_Package(Unuran REQUIRED)
else()
find_Package(Unuran)
if(NOT UNURAN_FOUND)
message(STATUS "Unuran not found. Switching on builtin_unuran option")
set(builtin_unuran ON CACHE BOOL "Enabled because Unuran not found (${builtin_unuran_description})" FORCE)
endif()
endif()
endif()
#---Check for Freetype---------------------------------------------------------------
ROOT_FIND_REQUIRED_DEP(Freetype builtin_freetype) # needed for asimage, but also outside of it (for "graf" target)
if(builtin_freetype)
list(APPEND ROOT_BUILTINS BUILTIN_FREETYPE)
add_subdirectory(builtins/freetype)
endif()
#---Check for Cocoa/Quartz graphics backend (MacOS X only)---------------------------
# Note that this check happens *after* the above check for FreeType because that
# library is needed for builds on Apple with Cocoa graphics
if(cocoa)
if(APPLE)
set(x11 OFF CACHE BOOL "Disabled because cocoa requested (${x11_description})" FORCE)
else()
message(STATUS "Cocoa option can only be enabled on MacOSX platform")
set(cocoa OFF CACHE BOOL "Disabled because only available on MacOSX (${cocoa_description})" FORCE)
endif()
endif()
#---Check for PCRE-------------------------------------------------------------------
if(NOT builtin_pcre)
message(STATUS "Looking for PCRE")
# Clear cache before calling find_package(PCRE),
# necessary to be able to toggle builtin_pcre and
# not have find_package(PCRE) find builtin pcre.
foreach(suffix FOUND INCLUDE_DIR PCRE_LIBRARY)
unset(PCRE_${suffix} CACHE)
endforeach()
find_package(PCRE2)
if(NOT PCRE2_FOUND)
if(fail-on-missing)
find_package(PCRE REQUIRED)
else()
find_package(PCRE)
if(NOT PCRE_FOUND)
message(STATUS "PCRE not found. Switching on builtin_pcre option")
set(builtin_pcre ON CACHE BOOL "Enabled because PCRE not found (${builtin_pcre_description})" FORCE)
endif()
endif()
endif()
endif()
if(builtin_pcre)
list(APPEND ROOT_BUILTINS PCRE)
add_subdirectory(builtins/pcre)
endif()
#---Check for LZMA-------------------------------------------------------------------
if(builtin_lzma)
list(APPEND ROOT_BUILTINS LZMA)
add_subdirectory(builtins/lzma)
endif()
#---Check for xxHash-----------------------------------------------------------------
if(NOT builtin_xxhash)
message(STATUS "Looking for xxHash")
if(fail-on-missing)
find_package(xxHash 0.8 REQUIRED)
else()
find_package(xxHash 0.8)
if(NOT xxHash_FOUND)
message(STATUS "xxHash not found. Switching on builtin_xxhash option")
set(builtin_xxhash ON CACHE BOOL "Enabled because xxHash not found (${builtin_xxhash_description})" FORCE)
endif()
endif()
endif()
if(builtin_xxhash)
list(APPEND ROOT_BUILTINS xxHash)
add_subdirectory(builtins/xxhash)
endif()
#---Check for ZSTD-------------------------------------------------------------------
if(ZSTD_FOUND AND ZSTD_VERSION VERSION_LESS 1.0.0)
message(FATAL "Version of installed ZSTD is too old: ${ZSTD_VERSION}. Please install newer version (>1.0.0)")
endif()
if(builtin_zstd)
list(APPEND ROOT_BUILTINS zstd)
list(APPEND ROOT_BUILTINS ZSTD)
add_subdirectory(builtins/zstd)
endif()
#---Check for LZ4--------------------------------------------------------------------
if(builtin_lz4)
list(APPEND ROOT_BUILTINS LZ4)
add_subdirectory(builtins/lz4)
endif()
#---Check for X11 which is mandatory lib on Unix--------------------------------------
if(x11)
message(STATUS "Looking for X11")
if(X11_X11_INCLUDE_PATH)
set(X11_FIND_QUIETLY 1)
endif()
find_package(X11 REQUIRED COMPONENTS Xpm Xft Xext)
list(REMOVE_DUPLICATES X11_INCLUDE_DIR)
if(NOT X11_FIND_QUIETLY)
message(STATUS "X11_INCLUDE_DIR: ${X11_INCLUDE_DIR}")
message(STATUS "X11_LIBRARIES: ${X11_LIBRARIES}")
message(STATUS "X11_Xpm_INCLUDE_PATH: ${X11_Xpm_INCLUDE_PATH}")
message(STATUS "X11_Xpm_LIB: ${X11_Xpm_LIB}")
message(STATUS "X11_Xft_INCLUDE_PATH: ${X11_Xft_INCLUDE_PATH}")
message(STATUS "X11_Xft_LIB: ${X11_Xft_LIB}")
message(STATUS "X11_Xext_INCLUDE_PATH: ${X11_Xext_INCLUDE_PATH}")
message(STATUS "X11_Xext_LIB: ${X11_Xext_LIB}")
endif()
endif()
#---Check for all kind of graphics includes needed by libAfterImage--------------------
if(asimage)
if(NOT x11 AND NOT cocoa AND NOT WIN32)
message(STATUS "Switching off 'asimage' because neither 'x11' nor 'cocoa' are enabled")
set(asimage OFF CACHE BOOL "Disabled because neither x11 nor cocoa are enabled (${asimage_description})" FORCE)
endif()
endif()
if(asimage)
if(builtin_gif)
add_subdirectory(builtins/libgif)
get_target_property(GIF_INCLUDE_DIR GIF::GIF INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(GIF_LIBRARY_LOCATION GIF::GIF IMPORTED_LOCATION)
endif()
list(APPEND ASEXTRA_LIBRARIES GIF::GIF)
if(builtin_png)
add_subdirectory(builtins/libpng)
get_target_property(PNG_INCLUDE_DIR PNG::PNG INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(PNG_LIBRARY_LOCATION PNG::PNG IMPORTED_LOCATION)
endif()
list(APPEND ASEXTRA_LIBRARIES PNG::PNG)
if(builtin_jpeg)
add_subdirectory(builtins/libjpeg)
get_target_property(JPEG_INCLUDE_DIR JPEG::JPEG INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(JPEG_LIBRARY_LOCATION JPEG::JPEG IMPORTED_LOCATION)
endif()
list(APPEND ASEXTRA_LIBRARIES JPEG::JPEG)
if(asimage_tiff)
find_Package(TIFF)
if(TIFF_FOUND)
list(APPEND ASEXTRA_LIBRARIES TIFF::TIFF)
else()
if(fail-on-missing)
message(SEND_ERROR "libtiff required but not found. Please make sure it's installed on the system, or disable TIFF support with '-Dasimage_tiff=OFF', or set '-Dfail-on-missing=OFF' to automatically disable features")
else()
set(asimage_tiff OFF CACHE BOOL "Disabled because libtiff was not found" FORCE)
endif()
endif()
endif()
endif()
#---Check for GSL library---------------------------------------------------------------
if(mathmore OR builtin_gsl OR (tmva-cpu AND use_gsl_cblas))
if(builtin_gsl)
ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_gsl")
endif()
message(STATUS "Looking for GSL")
if(NOT builtin_gsl)
find_package(GSL 1.10)
if(NOT GSL_FOUND)
if(fail-on-missing)
message(SEND_ERROR "GSL package not found and 'mathmore' component if required ('fail-on-missing' enabled). "
"Alternatively, you can enable the option 'builtin_gsl' to build the GSL libraries internally.")
else()
message(STATUS "GSL not found. Set variable GSL_ROOT_DIR to point to your GSL installation")
message(STATUS " Alternatively, you can also enable the option 'builtin_gsl' to build the GSL libraries internally'")
message(STATUS " For the time being switching OFF 'mathmore' option")
set(mathmore OFF CACHE BOOL "Disable because builtin_gsl disabled and external GSL not found (${mathmore_description})" FORCE)
endif()
endif()
else()
set(gsl_version 2.8)
message(STATUS "Downloading and building GSL version ${gsl_version}")
foreach(l gsl gslcblas)
list(APPEND GSL_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX})
endforeach()
set(GSL_CBLAS_LIBRARY ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gslcblas${CMAKE_STATIC_LIBRARY_SUFFIX})
if(CMAKE_OSX_SYSROOT)
set(_gsl_cppflags "-isysroot ${CMAKE_OSX_SYSROOT}")
set(_gsl_ldflags "-isysroot ${CMAKE_OSX_SYSROOT}")
endif()
ExternalProject_Add(
GSL
# http://mirror.switch.ch/ftp/mirror/gnu/gsl/gsl-${gsl_version}.tar.gz
URL ${lcgpackages}/gsl-${gsl_version}.tar.gz
URL_HASH SHA256=6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190
SOURCE_DIR GSL-src # prevent "<gsl/...>" vs GSL/ macOS warning
INSTALL_DIR ${CMAKE_BINARY_DIR}
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR>
--libdir=<INSTALL_DIR>/lib
--enable-shared=no --with-pic
CC=${CMAKE_C_COMPILER}
CFLAGS=${CMAKE_C_FLAGS}
CPPFLAGS=${_gsl_cppflags}
LDFLAGS=${_gsl_ldflags}
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 LOG_OUTPUT_ON_FAILURE 1
BUILD_BYPRODUCTS ${GSL_LIBRARIES}
TIMEOUT 600
)
set(GSL_TARGET GSL)
# FIXME: one need to find better way to extract path with GSL include files
set(GSL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/GSL-prefix/src/GSL-build)
set(GSL_FOUND ON)
set(mathmore ON CACHE BOOL "Enabled because builtin_gsl requested (${mathmore_description})" FORCE)
endif()
endif()
#---Check for Python installation-------------------------------------------------------
message(STATUS "Looking for Python")
# On macOS, prefer user-provided Pythons.
set(Python3_FIND_FRAMEWORK LAST)
# Even if we don't build PyROOT, one still need python executable to run some scripts
list(APPEND python_components Interpreter)
if(pyroot AND NOT (tpython OR tmva-pymva))
# We have to only look for the Python development module in order to be able to build ROOT with a pip backend
# In particular, it is forbidden to link against libPython.so, see https://peps.python.org/pep-0513/#libpythonx-y-so-1
list(APPEND python_components Development.Module)
elseif(tpython OR tmva-pymva)
list(APPEND python_components Development)
endif()
if(tmva-pymva OR tmva-sofie)
list(APPEND python_components NumPy)
endif()
find_package(Python3 3.10 COMPONENTS ${python_components})
#---Check for OpenGL installation-------------------------------------------------------
# OpenGL is required by various graf3d features that are enabled with opengl=ON,
# or by the Cocoa-related code that always requires it.
if(opengl OR cocoa)
message(STATUS "Looking for OpenGL")
if(APPLE)
set(CMAKE_FIND_FRAMEWORK FIRST)
find_package(OpenGL)
set(CMAKE_FIND_FRAMEWORK LAST)
else()
find_package(OpenGL)
endif()
if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND)
if(fail-on-missing)
message(SEND_ERROR "OpenGL package (with GLU) not found and opengl option required")
elseif(cocoa)
message(FATAL_ERROR "OpenGL package (with GLU) not found and opengl option required for \"cocoa=ON\"")
else()
message(STATUS "OpenGL (with GLU) not found. Switching off opengl option")
set(opengl OFF CACHE BOOL "Disabled because OpenGL (with GLU) not found (${opengl_description})" FORCE)
endif()
endif()
endif()
# OpenGL should be working only with x11 (Linux),
# in case when -Dall=ON -Dx11=OFF, we will just disable opengl.
if(NOT WIN32 AND NOT APPLE)
if(opengl AND NOT x11)
message(STATUS "OpenGL was disabled, since it is requires x11 on Linux")
set(opengl OFF CACHE BOOL "OpenGL requires x11" FORCE)
endif()
endif()
# The opengl flag enables the graf3d features that depend on OpenGL, and these
# features also depend on asimage. Therefore, the configuration will fail if
# asimage is off. See also: https://github.com/root-project/root/issues/16250
if(opengl AND NOT asimage)
message(SEND_ERROR "OpenGL features enabled with \"opengl=ON\" require \"asimage=ON\"")
endif()
#---Check for gl2ps ------------------------------------------------------------------
if(opengl)
ROOT_FIND_REQUIRED_DEP(gl2ps builtin_gl2ps)
if (builtin_gl2ps)
add_subdirectory(builtins/gl2ps)
list(APPEND ROOT_BUILTINS BUILTIN_GL2PS)
endif()
elseif(builtin_gl2ps)
message(SEND_ERROR "gl2ps features enabled with \"builtin_gl2ps=ON\" require \"opengl=ON\"")
endif()
#---Check for Graphviz installation-------------------------------------------------------
if(gviz)
message(STATUS "Looking for Graphviz")
find_package(Graphviz)
if(NOT GRAPHVIZ_FOUND)
if(fail-on-missing)
message(SEND_ERROR "Graphviz package not found and gviz option required")
else()
message(STATUS "Graphviz not found. Switching off gviz option")
set(gviz OFF CACHE BOOL "Disabled because Graphviz not found (${gviz_description})" FORCE)
endif()
endif()
endif()
#---Check for XML Parser Support-----------------------------------------------------------
if(xml)
message(STATUS "Looking for LibXml2")
find_package(LibXml2)
if(NOT LIBXML2_FOUND)
if(fail-on-missing)
message(SEND_ERROR "LibXml2 libraries not found and they are required (xml option enabled)")
else()
message(STATUS "LibXml2 not found. Switching off xml option")
set(xml OFF CACHE BOOL "Disabled because LibXml2 not found (${xml_description})" FORCE)
endif()
endif()
endif()
#---Check for OpenSSL------------------------------------------------------------------
foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS LIBRARY LIBRARIES VERSION)
unset(OPENSSL_${suffix} CACHE)
endforeach()
if(ssl AND NOT builtin_openssl)
if(fail-on-missing)
find_package(OpenSSL REQUIRED)
else()
find_package(OpenSSL COMPONENTS SSL)
if(NOT OPENSSL_FOUND)
if(NOT APPLE) # builtin OpenSSL is only supported on macOS
message(STATUS "Switching OFF 'ssl' option.")
set(ssl OFF CACHE BOOL "Disabled because OpenSSL not found and builtin version only works on macOS (${ssl_description})" FORCE)
else()
ROOT_CHECK_CONNECTION("ssl=OFF")
if(NO_CONNECTION)
message(STATUS "OpenSSL not found, and no internet connection. Disabling the 'ssl' option.")
set(ssl OFF CACHE BOOL "Disabled because ssl requested and OpenSSL not found (${builtin_openssl_description}) and there is no internet connection" FORCE)
else()
message(SEND_ERROR "OpenSSL required but not found. Install it on the system (preferred), or explicitly request the builtin version.")
endif()
endif()
endif()
endif()
endif()
if(builtin_openssl)
ROOT_CHECK_CONNECTION("builtin_openssl=OFF")
if(NO_CONNECTION)
message(STATUS "No internet connection, disabling the 'ssl' and 'builtin_openssl' options")
set(builtin_openssl OFF CACHE BOOL "Disabled because there is no internet connection" FORCE)
set(ssl OFF CACHE BOOL "Disabled because there is no internet connection" FORCE)
else()
list(APPEND ROOT_BUILTINS OpenSSL)
add_subdirectory(builtins/openssl)
endif()
endif()
#---Check for FastCGI-----------------------------------------------------------
if(fcgi)
message(STATUS "Looking for FastCGI")
find_package(FastCGI)
if(NOT FASTCGI_FOUND)
if(fail-on-missing)
message(SEND_ERROR "FastCGI library not found and they are required (fcgi option enabled)")
else()
message(STATUS "FastCGI not found. Switching off fcgi option")
set(fcgi OFF CACHE BOOL "Disabled because FastCGI not found" FORCE)
endif()
endif()
endif()
#---Check for SQLite-------------------------------------------------------------------
if(sqlite)
message(STATUS "Looking for SQLite")
find_package(Sqlite)
if(NOT SQLITE_FOUND)
if(fail-on-missing)
message(SEND_ERROR "SQLite libraries not found and they are required (sqlite option enabled)")
else()
message(STATUS "SQLite not found. Switching off sqlite option")
set(sqlite OFF CACHE BOOL "Disabled because SQLite not found (${sqlite_description})" FORCE)
endif()
endif()
endif()
#---Check for Pythia8-------------------------------------------------------------------
if(pythia8)
message(STATUS "Looking for Pythia8")
find_package(Pythia8)
if(NOT PYTHIA8_FOUND)
if(fail-on-missing)
message(SEND_ERROR "Pythia8 libraries not found and they are required (pythia8 option enabled)")
else()
message(STATUS "Pythia8 not found. Switching off pythia8 option")
set(pythia8 OFF CACHE BOOL "Disabled because Pythia8 not found (${pythia8_description})" FORCE)
endif()
endif()
endif()
if(builtin_fftw3)
ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_fftw3")
endif()
#---Check for FFTW3-------------------------------------------------------------------
if(fftw3)
if(NOT builtin_fftw3)
message(STATUS "Looking for FFTW3")
find_package(FFTW)
if(NOT FFTW_FOUND)
if(fail-on-missing)
message(SEND_ERROR "FFTW3 libraries not found and they are required (fftw3 option enabled)")
else()
message(STATUS "FFTW3 not found. Set [environment] variable FFTW_DIR to point to your FFTW3 installation")
message(STATUS " Alternatively, you can also enable the option 'builtin_fftw3' to build FFTW3 internally'")
message(STATUS " For the time being switching OFF 'fftw3' option")
set(fftw3 OFF CACHE BOOL "Disabled because FFTW3 not found and builtin_fftw3 disabled (${fftw3_description})" FORCE)
endif()
endif()
endif()
endif()
if(builtin_fftw3)
set(FFTW_VERSION 3.3.10)
message(STATUS "Downloading and building FFTW version ${FFTW_VERSION}")
set(FFTW_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libfftw3.a)
ExternalProject_Add(
FFTW3
URL ${lcgpackages}/fftw-${FFTW_VERSION}.tar.gz
URL_HASH SHA256=56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467
INSTALL_DIR ${CMAKE_BINARY_DIR}
CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR>
BUILD_COMMAND make CFLAGS=-fPIC
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 LOG_OUTPUT_ON_FAILURE 1
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${FFTW_LIBRARIES}
TIMEOUT 600
)
set(FFTW_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
set(FFTW3_TARGET FFTW3)
set(fftw3 ON CACHE BOOL "Enabled because builtin_fftw3 requested (${fftw3_description})" FORCE)
endif()
#---Check for fitsio-------------------------------------------------------------------
if(fitsio OR builtin_cfitsio)
if(builtin_cfitsio)
ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_cfitsio")
endif()
if(builtin_cfitsio)
add_library(CFITSIO::CFITSIO STATIC IMPORTED GLOBAL)
add_subdirectory(builtins/cfitsio)
set(fitsio ON CACHE BOOL "Enabled because builtin_cfitsio requested (${fitsio_description})" FORCE)
else()
message(STATUS "Looking for CFITSIO")
if(fail-on-missing)
find_package(CFITSIO REQUIRED)
else()
find_package(CFITSIO)
if(NOT CFITSIO_FOUND)
message(STATUS "CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'")
message(STATUS " For the time being switching off 'fitsio' option")
set(fitsio OFF CACHE BOOL "Disabled because CFITSIO not found and builtin_cfitsio disabled (${fitsio_description})" FORCE)
endif()
endif()
endif()
endif()
#---Check Shadow password support----------------------------------------------------
if(shadowpw)
if(NOT EXISTS /etc/shadow) #---TODO--The test always succeeds because the actual file is protected
if(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
message(STATUS "Support Shadow password not found. Switching off shadowpw option")
set(shadowpw OFF CACHE BOOL "Disabled because /etc/shadow not found (${shadowpw_description})" FORCE)
endif()
endif()
endif()
#---Configure Xrootd support---------------------------------------------------------
foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS LIBRARY LIBRARIES)
unset(XROOTD_${suffix} CACHE)
endforeach()
if(xrootd AND NOT builtin_xrootd)
message(STATUS "Looking for XROOTD")
find_package(XRootD)
if(NOT XROOTD_FOUND)
if(fail-on-missing)
message(SEND_ERROR "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation, "
"or include the installation of XROOTD in the CMAKE_PREFIX_PATH. "
"Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally")
else()
ROOT_CHECK_CONNECTION("xrootd=OFF")
if(NO_CONNECTION)
message(FATAL_ERROR "No internet connection. Please check your connection, or either disable the 'builtin_xrootd'"
" option or the 'fail-on-missing' to automatically disable options requiring internet access")
else()
message(STATUS "XROOTD not found, enabling 'builtin_xrootd' option")
set(builtin_xrootd ON CACHE BOOL "Enabled because xrootd is enabled, but external xrootd was not found (${xrootd_description})" FORCE)
endif()
endif()
endif()
if(XRootD_VERSION VERSION_LESS 5.8.4)
# Remove -D from XRootD's exported compile definitions. https://github.com/xrootd/xrootd/issues/2543
foreach(XRDTarget XRootD::XrdCl XRootD::XrdUtils)
if(TARGET ${XRDTarget})
get_target_property(PROP ${XRDTarget} INTERFACE_COMPILE_DEFINITIONS)
list(TRANSFORM PROP REPLACE "^-D" "")
set_property(TARGET ${XRDTarget} PROPERTY INTERFACE_COMPILE_DEFINITIONS ${PROP})
endif()
endforeach()
endif()
endif()
if(builtin_xrootd)
ROOT_CHECK_CONNECTION("builtin_xrootd=OFF")
if(NO_CONNECTION)
message(FATAL_ERROR "No internet connection. Please check your connection, or either disable the 'builtin_xrootd'"
" option or the 'fail-on-missing' to automatically disable options requiring internet access")
endif()
if(NOT ssl AND NOT builtin_openssl)
message(FATAL_ERROR "Building XRootD ('builtin_xrootd'=On) requires ssl support ('ssl' or 'builtin_openssl').")
endif()
list(APPEND ROOT_BUILTINS BUILTIN_XROOTD)
add_subdirectory(builtins/xrootd)
set(xrootd ON CACHE BOOL "Enabled because builtin_xrootd requested (${xrootd_description})" FORCE)
endif()
# Backward compatibility for XRootD <v5.8 without CMake targets:
if(xrootd AND NOT TARGET XRootD::XrdCl)
# Before v5.7.0, XROOTD_INCLUDE_DIRS includes private headers, like:
# <xrootd_include_dir>;<xrootd_include_dir>/private
# The private headers are not always installed, so the configure step might fail.
# ROOT doesn't need these headers, so it's best to remove them.
list(FILTER XROOTD_INCLUDE_DIRS EXCLUDE REGEX .*/private)
add_library(XRootD::XrdCl SHARED IMPORTED)
set_target_properties(XRootD::XrdCl PROPERTIES IMPORTED_LOCATION ${XROOTD_CLIENT_LIBRARIES})
target_include_directories(XRootD::XrdCl SYSTEM INTERFACE $<BUILD_INTERFACE:${XROOTD_INCLUDE_DIRS}>)
add_library(XRootD::XrdUtils SHARED IMPORTED)
set_target_properties(XRootD::XrdUtils PROPERTIES IMPORTED_LOCATION ${XROOTD_UTILS_LIBRARIES})
endif()
#---make sure non-builtin xrootd is not using builtin_openssl-----------
if(xrootd AND NOT builtin_xrootd AND builtin_openssl)
if(fail-on-missing)
message(SEND_ERROR "Non-builtin XROOTD must not be used with builtin OpenSSL. If you want to use non-builtin XROOTD, please use the system OpenSSL")
else()
message(STATUS "Non-builtin XROOTD must not be used with builtin OpenSSL. Disabling the 'xrootd' option.")
set(xrootd OFF CACHE BOOL "Disabled because non-builtin xrootd cannot be used with builtin OpenSSL" FORCE)
endif()
endif()
#---Check for Apache Arrow
if(arrow)
find_package(Arrow)
if(NOT ARROW_FOUND)
if(fail-on-missing)
message(SEND_ERROR "Apache Arrow not found. Please set ARROW_HOME to point to your Arrow installation, "
"or include the installation of Arrow in the CMAKE_PREFIX_PATH.")
else()
message(STATUS "Apache Arrow API not found. Set variable ARROW_HOME to point to your Arrow installation, "
"or include the installation of Arrow in the CMAKE_PREFIX_PATH.")
message(STATUS "For the time being switching OFF 'arrow' option")
set(arrow OFF CACHE BOOL "Disabled because Apache Arrow API not found (${arrow_description})" FORCE)
endif()
endif()
endif()
#---Check for dCache-------------------------------------------------------------------
if(dcache)
find_package(DCAP)
if(NOT DCAP_FOUND)
if(fail-on-missing)
message(SEND_ERROR "dCap library not found and is required (dcache option enabled)")
else()
message(STATUS "dCap library not found. Set variable DCAP_DIR to point to your dCache installation")
message(STATUS "For the time being switching OFF 'dcache' option")
set(dcache OFF CACHE BOOL "Disabled because dCap not found (${dcache_description})" FORCE)
endif()
endif()
endif()
#---Check for ftgl if needed----------------------------------------------------------
if(opengl)
ROOT_FIND_REQUIRED_DEP(FTGL builtin_ftgl)
if (builtin_ftgl)
add_subdirectory(builtins/ftgl)
list(APPEND ROOT_BUILTINS BUILTIN_FTGL)
endif()
elseif(builtin_ftgl)
message(SEND_ERROR "FTGL features enabled with \"builtin_ftgl=ON\" require \"opengl=ON\"")
endif()
#---Check for R/Rcpp/RInside--------------------------------------------------------------------
#added search of R packages here to remove multiples searches
if(r)
message(STATUS "Looking for R")
find_package(R COMPONENTS Rcpp RInside)
if(NOT R_FOUND)
if(fail-on-missing)
message(SEND_ERROR "R installation not found and is required ('r' option enabled)")
else()
message(STATUS "R installation not found. Set variable R_DIR to point to your R installation")
message(STATUS "For the time being switching OFF 'r' option")
set(r OFF CACHE BOOL "Disabled because R not found (${r_description})" FORCE)
endif()
endif()
endif()
#---Check for Davix library-----------------------------------------------------------
foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS LIBRARY LIBRARIES)
unset(DAVIX_${suffix} CACHE)
endforeach()
if(davix)
if(MSVC)
message(FATAL_ERROR "Davix is not supported on Windows")
endif()
if(fail-on-missing)
find_package(Davix 0.6.4 REQUIRED)
if(DAVIX_VERSION VERSION_GREATER_EQUAL 0.6.8 AND DAVIX_VERSION VERSION_LESS 0.7.1)
message(WARNING "Davix versions 0.6.8 to 0.7.0 have a bug and do not work with ROOT, please upgrade to 0.7.1 or later.")
endif()
else()
find_package(Davix 0.6.4)
if(NOT DAVIX_FOUND)
message(STATUS "Davix not found. Switching off davix option")
set(davix OFF CACHE BOOL "Disabled because dependencies not found (${davix_description})" FORCE)
endif()
endif()
endif()
#---Check for curl library-----------------------------------------------------------
foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS LIBRARY LIBRARIES)
unset(CURL_${suffix} CACHE)
endforeach()
if(curl)
message(STATUS "Looking for libcurl")
if(MSVC)
# On Windows, we must initialize libcurl lazily (not in a static [DLL] initializer), and this
# works only safely as of 7.84 with the threadsafe option
find_package(CURL 7.84 COMPONENTS HTTP HTTPS threadsafe)
else()
# Matches the libcurl version on EL9/10
find_package(CURL 7.76 COMPONENTS HTTP HTTPS)
endif()
if(NOT CURL_FOUND)
if(fail-on-missing)
message(SEND_ERROR "libcurl not found and curl option required")
else()
message(STATUS "libcurl not found. Switching off curl option")
set(curl OFF CACHE BOOL "Disabled because libcurl was not found (${curl_description})" FORCE)
endif()
endif()
endif()
#---Check for liburing----------------------------------------------------------------
if (uring)
if(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
set(uring OFF CACHE BOOL "Disabled because liburing is only available on Linux" FORCE)
message(STATUS "liburing was disabled because it is only available on Linux")
else()
message(STATUS "Looking for liburing")
find_package(liburing)
if(NOT LIBURING_FOUND)
if(fail-on-missing)
message(SEND_ERROR "liburing not found and uring option required")
else()
message(STATUS "liburing not found. Switching off uring option")
set(uring OFF CACHE BOOL "Disabled because liburing was not found (${uring_description})" FORCE)
endif()
endif()
endif()
endif()
#---Check for DAOS----------------------------------------------------------------
if (daos AND daos_mock)
message(FATAL_ERROR "Options `daos` and `daos_mock` are mutually exclusive; only one of them should be specified.")
endif()
if (testing AND NOT daos AND NOT WIN32)
set(daos_mock ON CACHE BOOL "Enable `daos_mock` if `testing` option was set" FORCE)
endif()
if (daos OR daos_mock)
message(STATUS "Looking for libuuid")
if(fail-on-missing)
find_package(libuuid REQUIRED)
else()
find_package(libuuid)
if(NOT libuuid_FOUND)
message(STATUS "libuuid not found. Disabling DAOS support")
set(daos OFF CACHE BOOL "Disabled (libuuid not found)" FORCE)
set(daos_mock OFF CACHE BOOL "Disabled (libuuid not found)" FORCE)
endif()
endif()
endif()
if (daos)
message(STATUS "Looking for DAOS")
if(fail-on-missing)
find_package(DAOS REQUIRED)
else()
find_package(DAOS)
if(NOT DAOS_FOUND)
message(STATUS "libdaos not found. Disabling DAOS support")
set(daos OFF CACHE BOOL "Disabled (libdaos not found)" FORCE)
endif()
endif()
endif()
#---Check for TBB---------------------------------------------------------------------
if(imt AND NOT builtin_tbb)
message(STATUS "Looking for TBB")
if(fail-on-missing)
find_package(TBB 2020 REQUIRED)
else()
find_package(TBB 2020)
if(NOT TBB_FOUND)
message(STATUS "TBB not found, enabling 'builtin_tbb' option")
set(builtin_tbb ON CACHE BOOL "Enabled because imt is enabled, but TBB was not found" FORCE)
endif()
endif()
# Check that the found TBB does not use captured exceptions. If the header
# <tbb/tbb_config.h> does not exist, assume that we have oneTBB newer than
# version 2021, which does not have captured exceptions anyway.
if(TBB_FOUND AND EXISTS "${TBB_INCLUDE_DIRS}/tbb/tbb_config.h")
set(CMAKE_REQUIRED_INCLUDES "${TBB_INCLUDE_DIRS}")
check_cxx_source_compiles("
#include <tbb/tbb_config.h>
#if TBB_USE_CAPTURED_EXCEPTION == 1
#error TBB uses tbb::captured_exception, not suitable for ROOT!
#endif
int main() { return 0; }" tbb_exception_result)
if(NOT tbb_exception_result)
if(fail-on-missing)
message(SEND_ERROR "Found TBB uses tbb::captured_exception, not suitable for ROOT!")
endif()
message(STATUS "Found TBB uses tbb::captured_exception, enabling 'builtin_tbb' option")
set(builtin_tbb ON CACHE BOOL "Enabled because imt is enabled and found TBB is not suitable" FORCE)
endif()
endif()
if(MSVC)
set(TBB_CXXFLAGS "-D__TBB_NO_IMPLICIT_LINKAGE=1 -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1")
else()
set(TBB_CXXFLAGS "-DTBB_SUPPRESS_DEPRECATED_MESSAGES=1")
endif()
endif()
if(builtin_tbb)
ROOT_CHECK_CONNECTION("builtin_tbb=OFF")
if(NO_CONNECTION)
message(STATUS "No internet connection, disabling 'builtin_tbb' and 'imt' options")
set(builtin_tbb OFF CACHE BOOL "Disabled because there is no internet connection" FORCE)
set(imt OFF CACHE BOOL "Disabled because 'builtin_tbb' was set but there is no internet connection" FORCE)
endif()
endif()
if(builtin_tbb)