[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.6.2.1 1.6.2.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Apr 2 09:16:17 EDT 2008
Update of /cvsroot/CMake/CMake/Tests/Properties
In directory public:/mounts/ram/cvs-serv9816/Tests/Properties
Modified Files:
Tag: CMake-2-6
CMakeLists.txt
Log Message:
ENH: merge in main tree for RC 6
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Properties/CMakeLists.txt,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -C 2 -d -r1.6.2.1 -r1.6.2.2
*** CMakeLists.txt 25 Mar 2008 23:59:29 -0000 1.6.2.1
--- CMakeLists.txt 2 Apr 2008 13:16:14 -0000 1.6.2.2
***************
*** 24,31 ****
--- 24,44 ----
# test generic property interfaces
+ get_property(GLOBALRESULT GLOBAL PROPERTY GLOBALTEST DEFINED)
+ if (GLOBALRESULT)
+ message(SEND_ERROR "Error: global prop defined when it should not be, "
+ "result is GLOBALRESULT=${GLOBALRESULT}")
+ endif (GLOBALRESULT)
+
define_property(GLOBAL PROPERTY GLOBALTEST
BRIEF_DOCS "A test property"
FULL_DOCS "A long description of this test property"
)
+
+ get_property(GLOBALRESULT GLOBAL PROPERTY GLOBALTEST DEFINED)
+ if (NOT GLOBALRESULT)
+ message(SEND_ERROR "Error: global prop not defined "
+ "result is GLOBALRESULT=${GLOBALRESULT}")
+ endif (NOT GLOBALRESULT)
+
set_property(GLOBAL PROPERTY GLOBALTEST 1)
set_property(DIRECTORY PROPERTY DIRECTORYTEST 1)
***************
*** 43,47 ****
else (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND
DIRECTORYRESULT AND SOURCERESULT)
! message("Error: test results are RESULT1=${RESULT1} RESULT2=${RESULT2} "
"RESULT3=${RESULT3} GLOBALRESULT=${GLOBALRESULT} "
"DIRECTORYRESULT=${DIRECTORYRESULT} "
--- 56,61 ----
else (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND
DIRECTORYRESULT AND SOURCERESULT)
! message(SEND_ERROR
! "Error: test results are RESULT1=${RESULT1} RESULT2=${RESULT2} "
"RESULT3=${RESULT3} GLOBALRESULT=${GLOBALRESULT} "
"DIRECTORYRESULT=${DIRECTORYRESULT} "
***************
*** 54,60 ****
get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST)
if (NOT TARGETRESULT)
! message("Error: target result is TARGETRESULT=${TARGETRESULT}")
endif (NOT TARGETRESULT)
# test the target SOURCES property
get_property(Properties_SOURCES TARGET Properties PROPERTY SOURCES)
--- 68,92 ----
get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST)
if (NOT TARGETRESULT)
! message(SEND_ERROR
! "Error: target result is TARGETRESULT=${TARGETRESULT}")
endif (NOT TARGETRESULT)
+ # test get_property SET
+ get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST SET)
+ if (NOT TARGETRESULT)
+ message(SEND_ERROR
+ "Error: target prop not set, result is TARGETRESULT=${TARGETRESULT}")
+ endif (NOT TARGETRESULT)
+
+ # test unsetting a property
+ set_property(TARGET Properties PROPERTY TARGETTEST)
+ get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST SET)
+ if (TARGETRESULT)
+ message(SEND_ERROR "Error: target prop not unset, "
+ "result is TARGETRESULT=${TARGETRESULT}")
+ endif (TARGETRESULT)
+
+
+
# test the target SOURCES property
get_property(Properties_SOURCES TARGET Properties PROPERTY SOURCES)
***************
*** 62,66 ****
get_source_file_property(RESULT4 properties.h TEST4)
if(NOT RESULT4)
! message("Error: target result is"
" RESULT4=${RESULT4}"
" Properties_SOURCES=[${Properties_SOURCES}]")
--- 94,98 ----
get_source_file_property(RESULT4 properties.h TEST4)
if(NOT RESULT4)
! message(SEND_ERROR "Error: target result is"
" RESULT4=${RESULT4}"
" Properties_SOURCES=[${Properties_SOURCES}]")
More information about the Cmake-commits
mailing list