diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-02-10 21:20:10 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-02-10 21:20:10 (GMT) |
commit | b04e32c642e4cdda0352a3fea7159cdadeb0f846 (patch) | |
tree | 22ebaa6fd1fcfd87834378300a70673acec2bb87 /Tests | |
parent | d94c0e0429e1bcb228b25a5c1370353d7b985d97 (diff) | |
download | CMake-b04e32c642e4cdda0352a3fea7159cdadeb0f846.zip CMake-b04e32c642e4cdda0352a3fea7159cdadeb0f846.tar.gz CMake-b04e32c642e4cdda0352a3fea7159cdadeb0f846.tar.bz2 |
ENH: add a new test for TRY_COMPILE
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/TryCompile/CMakeLists.txt | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index cbb5595..55991e7 100644 --- a/Tests/TryCompile/CMakeLists.txt +++ b/Tests/TryCompile/CMakeLists.txt @@ -1,9 +1,9 @@ -PROJECT(TryCompileTest) +PROJECT(TryCompile) # try to compile a file that should compile TRY_COMPILE(SHOULD_PASS - ${TryCompileTest_BINARY_DIR}/CMakeTmp - ${TryCompileTest_SOURCE_DIR}/pass.c + ${TryCompile_BINARY_DIR}/CMakeTmp + ${TryCompile_SOURCE_DIR}/pass.c OUTPUT_VARIABLE TRY_OUT) IF(NOT SHOULD_PASS) MESSAGE(SEND_ERROR "should pass failed ") @@ -12,8 +12,8 @@ MESSAGE( "output from TRY_COMPILE ${TRY_OUT} ") # try to compile a file that should not compile TRY_COMPILE(SHOULD_FAIL - ${TryCompileTest_BINARY_DIR}/CMakeTmp - ${TryCompileTest_SOURCE_DIR}/fail.c + ${TryCompile_BINARY_DIR}/CMakeTmp + ${TryCompile_SOURCE_DIR}/fail.c OUTPUT_VARIABLE TRY_OUT) IF(SHOULD_FAIL) MESSAGE(SEND_ERROR "Should fail passed") @@ -22,8 +22,8 @@ MESSAGE("output from TRY_COMPILE ${TRY_OUT} ") # try to compile a file that should compile TRY_COMPILE(SHOULD_PASS - ${TryCompileTest_BINARY_DIR}/CMakeTmp - ${TryCompileTest_SOURCE_DIR}/pass.c + ${TryCompile_BINARY_DIR}/CMakeTmp + ${TryCompile_SOURCE_DIR}/pass.c OUTPUT_VARIABLE TRY_OUT) IF(NOT SHOULD_PASS) MESSAGE(SEND_ERROR "should pass failed ") @@ -32,8 +32,8 @@ MESSAGE("output from TRY_COMPILE ${TRY_OUT} ") # try to compile a file that should not compile TRY_COMPILE(SHOULD_FAIL - ${TryCompileTest_BINARY_DIR}/CMakeTmp - ${TryCompileTest_SOURCE_DIR}/fail.c + ${TryCompile_BINARY_DIR}/CMakeTmp + ${TryCompile_SOURCE_DIR}/fail.c OUTPUT_VARIABLE TRY_OUT) IF(SHOULD_FAIL) MESSAGE(SEND_ERROR "Should fail passed") @@ -51,3 +51,4 @@ ELSE(NOT SHOULD_FAIL) ENDIF(NOT SHOULD_FAIL) +ADD_EXECUTABLE(TryCompile pass.c) |