Skip to content

Commit b5d8d7c

Browse files
committed
fix build on windows
1 parent 82899ce commit b5d8d7c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

cmake/modules/clang.cmake

Lines changed: 9 additions & 1 deletion
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")
@@ -57,7 +63,9 @@ endif(enable-glibcxx-debug)
5763

5864
if(HAVE_FORTRAN)
5965
# we associate clang with the gnu fortran compiler
60-
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "IntelLLVM")
66+
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "LLVMFlang")
67+
set(LLVM_FORTRAN_COMPILER ON)
68+
elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "IntelLLVM")
6169
set(INTEL_FORTRAN_COMPILER ON)
6270
else()
6371
include(cmake/modules/gnu-fortran-compiler.cmake)

0 commit comments

Comments
 (0)