On 23.08.2016 21:36, Jack Stalnaker wrote:
The following works on Linux, for both GNU and Intel compilers:
add_library(mylib SHARED ${mylib_sources})
target_link_libraries(mylib ${mylib_libraries})
...
add_executable(test_mylib test_mylib.c)
target_link_libraries(test_mylib mylib ${test_mylib_li
The following works on Linux, for both GNU and Intel compilers:
add_library(mylib SHARED ${mylib_sources})
target_link_libraries(mylib ${mylib_libraries})
...
add_executable(test_mylib test_mylib.c)
target_link_libraries(test_mylib mylib ${test_mylib_libraries})
add_test (TestMylib test_mylib)
H
Hi Robert,
We have a similar requirement, so I basically run “ar -x” to explode all of the
static libraries into their constituent pieces, and then run “ar cr" to
recombine them into one monolithic static library. This is done via Gradle,
after it runs CMake to build the static libraries in the
Thanks Matt, that works great!
As a note for if someone wants to repeat this in the future...
One of the things I initially tried was bash stdout and stderr redirection
(using &>)
&>${TEST_NAME}.output
This doesn't work. I guess it causes the test to run in the background? It
also results in t
One thing I see immediately is this line:
$ > ${TEST_NAME}.output || cat ${TEST_NAME}.output
Unless ${TEST_NAME}.output doesn’t exist cat is going to have a successful
exit status and cause the whole COMMAND to be successful. Something like
“|| (cat ${TEST_NAME}.output && false)” should work in b
I'm trying to simply set the name of the build to be sent to CDash to
something on the command line. I've tried a few different avenues, but no
options seem to affect the build name, other than reconfiguring CMake. I am
using Visual Studio, which of course is multi-configuration, which means
that a
We have several unit tests which we would like to be run as part of our
build process.
To achieve this I have a helper script which creates a custom command that
runs the test, and if successful, creates a file "test_name.passed".
I then add a custom target "test_name.run" which depends on
"test_
I just realized this is in error, issue is closed.
But I still have the need to combine several static libraries into ONE static
library.
There seems to be descriptions of solutions to this, but they are rather
convoluted, so is there an "easy" way of doing:
add_library(foo STATIC )
add_librar