Sublime: Add option to specify env vars for the .sublime-project

Create a `CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS` variable to control
addition of env vars in the `.sublime-project`.

Closes: #16387
This commit is contained in:
Bruno Pedrosa
2016-10-26 20:58:11 +02:00
committed by Brad King
parent 9d203c0051
commit 95805d725d
5 changed files with 66 additions and 1 deletions
+1
View File
@@ -160,6 +160,7 @@ Variables that Change Behavior
/variable/CMAKE_PROJECT_PROJECT-NAME_INCLUDE
/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
/variable/CMAKE_STAGING_PREFIX
/variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
/variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE
/variable/CMAKE_SYSTEM_APPBUNDLE_PATH
/variable/CMAKE_SYSTEM_FRAMEWORK_PATH
+6
View File
@@ -0,0 +1,6 @@
st2-env-settings
----------------
* The :generator:`Sublime Text 2` extra generator learned to place
environment variables in the generated ``.sublime-project``.
See the :variable:`CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS` variable.
@@ -0,0 +1,25 @@
CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
---------------------------------
This variable contains a list of env vars as a list of tokens with the
syntax ``var=value``.
Example:
.. code-block:: cmake
set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
"FOO=FOO1\;FOO2\;FOON"
"BAR=BAR1\;BAR2\;BARN"
"BAZ=BAZ1\;BAZ2\;BAZN"
"FOOBAR=FOOBAR1\;FOOBAR2\;FOOBARN"
"VALID="
)
In case of malformed variables CMake will fail:
.. code-block:: cmake
set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
"THIS_IS_NOT_VALID"
)