File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -135,10 +135,18 @@ def _create_cmake_module_variables(self, module_file):
135
135
endif()
136
136
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
137
137
message( STATUS "Using Intel Compiler. Adding -fp-model strict" )
138
- if(WIN32)
139
- target_compile_options(${target} INTERFACE "/fp:strict")
138
+ if(CMAKE_VERSION VERSION_LESS 3.3)
139
+ if(WIN32)
140
+ target_compile_options(${target} INTERFACE "/fp:strict")
141
+ else()
142
+ target_compile_options(${target} INTERFACE "-fp-model=strict")
143
+ endif()
140
144
else()
141
- target_compile_options(${target} INTERFACE "-fp-model" "strict")
145
+ if(WIN32)
146
+ target_compile_options(${target} INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:/fp:strict>")
147
+ else()
148
+ target_compile_options(${target} INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:-fp-model=strict>")
149
+ endif()
142
150
endif()
143
151
elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
144
152
message( STATUS "Using SunPro compiler, using STLPort 4." )
You can’t perform that action at this time.
0 commit comments