diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-02-19 18:26:38 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-02-19 18:26:38 (GMT) |
commit | 303048d3dce5044b14220af742bf3156b484a882 (patch) | |
tree | aaf33a7c4bd8022c9b7d6ca9234bfa16f2fc3cd7 | |
parent | 09699018ccccf654ce6ca4d0b84e3e2a973f5c22 (diff) | |
download | CMake-303048d3dce5044b14220af742bf3156b484a882.zip CMake-303048d3dce5044b14220af742bf3156b484a882.tar.gz CMake-303048d3dce5044b14220af742bf3156b484a882.tar.bz2 |
ENH: add test for conv libraries
-rw-r--r-- | Source/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ConvLibrary/CMakeLists.txt | 38 |
2 files changed, 29 insertions, 19 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index a41add3..a754b0e 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -697,6 +697,16 @@ IF(BUILD_TESTING) -DCMAKE_TEST_SYSTEM_LIBRARIES:BOOL=${CMAKE_TEST_SYSTEM_LIBRARIES} --test-command complex) + ADD_TEST(ConvLibrary ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/ConvLibrary" + "${CMake_BINARY_DIR}/Tests/ConvLibrary/Step4" + --build-two-config + --build-generator ${CMAKE_TEST_GENERATOR} + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-project ConvLibrary + --test-command bartest) + # ADD_TEST(complexRelativePaths ${CMAKE_CTEST_COMMAND} # --build-and-test # "${CMake_SOURCE_DIR}/Tests/ComplexRelativePaths" diff --git a/Tests/ConvLibrary/CMakeLists.txt b/Tests/ConvLibrary/CMakeLists.txt index 0f4eede..bf1ab83 100644 --- a/Tests/ConvLibrary/CMakeLists.txt +++ b/Tests/ConvLibrary/CMakeLists.txt @@ -1,19 +1,19 @@ -project(foo)
-
-# create a source list
-set(foo_sources foo.cxx bar.c sub1/car.cxx)
-# create a library foo from the sources
-add_library(foo ${foo_sources})
-# get the object files from the target
-get_target_property(OBJECT_FILES foo OBJECT_FILES)
-message("${OBJECT_FILES}")
-# set the object files as generated
-set_source_files_properties(${OBJECT_FILES} PROPERTIES GENERATED true)
-# create a library bar that contains the object files from foo
-add_library(bar ${OBJECT_FILES})
-# set the linker language since bar only has .obj
-set_target_properties(bar PROPERTIES LINKER_LANGUAGE CXX)
-# make sure foo is built before bar
-add_dependencies(bar foo)
-add_executable(bartest bartest.cxx)
-target_link_libraries(bartest bar)
+project(ConvLibrary) + +# create a source list +set(foo_sources foo.cxx bar.c sub1/car.cxx) +# create a library foo from the sources +add_library(foo ${foo_sources}) +# get the object files from the target +get_target_property(OBJECT_FILES foo OBJECT_FILES) +message("${OBJECT_FILES}") +# set the object files as generated +set_source_files_properties(${OBJECT_FILES} PROPERTIES GENERATED true) +# create a library bar that contains the object files from foo +add_library(bar ${OBJECT_FILES}) +# set the linker language since bar only has .obj +set_target_properties(bar PROPERTIES LINKER_LANGUAGE CXX) +# make sure foo is built before bar +add_dependencies(bar foo) +add_executable(bartest bartest.cxx) +target_link_libraries(bartest bar) |