diff --git a/CMakeLists.txt b/CMakeLists.txt
index 559659b763452036d1a2e90387637f016defc73f..4d07b37a74a4628dd216808ffd89a7843d1ce3f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ tdaq_add_library(asyncmsg
   src/NameService.cxx
   src/UDPSession.cxx
   src/Interface.cxx
-  OPTIONS -O3
+  OPTIONS PRIVATE -O3
   LINK_LIBRARIES is Boost::system)
 
 tdaq_add_executable(test_namesvc NOINSTALL