[CMake] HOW TO: build development versions, plus proper INSTALL setup?
Michael Jackson
mike.jackson at bluequartz.net
Mon Mar 9 16:27:00 EDT 2009
The other items in your list looks like you have figured out so I'll
just make a suggestion for #3:
I tried the following and it does work:
# All the following in its own CMakeLists.txt file that
# will be called with add_subdirectory() from the top level
# CMakeLists.txt file.
project(UnitTests)
add_executable(foo_test foo_test.c)
target_link_Libraries(foo_test ...... )
set_target_properties(foo_test PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${UnitTests_BINARY_DIR})
add_test(foo_test ${UnitTests_BINARY_DIR}/foo_test)
If you can wade through the Boost sources there is an experimental
CMake build system that I believe does a lot of this. You could
probably distill all of this down to a Macro that you could invoke to
do all of the above with just a few arguments.
Hope that helps.
_________________________________________________________
Mike Jackson mike.jackson at bluequartz.net
BlueQuartz Software www.bluequartz.net
Principal Software Engineer Dayton, Ohio
On Mar 9, 2009, at 2:49 PM, kent williams wrote:
> 3. Test programs should NOT get thrown in with the actual 'product'
> programs, and ideally stay in ${LOCALDIR_BINARY_DIR} for the local
> project.
More information about the CMake
mailing list