[CMAKE] Get rid of replace_compile_flags
[reactos.git] / base / services / nfsd / CMakeLists.txt
index 0da3892..5726c89 100644 (file)
@@ -7,12 +7,7 @@ include_directories(
     ${REACTOS_SOURCE_DIR}/drivers/filesystems/nfs
     ${REACTOS_SOURCE_DIR}/dll/np/nfs)
 
-if(MSVC)
-    # Disable warning C4477 (printf format warnings)
-    add_compile_flags("/wd4477")
-endif()
-
-list(APPEND SOURCE 
+list(APPEND SOURCE
     acl.c
     callback_server.c
     callback_xdr.c
@@ -54,6 +49,8 @@ list(APPEND SOURCE
 add_executable(nfsd ${SOURCE} nfsd.rc)
 
 if(MSVC AND (NOT USE_CLANG_CL))
+    # Disable warning C4477 (printf format warnings)
+    target_compile_options(nfsd PRIVATE "/wd4477")
 else()
     # FIXME: Tons of warnings.
     target_compile_options(nfsd PRIVATE "-w")