Skip to content

Commit da7a0eb

Browse files
committed
fix: windows compilation condition
1 parent 59125ac commit da7a0eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ project(wazuh-agent)
77
include(cmake/CommonSettings.cmake)
88
set_common_settings()
99

10-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX-")
11-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX-")
12-
add_compile_options(/w)
13-
14-
if (NOT WIN32)
10+
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
1511
add_custom_target(external_deps ALL
1612
COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_SOURCE_DIR}
1713
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
1814
COMMENT "Downloading external dependencies"
1915
)
16+
else()
17+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX-")
18+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX-")
19+
add_compile_options(/w)
2020
endif()
2121

2222
add_subdirectory(common)

0 commit comments

Comments
 (0)