|
1 | 1 | if(WIN32) |
2 | | - tfel_enable_cxx_compiler_flag(VISIBILITY_FLAGS "EHsc") |
| 2 | + mgis_enable_cxx_compiler_flag(VISIBILITY_FLAGS "EHsc") |
3 | 3 | endif(WIN32) |
4 | 4 |
|
5 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Weverything") |
6 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-c++98-compat-pedantic") |
7 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-c++20-compat-pedantic") |
8 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-padded") |
9 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-unsafe-buffer-usage") |
10 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-documentation") |
11 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-documentation-unknown-command") |
12 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-exit-time-destructors") |
13 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-global-constructors") |
14 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-missing-braces") |
15 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-unsafe-buffer-usage") |
16 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wrange-loop-analysis") |
17 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wmove") |
18 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Winfinite-recursion") |
19 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wcomma") |
20 | | -tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wmicrosoft") |
21 | | -tfel_enable_cxx_compiler_flag2(COMPILER_WARNINGS "Wno-c++98-compat" "Wno_c__98_compat_AVAILABLE") |
| 5 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Weverything") |
| 6 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-c++98-compat-pedantic") |
| 7 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-c++20-compat-pedantic") |
| 8 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-padded") |
| 9 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-unsafe-buffer-usage") |
| 10 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-documentation") |
| 11 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-documentation-unknown-command") |
| 12 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-exit-time-destructors") |
| 13 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-global-constructors") |
| 14 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-missing-braces") |
| 15 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-unsafe-buffer-usage") |
| 16 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wrange-loop-analysis") |
| 17 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wmove") |
| 18 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Winfinite-recursion") |
| 19 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wcomma") |
| 20 | +mgis_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wmicrosoft") |
| 21 | +mgis_enable_cxx_compiler_flag2(COMPILER_WARNINGS "Wno-c++98-compat" "Wno_c__98_compat_AVAILABLE") |
22 | 22 | include(cmake/modules/common-compiler-flags.cmake) |
23 | 23 |
|
24 | | -tfel_enable_cxx_compiler_flag(OPTIMISATION_FLAGS_MARCH "march=native") |
| 24 | +mgis_enable_cxx_compiler_flag(OPTIMISATION_FLAGS_MARCH "march=native") |
25 | 25 | if(enable-fast-math) |
26 | | - tfel_enable_cxx_compiler_flag(OPTIMISATION_FLAGS "ffast-math") |
| 26 | + mgis_enable_cxx_compiler_flag(OPTIMISATION_FLAGS "ffast-math") |
27 | 27 | else(enable-fast-math) |
28 | | - tfel_enable_cxx_compiler_flag(OPTIMISATION_FLAGS2 "ffast-math") |
| 28 | + mgis_enable_cxx_compiler_flag(OPTIMISATION_FLAGS2 "ffast-math") |
29 | 29 | endif(enable-fast-math) |
30 | 30 |
|
31 | 31 | if(NOT WIN32) |
32 | | - tfel_enable_cxx_compiler_flag(VISIBILITY_FLAGS "fvisibility=hidden") |
33 | | - tfel_enable_cxx_compiler_flag(VISIBILITY_FLAGS "fvisibility-inlines-hidden") |
| 32 | + mgis_enable_cxx_compiler_flag(VISIBILITY_FLAGS "fvisibility=hidden") |
| 33 | + mgis_enable_cxx_compiler_flag(VISIBILITY_FLAGS "fvisibility-inlines-hidden") |
34 | 34 | set(COMPILER_DEFAULT_VISIBILITY_FLAG "-fvisibility=default") |
35 | 35 | endif(NOT WIN32) |
36 | 36 |
|
@@ -76,17 +76,29 @@ endif(HAVE_FORTRAN) |
76 | 76 |
|
77 | 77 | option(enable-libcxx "use LLVM C++ Standard library" OFF) |
78 | 78 | if(enable-libcxx) |
79 | | - tfel_enable_cxx_compiler_flag(COMPILER_CXXFLAGS "stdlib=libc++") |
| 79 | + mgis_enable_cxx_compiler_flag(COMPILER_CXXFLAGS "stdlib=libc++") |
80 | 80 | endif(enable-libcxx) |
81 | 81 |
|
| 82 | +if(enable-parallel-stl-algorithms) |
| 83 | + # This is a poor test to check of libstc++ is used |
| 84 | + if(UNIX AND NOT APPLE) |
| 85 | + if(NOT enable-libcxx) |
| 86 | + find_package(TBB REQUIRED) |
| 87 | + list(APPEND MGIS_REQUIRED_ADDITIONAL_PACKAGES "TBB") |
| 88 | + list(APPEND MGIS_ADDITIONAL_LIBRARIES "TBB::tbb") |
| 89 | + endif(NOT enable-libcxx) |
| 90 | + endif(UNIX AND NOT APPLE) |
| 91 | +endif(enable-parallel-stl-algorithms) |
| 92 | + |
| 93 | + |
82 | 94 | option(enable-sanitize-options "enable various clang sanitize options (undefined, address,...)" OFF) |
83 | 95 |
|
84 | 96 | if(enable-sanitize-options) |
85 | | - tfel_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=address") |
86 | | - tfel_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=thread") |
87 | | - tfel_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=memory") |
88 | | - # tfel_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=undefined") |
89 | | - tfel_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=cfi") |
90 | | - tfel_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=safe-stack") |
| 97 | + mgis_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=address") |
| 98 | + mgis_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=thread") |
| 99 | + mgis_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=memory") |
| 100 | + # mgis_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=undefined") |
| 101 | + mgis_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=cfi") |
| 102 | + mgis_enable_cxx_compiler_flag(COMPILER_FLAGS "fsanitize=safe-stack") |
91 | 103 | endif(enable-sanitize-options) |
92 | 104 |
|
0 commit comments