The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15539 
====================================================================== 
Reported By:                Mathieu Malaterre
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15539
Category:                   CMake
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-04-29 06:27 EDT
Last Modified:              2015-04-29 06:27 EDT
====================================================================== 
Summary:                    LIBRARY_OUTPUT_DIRECTORY for MODULE
Description: 
As per documentation for LIBRARY_OUTPUT_DIRECTORY, we have:

$ cmake --help-property LIBRARY_OUTPUT_DIRECTORY
[...]
For DLL platforms the DLL part of a shared library is
treated as a runtime target and the corresponding import library
is treated as an archive target.
[...]

And

$ cmake --help-command add_library
[...]
  ``MODULE`` libraries are plugins that
are not linked into other targets but may be loaded dynamically at runtime
using dlopen-like functionality. 
[...]

However using the following simple demo project:

$ cat foo.c
__declspec( dllexport ) int foo() { return 42; }
$ cat CMakeLists.txt
project(demo)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/dll_part)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib_part)

add_library(foo_shared SHARED foo.c)
add_library(foo_module MODULE foo.c)


After compilation leads to:

$ find . -name \*.dll
./lib_part/foo_module.dll
./dll_part/foo_shared.dll

Which means:

1. Either MODULE is not a library since it's dll part is generated in
`LIBRARY_OUTPUT_DIRECTORY`, which imply the documentation is inaccurate

2. Or MODULE is indeed a library, but there is a bug in cmake where the dll part
of the library is generated in the `LIBRARY_OUTPUT_DIRECTORY` path.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-04-29 06:27 Mathieu MalaterreNew Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to