View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014961CMake(No Category)public2014-06-05 16:582016-06-10 14:31
Reportervitaut 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0014961: CMake doesn't warn about function redefinition
DescriptionCMake doesn't prevent or produce a warning/error when redefining functions which is very error prone. For example introducing a conflicting function definition in a subproject can easily break the build of the main project.
Steps To ReproduceConsider the following test project:

CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
function(test)
  message("parent")
endfunction()
add_subdirectory(sub)
test()

sub/CMakeLists.txt:

function(test)
  message("sub")
endfunction()

Running cmake prints "sub" which means that the test function defined in sub/CMakeLists.txt is used and not in CMakeLists.txt. No warnings or error message is produced.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042560)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-06-05 16:58 vitaut New Issue
2014-06-06 08:31 Brad King Status new => backlog
2016-06-10 14:29 Kitware Robot Note Added: 0042560
2016-06-10 14:29 Kitware Robot Status backlog => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team