Bug 715284

Summary: Examples C++ "hello_world" and "hello_xml" are not able to be compilled from solution file
Product: Red Hat Enterprise MRG Reporter: Petra Svobodová <psvobodo>
Component: qpid-sdkAssignee: Chuck Rolke <crolke>
Status: CLOSED CURRENTRELEASE QA Contact: Petra Svobodová <psvobodo>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0CC: esammons, freznice, iboverma, jross
Target Milestone: 3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Windows   
Whiteboard:
Fixed In Version: qpid-cpp-win-3.22.5.1-1 Doc Type: Bug Fix
Doc Text:
It was discovered that the hello_world and hello_xml projects were not produced by default from the distribution kit. Users requiring these projects needed to add the projects manually to the `CMakeLists.txt` file before running cmake. The fix adds the files to CMakeLists.txt, which results in hello_world and hello_xml being produced by default.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-21 12:56:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petra Svobodová 2011-06-22 12:31:48 UTC
Description of problem:
Examples "hello_world" and "hello_xml" do not have their project file and so they are not including in the solution file.

Version-Release number of selected component (if applicable):
qpid-cpp-x*-2.0.0.7

How reproducible:
n/a

Steps to Reproduce:
1. Open the "~/qpid/examples/examples.sln" file and try to find the "hello_world" and "hello_xml" projects.
  
Actual results:
Projects "hello_world" and "hello_xml" are missing in the solution.

Expected results:
Projects "hello_world" and "hello_xml" should be included in the solution.

Comment 1 Justin Ross 2012-11-06 20:07:20 UTC
Chuck, this one is old.  Was it addressed with the vs2010 work?

Comment 2 Chuck Rolke 2012-12-04 14:45:00 UTC
No. QA de-ACKed the idea as it makes more to test.
Now that the examples are not delivered as solutions but as a CMake script it would be half way to the desired request with adding comments:

#add_example(messaging hello_world)
#add_example(messaging hello_xml)

to the script. Users (customer, QA, developers) would then have a trivial edit to get hello_world into the example solution. FWIW, I do this all the time as hello_world is often the perfect vehicle for running various tests.

Comment 3 Justin Ross 2012-12-04 18:23:46 UTC
(In reply to comment #2)
> No. QA de-ACKed the idea as it makes more to test.
> Now that the examples are not delivered as solutions but as a CMake script
> it would be half way to the desired request with adding comments:
> 
> #add_example(messaging hello_world)
> #add_example(messaging hello_xml)
> 
> to the script. Users (customer, QA, developers) would then have a trivial
> edit to get hello_world into the example solution. FWIW, I do this all the
> time as hello_world is often the perfect vehicle for running various tests.

Okay, sounds good.

Comment 5 Petra Svobodová 2013-02-26 08:12:35 UTC
The source files hello_world.cpp and hello_xml.cpp are included among the C++ examples in the package. But there is no code to create project files for them in the CMakeLists.txt file (as for other examples). 

We currently test the examples by this way:
1. We add the two lines in the CMakeLists.txt:
...
add_example(messaging hello_world)
add_example(messaging hello_xml)
....
2. Create project files, build them and continue as with other examples.

Could you possibly add the commands into the CMakeLists.txt, please?

Comment 6 Chuck Rolke 2013-04-08 19:41:35 UTC
These two lines are added to the CMakeLists.txt file in 
r1465113

Comment 8 Petra Svobodová 2013-06-25 09:07:42 UTC
Code for generating project files of examples "hello_world" and "hello-xml" was added into the "CMakeLists.txt" file. Now the examples can have generated their project files and can be compiled.

Verified on packages qpid-cpp-win-3.22.5.1-1 and platforms Windows XP-x86, Windows 7-x86 and x64, Windows Server2003-x86 and 64, Windows Server2008-x86, x64 and R2.

--> VERIFIED