diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index a333d8e04..50967fe6d 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -14,12 +14,10 @@ endif() set(CMAKE_POSITION_INDEPENDENT_CODE ON) if(MSVC) - if($) - add_compile_options( - "/Ox" - "/fp:fast" - ) - endif() + add_compile_options( + "$<$:/Ox>" + "$<$:/fp:fast>" + ) if(32_BIT) # SSE2 code is generated by default, unless an explict arch is set.