Building module with cmake error

Hi LLVMers,

I followed the instructions from http://llvm.org/docs/CMake.html to
build a loadable module. Trying to use the cmake function
"add_llvm_loadable_module" I'm getting this error:

-- ddg-instr ignored -- Loadable modules not supported on this platform.

The important part of CMakeLists.txt files are:
----base----
cmake_minimum_required(VERSION 2.8.8)
find_package(LLVM REQUIRED CONFIG)
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
include(AddLLVM)
include_directories( ${LLVM_INCLUDE_DIRS} )
add_definitions( ${LLVM_DEFINITIONS} )
link_directories( ${LLVM_LIBRARY_DIRS} )
llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES support native)
add_subdirectory(lib/instrument)

----inside lib/instrument folder:
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
add_llvm_loadable_module(ddg-instr
  InstrumentDDG.cxx
  Visitors.cxx
)
#add_library(ddg-instr MODULE
# InstrumentDDG.cxx
# Visitors.cxx
#)
#install(TARGETS ddg-instr LIBRARY DESTINATION lib)