Skip to content

Commit 15b8580

Browse files
committed
mention du stage
1 parent 786b378 commit 15b8580

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

cmake/modules/clang.cmake

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
if(WIN32)
2+
tfel_enable_cxx_compiler_flag(VISIBILITY_FLAGS "EHsc")
3+
endif(WIN32)
4+
15
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Weverything")
6+
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-c++98-compat-pedantic")
27
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-padded")
38
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-documentation")
49
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-documentation-unknown-command")
510
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-exit-time-destructors")
611
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-global-constructors")
712
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-missing-braces")
13+
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wno-unsafe-buffer-usage")
814
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wrange-loop-analysis")
915
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Wmove")
1016
tfel_enable_cxx_compiler_flag(COMPILER_WARNINGS "Winfinite-recursion")
@@ -20,9 +26,11 @@ else(enable-fast-math)
2026
tfel_enable_cxx_compiler_flag(OPTIMISATION_FLAGS2 "ffast-math")
2127
endif(enable-fast-math)
2228

23-
tfel_enable_cxx_compiler_flag(VISIBILITY_FLAGS "fvisibility=hidden")
24-
tfel_enable_cxx_compiler_flag(VISIBILITY_FLAGS "fvisibility-inlines-hidden")
25-
set(COMPILER_DEFAULT_VISIBILITY_FLAG "-fvisibility=default")
29+
if(NOT WIN32)
30+
tfel_enable_cxx_compiler_flag(VISIBILITY_FLAGS "fvisibility=hidden")
31+
tfel_enable_cxx_compiler_flag(VISIBILITY_FLAGS "fvisibility-inlines-hidden")
32+
set(COMPILER_DEFAULT_VISIBILITY_FLAG "-fvisibility=default")
33+
endif(NOT WIN32)
2634

2735
set(OPTIMISATION_FLAGS "-DNO_RUNTIME_CHECK_BOUNDS ${OPTIMISATION_FLAGS}")
2836

@@ -55,7 +63,13 @@ endif(enable-glibcxx-debug)
5563

5664
if(HAVE_FORTRAN)
5765
# we associate clang with the gnu fortran compiler
58-
include(cmake/modules/gnu-fortran-compiler.cmake)
66+
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "LLVMFlang")
67+
set(LLVM_FORTRAN_COMPILER ON)
68+
elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "IntelLLVM")
69+
set(INTEL_FORTRAN_COMPILER ON)
70+
else()
71+
include(cmake/modules/gnu-fortran-compiler.cmake)
72+
endif()
5973
endif(HAVE_FORTRAN)
6074

6175
option(enable-libcxx "use LLVM C++ Standard library" OFF)

0 commit comments

Comments
 (0)