[cmake-developers] [CMake 0015782]: "--build" a generated test driver for Visual Studio 2015 fail because tests are not linked
Mantis Bug Tracker
mantis at public.kitware.com
Sun Oct 11 20:30:01 EDT 2015
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=15782
======================================================================
Reported By: Dario Oliveri
Assigned To:
======================================================================
Project: CMake
Issue ID: 15782
Category: CMake
Reproducibility: always
Severity: block
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-10-11 20:30 EDT
Last Modified: 2015-10-11 20:30 EDT
======================================================================
Summary: "--build" a generated test driver for Visual Studio
2015 fail because tests are not linked
Description:
After some trial and error I believe the issue is a bug in Cmake where
generating a test driver results in a project file (tests.vcxproj) that cannot
be built directly with cmake (basically it don't links the tests object files to
the generated test driver, so I believe the bug is in the solution/project
generator).
The current workaround is using some other frameworks and manually adding test
files instead of generating a test driver from a GLOB.
Steps to Reproduce:
the script I run from project folder are:
- mkdir build
- cd build
- cmake -G "Visual Studio 14 2015" ..
Building a regular target WORKS:
- cmake --build . --target libInfectorpp2 --config Release
Building ALL or test targets DO NOT WORK:
- cmake --build . --target ALL_BUILD --config Release
This is the "CONSOLE LOG" of the above scripts:
https://ci.appveyor.com/project/Darelbi/infectorpp2/build/1.0.38
this is the github project (where CMakeLists.txt is located):
https://github.com/Darelbi/Infectorpp2
No need to download the project, the console log already shows the log.
Additional Information:
I need to get "TESTS.EXE" executable build from console using Cmake and the
"--build" build command because I'm using a Continuos Integration server and
hence I need to build the library and the tests executable at each commit, and I
also need to run tests at each commit.
Actually there's no valid target for building the tests executable.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-10-11 20:30 Dario Oliveri New Issue
======================================================================
More information about the cmake-developers
mailing list