File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -88,16 +88,16 @@ macro(enable_omp_offload_compilation name files)
88
88
"${FLANG_RT_DEVICE_ARCHITECTURES} "
89
89
)
90
90
91
- set (OMP_COMPILE_OPTIONS
92
- -fopenmp
93
- -fvisibility=hidden
94
- -fopenmp-cuda-mode
95
- --offload-arch=${compile_for_architectures}
96
- # Force LTO for the device part.
97
- -foffload-lto
98
- )
99
- set_source_files_properties ( ${files} PROPERTIES COMPILE_OPTIONS
100
- " ${OMP_COMPILE_OPTIONS} "
91
+ set (OMP_COMPILE_OPTIONS $< $< COMPILE_LANGUAGE:C,CXX > :
92
+ -fopenmp -fvisibility=hidden -fopenmp-cuda-mode --offload-arch=${compile_for_architectures}
93
+ # Force LTO for the device part.
94
+ -foffload-lto
95
+ > )
96
+ # set_source_files_properties(${files} PROPERTIES COMPILE_OPTIONS
97
+ # "${OMP_COMPILE_OPTIONS}"
98
+ # )
99
+ set_property ( SOURCE ${files} APPEND
100
+ PROPERTY COMPILE_DEFINITIONS ${OMP_COMPILE_OPTIONS}
101
101
)
102
102
target_link_options (${name} .static PUBLIC ${OMP_COMPILE_OPTIONS} )
103
103
You can’t perform that action at this time.
0 commit comments