Skip to content

Commit 9579960

Browse files
authored
Merge pull request #4784 from harmenwierenga/fix/cmake-lang-flags-string-append
Fix CMake syntax for appending to CMAKE_<LANG>_FLAGS with Intel compilers
2 parents 4f600b3 + 483b43c commit 9579960

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ endif()
129129
if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
130130
# Intel CXX compiler based on clang defaults to -ffast-math, which
131131
# breaks std::isinf(), std::isnan(), etc.
132-
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fno-fast-math)
133-
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fno-fast-math)
132+
string(APPEND CMAKE_C_FLAGS " -fno-fast-math")
133+
string(APPEND CMAKE_CXX_FLAGS " -fno-fast-math")
134134
endif ()
135135

136136
# Add other supported compiler flags

0 commit comments

Comments
 (0)