@@ -191,28 +191,29 @@ set_property(SOURCE
191191)
192192
193193# Import changes from flang_rt.quadmath
194- get_target_property (f128_sources
195- FortranFloat128MathILib INTERFACE_SOURCES
196- )
197- if (f128_sources)
198- # The interface may define special macros for Float128Math files,
199- # so we need to propagate them.
200- get_target_property (f128_defs
201- FortranFloat128MathILib INTERFACE_COMPILE_DEFINITIONS
202- )
203- set_property (SOURCE ${f128_sources}
204- APPEND PROPERTY COMPILE_DEFINITIONS
205- ${f128_defs}
206- )
207- get_target_property (f128_include_dirs
208- FortranFloat128MathILib INTERFACE_INCLUDE_DIRECTORIES
194+ set (f128_sources "" )
195+ if (TARGET f128_sources)
196+ get_target_property (f128_sources
197+ FortranFloat128MathILib INTERFACE_SOURCES
209198 )
210- set_property (SOURCE ${f128_sources}
211- APPEND PROPERTY INCLUDE_DIRECTORIES
212- ${f128_include_dirs}
213- )
214- else ()
215- set (f128_sources "" )
199+ if (f128_sources)
200+ # The interface may define special macros for Float128Math files,
201+ # so we need to propagate them.
202+ get_target_property (f128_defs
203+ FortranFloat128MathILib INTERFACE_COMPILE_DEFINITIONS
204+ )
205+ set_property (SOURCE ${f128_sources}
206+ APPEND PROPERTY COMPILE_DEFINITIONS
207+ ${f128_defs}
208+ )
209+ get_target_property (f128_include_dirs
210+ FortranFloat128MathILib INTERFACE_INCLUDE_DIRECTORIES
211+ )
212+ set_property (SOURCE ${f128_sources}
213+ APPEND PROPERTY INCLUDE_DIRECTORIES
214+ ${f128_include_dirs}
215+ )
216+ endif ()
216217endif ()
217218
218219if (NOT FLANG_RT_ENABLE_STATIC AND NOT FLANG_RT_ENABLE_SHARED)
0 commit comments