We've run into this exact chicken and egg problem with both gtest and
Catch at my work too. In both cases, we've worked round the problem by
writing fairly fragile CMake code which parses the C++ files comprising
a test executable and ultimately calling add_test for each discovered
test case.
Yup - fair enough. I downgrade my "Alternatively" to "As a last resort".
Thanks,
Fraser.
On 30/12/2014 12:13, Stephen Kelly wrote:
Fraser Hutchison wrote:
Alternatively, you can tell CMake to allow the use of the LOCATION target
property by setting the relevant p
Hi Paul,
I'd have thought the following replacement would work the same:
function(stageobj target dir)
add_custom_target(stage_${target} ALL
COMMAND "${CMAKE_COMMAND}" -E make_directory
"${DESTDIR}/${dir}"
COMMAND "${CMAKE_C
Indeed!
On 05/09/2014 20:09, David Cole via CMake wrote:
Wow.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering,
Hi Jon,
You'd have to invoke the command prompt to execute this I think. On
Windows this should be the value of the COMSPEC environment
variable, so your command would be something like:
execute_process(COMMAND
$ENV{COMSPEC} /c date /t
OUTPUT_VA
There's a StackOverflow answer I did a while back which gives an example
of ExternalProject_Add for GTest: http://stackoverflow.com/a/9695234/2556117
It maybe needs updated, and I don't think I ever tried it on OSX, but it
should hopefully be an OK starting point. (If not - hack away at my
an
Hi Rob,
The DEFINITIONS directory property is read-only. COMPILE_DEFINITIONS or
the configuration-specific versions are mutable I believe.
Cheers,
Fraser.
On 30/08/2013 22:30, Stewart, Robert wrote:
I'm effectively doing the following, with CMake 2.8, but it doesn't work. What
am I missing
I think this is what the SOURCES arg is for. You could just duplicate
the list of DEPENDS files as the SOURCES argument too:
add_custom_target(LIB_NAME DEPENDS ${LIST_OF_HEADERS} SOURCES
${LIST_OF_HEADERS})
Cheers,
Fraser.
On 19/01/2013 10:08, Jose Luis Blanco wrote:
Hello all,
I hope you
I'm not a Linux guy, so hopefully someone else more knowledgeable
can chime in here, but if you want to add to your CMAKE_CXX_FLAGS,
you need to avoid creating a semi-colon-separated list by moving the
quote mark:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
I assume they do the same thing too in this case, but I defer to David
since he works for Kitware and knows the source code, whereas I don't
and don't :-)
On 13/06/2012 00:56, Totte Karlsson wrote:
On 6/12/2012 4:23 PM, Fraser Hutchison wrote:
You can use:
|set_target_propertie
You can use:
set_target_properties(${target}-static PROPERTIES
COMPILE_DEFINITIONS RR_STATIC)
For full details, run:
cmake --help-property COMPILE_DEFINITIONS
Cheers,
Fraser.
On 12/06/2012 23:39, Totte Karlsson
wrote:
Yeah - I can reproduce this too (better late than never - sorry!) I've
upvoted your bug report Ben.
Cheers,
Fraser.
On 12/06/2012 19:55, Ben Medina wrote:
I've filed a bug with Microsoft:
https://connect.microsoft.com/VisualStudio/feedback/details/748640/cannot-compile-individual-files-if-pr
Hi Dan,
I don't think it's possible to set compiler flags on a
per-configuration, per-target basis without splitting your project.
There was a very similar discussion recently [1],[2] which indicated a
couple of options. However the first option can't be used on a
per-configuration basis, w
David's original answer does what you require.
Simply include |add_custom_target(Foo ...)| and don't include
|add_dependencies(Bar Foo)|.
If your project is also called Bar, then Bar.sln will include Foo.vcproj
and Bar.vcproj, but Foo will not be built when invoking "Build Solution".
Cheers
Hi Gib,
Try the following:
GET_TARGET_PROPERTY(FUBAR_EXE fubar LOCATION)
ADD_CUSTOM_COMMAND(TARGET fubar POST_BUILD COMMAND ${CMAKE_COMMAND} -E
copy ${FUBAR_EXE} somepath)
Cheers,
Fraser.
On 20/04/2011 03:31, Gib Bogle wrote:
I'm a real cmake novice, and I find the cmake documentation har
15 matches
Mail list logo