summaryrefslogtreecommitdiffstats
path: root/Tests/ExternalProject
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-10-01 21:23:53 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-10-02 18:31:02 (GMT)
commitfd3249e11afeb38284ee8e2012134de4d410c92b (patch)
tree360c3c1fb3993ca3e25a3de663093889a2187ba3 /Tests/ExternalProject
parente6ac0aacf6c3ce17141870e252fda77d994782d3 (diff)
downloadCMake-fd3249e11afeb38284ee8e2012134de4d410c92b.zip
CMake-fd3249e11afeb38284ee8e2012134de4d410c92b.tar.gz
CMake-fd3249e11afeb38284ee8e2012134de4d410c92b.tar.bz2
New USE_FOLDERS property OFF by default. (#3796)
Visual Studio Express editions do not support solution folders, so default behavior should be as if USE_FOLDERS global property is OFF. Also, allow folder names to be the same as target names: internally, use a prefix to distinguish folder GUIDs from target GUIDs. Add a target and folder with the same name in the ExternalProject test to exercise this code. For CMake itself, provide a new option CMAKE_USE_FOLDERS that defaults to ON so that Visual Studio users get a nicely organized CMake project. Express edition users will have to turn off the CMAKE_USE_FOLDERS option in order to build CMake in the VS Express IDE.
Diffstat (limited to 'Tests/ExternalProject')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 00db5d4..45c1149 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -7,6 +7,13 @@ find_package(CVS)
find_package(Subversion)
find_package(Git)
+option(ExternalProjectTest_USE_FOLDERS "Enable folder grouping in IDEs." ON)
+if(ExternalProjectTest_USE_FOLDERS)
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+else()
+ set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
+endif()
+
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER
"CMakePredefinedTargets-in-ExternalProjectTest")
@@ -60,6 +67,15 @@ ExternalProject_Add(${proj}
INSTALL_COMMAND ""
)
+set(proj TargetNameSameAsFolder)
+ExternalProject_Add(${proj}
+ BUILD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ DOWNLOAD_COMMAND ""
+ INSTALL_COMMAND ""
+)
+set_property(TARGET ${proj} PROPERTY FOLDER "${proj}")
+
set(proj MinimalNoOpProject)
ExternalProject_Add(${proj}
BUILD_COMMAND ""