File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,10 @@ cmake_minimum_required(VERSION 2.8)
21
21
# In order to bootstrap the runtime library we need to skip
22
22
# CMake's Fortran tests
23
23
SET (CMAKE_Fortran_COMPILER_WORKS 1 )
24
+
25
+
24
26
set (CMAKE_Fortran_PREPROCESS_SOURCE
25
- "<CMAKE_Fortran_COMPILER> -Mpreprocess <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>" )
27
+ "<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>" )
26
28
27
29
# If we are not building as a part of LLVM, build Flang as an
28
30
# standalone project, using LLVM as an external library:
Original file line number Diff line number Diff line change @@ -531,7 +531,6 @@ set_property(
531
531
## CMake does not handle module dependencies between Fortran files,
532
532
## we need to help it
533
533
534
- if (NOT MSVC )
535
534
# State the module that the source is producing
536
535
set_source_files_properties (
537
536
iso_c_bind.F95
@@ -546,7 +545,6 @@ set_source_files_properties(
546
545
PROPERTIES
547
546
OBJECT_DEPENDS ${CMAKE_Fortran_MODULE_DIRECTORY} /iso_c_binding.mod
548
547
)
549
- endif ()
550
548
551
549
set_target_properties (flang_static flang_shared
552
550
PROPERTIES
@@ -577,9 +575,10 @@ add_dependencies(flang_shared
577
575
flang2
578
576
)
579
577
580
- target_compile_options (flang_static PRIVATE -fPIC )
581
-
582
- target_compile_options (flang_shared PRIVATE -fPIC )
578
+ if (NOT MSVC )
579
+ target_compile_options (flang_static PRIVATE -fPIC )
580
+ target_compile_options (flang_shared PRIVATE -fPIC )
581
+ endif ()
583
582
584
583
target_compile_options (flang_static PUBLIC $< $< COMPILE_LANGUAGE:Fortran> :-Mreentrant> )
585
584
You can’t perform that action at this time.
0 commit comments