@@ -55,7 +55,7 @@ mark_as_advanced(USE_RECOMMENDED_CXX_STANDARD)
5555
5656option (USE_CPP23 "Use C++23 standard where possible" OFF )
5757
58- if (MSVC )
58+ if (DAEMON_CXX_COMPILER_MSVC )
5959 set (DEFAULT_STRIP_SOURCE_PATHS ON )
6060else ()
6161 set (DEFAULT_STRIP_SOURCE_PATHS OFF )
@@ -153,7 +153,7 @@ function(try_flag LIST FLAG)
153153 # Other compilers might interpret it as a filename so reject without testing.
154154 string (SUBSTRING "${FLAG} " 0 1 FLAG_FIRST_CHAR)
155155 if ("${FLAG_FIRST_CHAR} " STREQUAL "/" )
156- if (MSVC )
156+ if (DAEMON_CXX_COMPILER_MSVC )
157157 set (${TEST} 1)
158158 else ()
159159 set (${TEST} 0)
@@ -233,7 +233,7 @@ if (STRIP_SOURCE_PATHS)
233233 set (FILENAME_STRIP_DIRS ${FILENAME_STRIP_DIRS} "${DAEMON_DIR} /src" "${DAEMON_DIR} " )
234234 endif ()
235235 foreach (strip_dir ${FILENAME_STRIP_DIRS} )
236- if (MSVC )
236+ if (DAEMON_CXX_COMPILER_MSVC )
237237 string (REPLACE "/" "\\ " backslashed_dir ${strip_dir} )
238238 # set_c_cxx_flag can't be used because macros barf if the input contains backslashes
239239 # https://gitlab.kitware.com/cmake/cmake/-/issues/19281
@@ -259,7 +259,7 @@ if (USE_FLOAT_EXCEPTIONS)
259259 add_definitions (-DDAEMON_USE_FLOAT_EXCEPTIONS)
260260endif ()
261261
262- if (MSVC )
262+ if (DAEMON_CXX_COMPILER_MSVC )
263263 set_c_cxx_flag("/MP" )
264264
265265 # There is no flag for standards before C++17
@@ -577,7 +577,7 @@ endif()
577577option (USE_CPU_RECOMMENDED_FEATURES "Use some common hardware features like SSE2, NEON, VFP, MCX16, etc." ON )
578578
579579# Target options.
580- if (MSVC )
580+ if (DAEMON_CXX_COMPILER_MSVC )
581581 if (DAEMON_ARCH_i686)
582582 if (USE_CPU_RECOMMENDED_FEATURES)
583583 set_c_cxx_flag("/arch:SSE2" ) # This is the default
@@ -682,7 +682,7 @@ if (DAEMON_TARGET_SYSTEM_Windows)
682682 set (CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "" "lib" )
683683endif ()
684684
685- if (MSVC )
685+ if (DAEMON_CXX_COMPILER_MSVC )
686686 add_definitions (-D_CRT_SECURE_NO_WARNINGS)
687687endif ()
688688
0 commit comments