Skip to content

Commit ba5a585

Browse files
committed
Use a conditional on win32
1 parent 0dd1fa7 commit ba5a585

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@
66

77
cmake_minimum_required(VERSION 3.3)
88

9-
# In order to bootstrap the runtime library we need to skip
10-
# CMake's Fortran tests
11-
SET(CMAKE_Fortran_COMPILER_WORKS 1)
12-
SET(CMAKE_Fortran_ABI_COMPILED 0)
13-
149
# If we are not building as a part of LLVM, build Flang as a
1510
# standalone project, using LLVM as an external library:
1611
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
1712
project(Flang)
1813
endif()
1914

15+
# In order to bootstrap the runtime library we need to skip
16+
# CMake's Fortran tests
17+
SET(CMAKE_Fortran_COMPILER_WORKS 1)
18+
if (WIN32)
19+
SET(CMAKE_Fortran_ABI_COMPILED 0)
20+
SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1)
21+
endif()
22+
2023
set(TARGET_OS ${CMAKE_SYSTEM_NAME} CACHE STRING "Target OS")
2124
set(TARGET_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "Target Architecture")
2225

0 commit comments

Comments
 (0)