Skip to content

Commit

Permalink
Removes the warnings D9002 and D9025 caused by -Ofast Flag unde…
Browse files Browse the repository at this point in the history
…r Windows `MSVC` (#101)

* Check if the warning is cause by the -Ofast flag
* Differentiate between windows and unix
  • Loading branch information
franziska-wegner committed Jan 6, 2024
1 parent fdce041 commit 8edb316
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/CompilerConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
if (CMAKE_BUILD_TYPE MATCHES "Debug" AND CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -coverage")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -coverage")
else()
elseif(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")
else()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
endif()

####################################################################
Expand Down

0 comments on commit 8edb316

Please sign in to comment.