View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014636 | CMake | CMake | public | 2013-12-07 04:42 | 2014-06-02 08:37 | ||||
Reporter | Kiron | ||||||||
Assigned To | Stephen Kelly | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.12 | ||||||||
Target Version | Fixed in Version | CMake 3.0 | |||||||
Summary | 0014636: Error with whitelisted properties and generator expression in target_link_libraries | ||||||||
Description | When using target_link_libraries to link an INTERFACE IMPORTED library with an EXECUTABLE and the INTERFACE_LINK_LIBRARIES property of the library contains a generator expression, the following FATAL_ERROR is produced: (See Steps To Reproduce for CMakeLists.txt) >cmake . -- Configuring done CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_LOCATION_RELEASE" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_LOCATION" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_CONFIGURATIONS" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_LOCATION_MINSIZEREL" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_LOCATION" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_CONFIGURATIONS" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_LOCATION_RELWITHDEBINFO" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_LOCATION" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_CONFIGURATIONS" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_LOCATION_NOCONFIG" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_LOCATION" is not allowed. CMake Error in CMakeLists.txt: INTERFACE_LIBRARY targets may only have whitelisted properties. The property "IMPORTED_CONFIGURATIONS" is not allowed. -- Generating done -- Build files have been written to: ... When NOT using a generator expression in the INTERFACE_LINK_LIBRARIES property, no error is generated. Additionally, the error message does not provide detailed information to track down this error. | ||||||||
Steps To Reproduce | Create a file CMakeLists.txt file with the following content: ------------------------------------------------------------------------------ cmake_minimum_required(VERSION 2.8.12.20131125 FATAL_ERROR) project(GeneratorExpressionAndWhitelistedProperties C CXX) set(_main_cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp) file(WRITE ${_main_cpp} "int main(int argc, char** argv) { return 0; }\n" ) add_library(foo::bar INTERFACE IMPORTED) set_target_properties(foo::bar PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}" # When not using a generator expression here, no error is generated INTERFACE_LINK_LIBRARIES "$<$<NOT:$<CONFIG:DEBUG>>:foo_bar.lib>" ) add_executable(main ${_main_cpp}) target_include_directories(main PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") target_link_libraries(main foo::bar) ------------------------------------------------------------------------------ Run cmake | ||||||||
Additional Information | cmake version 2.8.12.20131207-g6f6ee | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0034764) Stephen Kelly (developer) 2013-12-09 13:36 |
Fixed: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31ca983c5 [^] Thanks for testing! |
(0036054) Robert Maynard (manager) 2014-06-02 08:37 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-12-07 04:42 | Kiron | New Issue | |
2013-12-07 10:33 | Stephen Kelly | Assigned To | => Stephen Kelly |
2013-12-07 10:33 | Stephen Kelly | Status | new => assigned |
2013-12-09 13:36 | Stephen Kelly | Note Added: 0034764 | |
2013-12-09 13:36 | Stephen Kelly | Status | assigned => resolved |
2013-12-09 13:36 | Stephen Kelly | Fixed in Version | => CMake 3.0 |
2013-12-09 13:36 | Stephen Kelly | Resolution | open => fixed |
2014-06-02 08:37 | Robert Maynard | Note Added: 0036054 | |
2014-06-02 08:37 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |