diff options
author | Brad King <brad.king@kitware.com> | 2009-08-03 17:37:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-08-03 17:37:28 (GMT) |
commit | 1a159bbf331104fe680d3f37b703916a910a69f9 (patch) | |
tree | e619247c2b0919b5247c4cde0413f51d41dffae6 /Tests/TryCompile | |
parent | 8049b50398a11a68e6d09cda54331a286605a6ba (diff) | |
download | CMake-1a159bbf331104fe680d3f37b703916a910a69f9.zip CMake-1a159bbf331104fe680d3f37b703916a910a69f9.tar.gz CMake-1a159bbf331104fe680d3f37b703916a910a69f9.tar.bz2 |
Test try_compile project mode
The try_compile command project mode builds an entire source tree
instead of one source file. It uses an existing CMakeLists.txt file in
the given source tree instead of generating one. This commit creates a
test for the mode in the TryCompile test.
Diffstat (limited to 'Tests/TryCompile')
-rw-r--r-- | Tests/TryCompile/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/TryCompile/Inner/CMakeLists.txt | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index a4a3ad7..7895d39 100644 --- a/Tests/TryCompile/CMakeLists.txt +++ b/Tests/TryCompile/CMakeLists.txt @@ -106,6 +106,13 @@ ELSE(CMAKE_ANSI_FOR_SCOPE) MESSAGE("Compiler does not support ansi for scope") ENDIF(CMAKE_ANSI_FOR_SCOPE) +MESSAGE("Testing try_compile project mode") +TRY_COMPILE(TEST_INNER + ${TryCompile_BINARY_DIR}/CMakeFiles/Inner + ${TryCompile_SOURCE_DIR}/Inner + TryCompileInner) +TEST_ASSERT(TEST_INNER "try_compile project mode failed") + ADD_EXECUTABLE(TryCompile pass.c) ###################################### diff --git a/Tests/TryCompile/Inner/CMakeLists.txt b/Tests/TryCompile/Inner/CMakeLists.txt new file mode 100644 index 0000000..b604426 --- /dev/null +++ b/Tests/TryCompile/Inner/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 2.6) +project(TryCompileInner C) + +add_executable(inner ../pass.c) |