diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6fecda294a6f3ef77af22ad2b2cf122fe26b92c1..7cbaefbda14dbd6cc0736489b30a420db08156aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,9 +35,9 @@ add_executable(test_write_null test_write_null.f90)
 target_link_libraries(test_write_null PRIVATE Shapelib_03::shapelib_03
   Contour_531::contour_531 Jumble::jumble)
 set_target_properties(test_write_null PROPERTIES Fortran_MODULE_DIRECTORY
-  ${CMAKE_CURRENT_BINARY_DIR}/${my_target}_modules)
+  ${CMAKE_CURRENT_BINARY_DIR}/test_write_null_modules)
 target_include_directories(test_write_null PRIVATE
-  ${CMAKE_CURRENT_BINARY_DIR}/${my_target}_modules)
+  ${CMAKE_CURRENT_BINARY_DIR}/test_write_null_modules)
 
 add_subdirectory(Inst_eddies)
 add_subdirectory(Overlap)