[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 306600] New: "wrong-target" for a valid add_executable()
From:       Vasiliy Yeremeyev <vayerx () gmail ! com>
Date:       2012-09-11 11:56:54
Message-ID: bug-306600-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=306600

            Bug ID: 306600
          Severity: normal
           Version: 4.3.1
          Priority: NOR
          Assignee: kdevelop-bugs@kdevelop.org
           Summary: "wrong-target" for a valid add_executable()
    Classification: Unclassified
                OS: Linux
          Reporter: vayerx@gmail.com
          Hardware: Other
            Status: UNCONFIRMED
         Component: Build tools: CMake
           Product: kdevelop

Following CMakeLists.txt produces "wrong-target" in Projects Tool View:

# ===== BEGIN =====
cmake_minimum_required(VERSION 2.8)
project(bug_demo)

function(Executable name)
    set_property(DIRECTORY APPEND PROPERTY ${name}_EXE_SOURCES ${ARGN})
    get_property(sources DIRECTORY PROPERTY ${name}_EXE_SOURCES)

    # Using of ADD_LIBRARY() instead of ADD_EXECUTABLE() adds a valid target
(but without source files attached to it):
    #add_library(${name} ${sources})
    add_executable(${name} ${sources})

endfunction(Executable)

Executable(wrong_target_bug main.cpp)
# ===== END =====

main.cpp may be any hello-world sample:

#include <iostream>
int main(int argc, char **argv) { std::cout << "Hello, world!" << std::endl;
return 0; }


Reproducible: Always

Steps to Reproduce:
1. Create project with specified CMakeLists.txt and main.cpp
2. Look at Project Tool View

Actual Results:  
"|wrong-target" displayed

Expected Results:  
target named "bug_demo"

Looks similiar to bug 293750, but is more general and different/simple way to
reproduce.
As written in comments, using of ADD_LIBRARY() instead of ADD_EXECUTABLE() adds
a valid target (but without source files attached to it)

-- 
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic