summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-12-07 14:45:32 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-12-07 14:45:32 (GMT)
commit27379d7b081be852c2b290a98db548cffffbff04 (patch)
treefcc9e19282bdfb71bf4bf9b1f8fcea1401c2fbd5 /Tests
parent833548f53a2ed799bb0df23fd7d973c30b423d1b (diff)
downloadCMake-27379d7b081be852c2b290a98db548cffffbff04.zip
CMake-27379d7b081be852c2b290a98db548cffffbff04.tar.gz
CMake-27379d7b081be852c2b290a98db548cffffbff04.tar.bz2
ENH: make properties a bit more formal with documentation and chaining
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Complex/Library/CMakeLists.txt2
-rw-r--r--Tests/ComplexOneConfig/Library/CMakeLists.txt2
-rw-r--r--Tests/ComplexRelativePaths/Library/CMakeLists.txt2
-rw-r--r--Tests/LoadCommand/CMakeCommands/cmTestCommand.c10
-rw-r--r--Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c10
5 files changed, 22 insertions, 4 deletions
diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt
index a06745b..3a74efc 100644
--- a/Tests/Complex/Library/CMakeLists.txt
+++ b/Tests/Complex/Library/CMakeLists.txt
@@ -45,6 +45,8 @@ ADD_LIBRARY(CMakeTestLibraryShared SHARED ${SharedLibrarySources})
ADD_LIBRARY(CMakeTestModule MODULE moduleFile.c)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS")
ADD_LIBRARY(CMakeTestCLibraryShared SHARED testConly.c)
+DEFINE_PROPERTY(FOO TARGET "a test property"
+ "A simple etst proerty that means nothign and is used for nothing" 0)
SET_TARGET_PROPERTIES(CMakeTestCLibraryShared PROPERTIES FOO BAR)
IF(NOT BEOS) # No libm on BeOS.
SET_TARGET_PROPERTIES(CMakeTestCLibraryShared PROPERTIES LINK_FLAGS "-lm")
diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt
index a06745b..3a74efc 100644
--- a/Tests/ComplexOneConfig/Library/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt
@@ -45,6 +45,8 @@ ADD_LIBRARY(CMakeTestLibraryShared SHARED ${SharedLibrarySources})
ADD_LIBRARY(CMakeTestModule MODULE moduleFile.c)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS")
ADD_LIBRARY(CMakeTestCLibraryShared SHARED testConly.c)
+DEFINE_PROPERTY(FOO TARGET "a test property"
+ "A simple etst proerty that means nothign and is used for nothing" 0)
SET_TARGET_PROPERTIES(CMakeTestCLibraryShared PROPERTIES FOO BAR)
IF(NOT BEOS) # No libm on BeOS.
SET_TARGET_PROPERTIES(CMakeTestCLibraryShared PROPERTIES LINK_FLAGS "-lm")
diff --git a/Tests/ComplexRelativePaths/Library/CMakeLists.txt b/Tests/ComplexRelativePaths/Library/CMakeLists.txt
index a06745b..3a74efc 100644
--- a/Tests/ComplexRelativePaths/Library/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/Library/CMakeLists.txt
@@ -45,6 +45,8 @@ ADD_LIBRARY(CMakeTestLibraryShared SHARED ${SharedLibrarySources})
ADD_LIBRARY(CMakeTestModule MODULE moduleFile.c)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS")
ADD_LIBRARY(CMakeTestCLibraryShared SHARED testConly.c)
+DEFINE_PROPERTY(FOO TARGET "a test property"
+ "A simple etst proerty that means nothign and is used for nothing" 0)
SET_TARGET_PROPERTIES(CMakeTestCLibraryShared PROPERTIES FOO BAR)
IF(NOT BEOS) # No libm on BeOS.
SET_TARGET_PROPERTIES(CMakeTestCLibraryShared PROPERTIES LINK_FLAGS "-lm")
diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
index 36bf33b..6b4f48f 100644
--- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
+++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
@@ -99,18 +99,24 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[])
}
info->CAPI->AddDefineFlag(mf, "-DADDED_DEFINITION");
- source_file = info->CAPI->CreateSourceFile();
+ source_file = info->CAPI->CreateNewSourceFile(mf);
cstr = info->CAPI->SourceFileGetSourceName(source_file);
sprintf(buffer, "Shold be empty (source file name): [%s]", cstr);
info->CAPI->DisplaySatus(mf, buffer);
cstr = info->CAPI->SourceFileGetFullPath(source_file);
- sprintf(buffer, "Shold be empty (source file full path): [%s]", cstr);
+ sprintf(buffer, "Should be empty (source file full path): [%s]", cstr);
info->CAPI->DisplaySatus(mf, buffer);
+ info->CAPI->DefineSourceFileProperty(mf,"SOME_PROPERTY","unused old prop",
+ "This property is no longer used",
+ 0);
if ( info->CAPI->SourceFileGetPropertyAsBool(source_file, "SOME_PROPERTY") )
{
info->CAPI->SetError(mf, "Property SOME_PROPERTY should not be defined");
return 0;
}
+ info->CAPI->DefineSourceFileProperty(mf,"SOME_PROPERTY2","nice prop",
+ "This property is for testing.",
+ 0);
info->CAPI->SourceFileSetProperty(source_file, "SOME_PROPERTY2", "HERE");
cstr = info->CAPI->SourceFileGetProperty(source_file, "ABSTRACT");
sprintf(buffer, "Should be 0 (source file abstract property): [%p]", cstr);
diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
index 36bf33b..6b4f48f 100644
--- a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
+++ b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
@@ -99,18 +99,24 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[])
}
info->CAPI->AddDefineFlag(mf, "-DADDED_DEFINITION");
- source_file = info->CAPI->CreateSourceFile();
+ source_file = info->CAPI->CreateNewSourceFile(mf);
cstr = info->CAPI->SourceFileGetSourceName(source_file);
sprintf(buffer, "Shold be empty (source file name): [%s]", cstr);
info->CAPI->DisplaySatus(mf, buffer);
cstr = info->CAPI->SourceFileGetFullPath(source_file);
- sprintf(buffer, "Shold be empty (source file full path): [%s]", cstr);
+ sprintf(buffer, "Should be empty (source file full path): [%s]", cstr);
info->CAPI->DisplaySatus(mf, buffer);
+ info->CAPI->DefineSourceFileProperty(mf,"SOME_PROPERTY","unused old prop",
+ "This property is no longer used",
+ 0);
if ( info->CAPI->SourceFileGetPropertyAsBool(source_file, "SOME_PROPERTY") )
{
info->CAPI->SetError(mf, "Property SOME_PROPERTY should not be defined");
return 0;
}
+ info->CAPI->DefineSourceFileProperty(mf,"SOME_PROPERTY2","nice prop",
+ "This property is for testing.",
+ 0);
info->CAPI->SourceFileSetProperty(source_file, "SOME_PROPERTY2", "HERE");
cstr = info->CAPI->SourceFileGetProperty(source_file, "ABSTRACT");
sprintf(buffer, "Should be 0 (source file abstract property): [%p]", cstr);