Forráskód Böngészése

Merge topic 'help-presets'

b00512e692 Help: presets: add note for ExternalProject users with env vars

Acked-by: Kitware Robot <[email protected]>
Acked-by: Kyle Edwards <[email protected]>
Merge-request: !6201
Brad King 4 éve
szülő
commit
fee0619e7c
1 módosított fájl, 13 hozzáadás és 0 törlés
  1. 13 0
      Help/manual/cmake-presets.7.rst

+ 13 - 0
Help/manual/cmake-presets.7.rst

@@ -401,6 +401,19 @@ that may contain the following fields:
   are applied. Setting a variable to ``null`` causes it to not be set,
   even if a value was inherited from another preset.
 
+  .. note::
+
+    For a CMake project using ExternalProject with a configuration preset
+    having environment variables needed in the ExternalProject, use a build
+    preset that inherits that configuration preset or the ExternalProject
+    will not have the environment variables set in the configuration preset.
+    Example: suppose the host defaults to one compiler (say Clang)
+    and the user wishes to use another compiler (say GCC). Set configuration
+    preset environment variables ``CC`` and ``CXX`` and use a build preset
+    that inherits that configuration preset. Otherwise the ExternalProject
+    may use a different (system default) compiler than the top-level CMake
+    project.
+
 ``configurePreset``
 
   An optional string specifying the name of a configure preset to