summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/cmake-presets.7.rst9
-rw-r--r--Help/manual/presets/schema.json87
-rw-r--r--Help/release/dev/presets-schema.rst5
-rw-r--r--Modules/FindBoost.cmake20
-rw-r--r--Modules/FindMatlab.cmake67
-rw-r--r--Modules/FindPkgConfig.cmake4
-rw-r--r--Modules/Findosg.cmake36
-rw-r--r--Modules/FindosgAnimation.cmake28
-rw-r--r--Modules/FindosgDB.cmake4
-rw-r--r--Modules/FindosgFX.cmake29
-rw-r--r--Modules/FindosgGA.cmake29
-rw-r--r--Modules/FindosgIntrospection.cmake30
-rw-r--r--Modules/FindosgManipulator.cmake30
-rw-r--r--Modules/FindosgParticle.cmake29
-rw-r--r--Modules/FindosgPresentation.cmake29
-rw-r--r--Modules/FindosgProducer.cmake29
-rw-r--r--Modules/FindosgQt.cmake28
-rw-r--r--Modules/FindosgShadow.cmake29
-rw-r--r--Modules/FindosgSim.cmake29
-rw-r--r--Modules/FindosgTerrain.cmake29
-rw-r--r--Modules/FindosgText.cmake29
-rw-r--r--Modules/FindosgUtil.cmake29
-rw-r--r--Modules/FindosgViewer.cmake29
-rw-r--r--Modules/FindosgVolume.cmake29
-rw-r--r--Modules/FindosgWidget.cmake29
-rw-r--r--Modules/Findosg_functions.cmake2
-rw-r--r--Modules/FortranCInterface.cmake1
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmCMakePresetsErrors.cxx5
-rw-r--r--Source/cmCMakePresetsErrors.h2
-rw-r--r--Source/cmCMakePresetsGraphInternal.h3
-rw-r--r--Source/cmCMakePresetsGraphReadJSON.cxx19
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h1
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx9
-rw-r--r--Source/cmGlobalNinjaGenerator.h9
-rw-r--r--Source/cmLocalGenerator.cxx11
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmLocalNinjaGenerator.cxx3
-rw-r--r--Source/cmNinjaTargetGenerator.cxx15
-rw-r--r--Source/cmNinjaTargetGenerator.h2
-rw-r--r--Source/cmQtAutoGenInitializer.cxx17
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx5
-rw-r--r--Tests/CudaOnly/Fatbin/CMakeLists.txt1
-rw-r--r--Tests/CudaOnly/OptixIR/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/Autogen/MyWindow.cpp7
-rw-r--r--Tests/RunCMake/Autogen/MyWindow.h16
-rw-r--r--Tests/RunCMake/Autogen/MyWindow.ui5
-rw-r--r--Tests/RunCMake/Autogen/QtAutoMocDeps-stderr.txt (renamed from Tests/RunCMake/Ninja/QtAutoMocDeps-stderr.txt)0
-rw-r--r--Tests/RunCMake/Autogen/QtAutoMocDeps.cmake (renamed from Tests/RunCMake/Ninja/QtAutoMocDeps.cmake)12
-rw-r--r--Tests/RunCMake/Autogen/QtSubDir1/CMakeLists.txt (renamed from Tests/RunCMake/Ninja/QtSubDir1/CMakeLists.txt)2
-rw-r--r--Tests/RunCMake/Autogen/QtSubDir2/CMakeLists.txt (renamed from Tests/RunCMake/Ninja/QtSubDir2/CMakeLists.txt)2
-rw-r--r--Tests/RunCMake/Autogen/QtSubDir3/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Autogen/RunCMakeTest.cmake51
-rw-r--r--Tests/RunCMake/Autogen/app.cpp6
-rw-r--r--Tests/RunCMake/Autogen/app_qt.cpp11
-rw-r--r--Tests/RunCMake/Autogen/simple_lib.cpp6
-rw-r--r--Tests/RunCMake/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMakePresets/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/CMakePresets/SchemaNotSupported-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/SchemaNotSupported-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/SchemaNotSupported.json.in4
-rw-r--r--Tests/RunCMake/CMakePresets/SchemaSupported-result.txt1
-rw-r--r--Tests/RunCMake/CMakePresets/SchemaSupported.json.in4
-rw-r--r--Tests/RunCMake/Ninja/QtSubDir3/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake41
-rw-r--r--Tests/RunCMake/RunCMake.cmake22
-rw-r--r--Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake6
67 files changed, 700 insertions, 350 deletions
diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst
index e2366da..46b5fc7 100644
--- a/Help/manual/cmake-presets.7.rst
+++ b/Help/manual/cmake-presets.7.rst
@@ -41,6 +41,15 @@ The files are a JSON document with an object as the root:
The root object recognizes the following fields:
+``$schema``
+ An optional string that provides a URI to the JSON schema that describes the
+ structure of this JSON document. This field is used for validation and
+ autocompletion in editors that support JSON schema. It doesn't affect the
+ behavior of the document itself. If this field is not specified, the JSON
+ document will still be valid, but tools that use JSON schema for validation
+ and autocompletion may not function correctly.
+ This is allowed in preset files specifying version ``8`` or above.
+
``version``
A required integer representing the version of the JSON schema.
The supported versions are:
diff --git a/Help/manual/presets/schema.json b/Help/manual/presets/schema.json
index adfb1cb..d27faa1 100644
--- a/Help/manual/presets/schema.json
+++ b/Help/manual/presets/schema.json
@@ -9,9 +9,9 @@
"const": 1,
"description": "A required integer representing the version of the JSON schema."
},
- "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
"vendor": { "$ref": "#/definitions/vendor" },
- "configurePresets": { "$ref": "#/definitions/configurePresetsV1"}
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV1" }
},
"additionalProperties": false
},
@@ -21,11 +21,11 @@
"const": 2,
"description": "A required integer representing the version of the JSON schema."
},
- "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
"vendor": { "$ref": "#/definitions/vendor" },
- "configurePresets": { "$ref": "#/definitions/configurePresetsV1"},
- "buildPresets": { "$ref": "#/definitions/buildPresetsV2"},
- "testPresets": { "$ref": "#/definitions/testPresetsV2"}
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV1" },
+ "buildPresets": { "$ref": "#/definitions/buildPresetsV2" },
+ "testPresets": { "$ref": "#/definitions/testPresetsV2" }
},
"additionalProperties": false
},
@@ -35,11 +35,11 @@
"const": 3,
"description": "A required integer representing the version of the JSON schema."
},
- "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
"vendor": { "$ref": "#/definitions/vendor" },
- "configurePresets": { "$ref": "#/definitions/configurePresetsV3"},
- "buildPresets": { "$ref": "#/definitions/buildPresetsV3"},
- "testPresets": { "$ref": "#/definitions/testPresetsV3"}
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV3" },
+ "buildPresets": { "$ref": "#/definitions/buildPresetsV3" },
+ "testPresets": { "$ref": "#/definitions/testPresetsV3" }
},
"additionalProperties": false
},
@@ -49,12 +49,12 @@
"const": 4,
"description": "A required integer representing the version of the JSON schema."
},
- "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
"vendor": { "$ref": "#/definitions/vendor" },
- "configurePresets": { "$ref": "#/definitions/configurePresetsV3"},
- "buildPresets": { "$ref": "#/definitions/buildPresetsV4"},
- "testPresets": { "$ref": "#/definitions/testPresetsV3"},
- "include": { "$ref": "#/definitions/include"}
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV3" },
+ "buildPresets": { "$ref": "#/definitions/buildPresetsV4" },
+ "testPresets": { "$ref": "#/definitions/testPresetsV3" },
+ "include": { "$ref": "#/definitions/include" }
},
"additionalProperties": false
},
@@ -64,12 +64,12 @@
"const": 5,
"description": "A required integer representing the version of the JSON schema."
},
- "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
"vendor": { "$ref": "#/definitions/vendor" },
- "configurePresets": { "$ref": "#/definitions/configurePresetsV3"},
- "buildPresets": { "$ref": "#/definitions/buildPresetsV4"},
- "testPresets": { "$ref": "#/definitions/testPresetsV5"},
- "include": { "$ref": "#/definitions/include"}
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV3" },
+ "buildPresets": { "$ref": "#/definitions/buildPresetsV4" },
+ "testPresets": { "$ref": "#/definitions/testPresetsV5" },
+ "include": { "$ref": "#/definitions/include" }
},
"additionalProperties": false
},
@@ -79,14 +79,14 @@
"const": 6,
"description": "A required integer representing the version of the JSON schema."
},
- "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
"vendor": { "$ref": "#/definitions/vendor" },
- "configurePresets": { "$ref": "#/definitions/configurePresetsV3"},
- "buildPresets": { "$ref": "#/definitions/buildPresetsV4"},
- "testPresets": { "$ref": "#/definitions/testPresetsV6"},
- "packagePresets": { "$ref": "#/definitions/packagePresetsV6"},
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV3" },
+ "buildPresets": { "$ref": "#/definitions/buildPresetsV4" },
+ "testPresets": { "$ref": "#/definitions/testPresetsV6" },
+ "packagePresets": { "$ref": "#/definitions/packagePresetsV6" },
"workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" },
- "include": { "$ref": "#/definitions/include"}
+ "include": { "$ref": "#/definitions/include" }
},
"additionalProperties": false
},
@@ -96,14 +96,32 @@
"const": 7,
"description": "A required integer representing the version of the JSON schema."
},
- "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
"vendor": { "$ref": "#/definitions/vendor" },
- "configurePresets": { "$ref": "#/definitions/configurePresetsV7"},
- "buildPresets": { "$ref": "#/definitions/buildPresetsV4"},
- "testPresets": { "$ref": "#/definitions/testPresetsV6"},
- "packagePresets": { "$ref": "#/definitions/packagePresetsV6"},
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV7" },
+ "buildPresets": { "$ref": "#/definitions/buildPresetsV4" },
+ "testPresets": { "$ref": "#/definitions/testPresetsV6" },
+ "packagePresets": { "$ref": "#/definitions/packagePresetsV6" },
"workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" },
- "include": { "$ref": "#/definitions/include"}
+ "include": { "$ref": "#/definitions/include" }
+ },
+ "additionalProperties": false
+ },
+ {
+ "properties": {
+ "$schema": { "$ref": "#/definitions/$schema" },
+ "version": {
+ "const": 8,
+ "description": "A required integer representing the version of the JSON schema."
+ },
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
+ "vendor": { "$ref": "#/definitions/vendor" },
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV7" },
+ "buildPresets": { "$ref": "#/definitions/buildPresetsV4" },
+ "testPresets": { "$ref": "#/definitions/testPresetsV6" },
+ "packagePresets": { "$ref": "#/definitions/packagePresetsV6" },
+ "workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" },
+ "include": { "$ref": "#/definitions/include" }
},
"additionalProperties": false
}
@@ -112,6 +130,11 @@
"version"
],
"definitions": {
+ "$schema": {
+ "type": "string",
+ "description": "The schema against which to verify this document.",
+ "format": "uri-reference"
+ },
"cmakeMinimumRequired": {
"type": "object",
"description": "An optional object representing the minimum version of CMake needed to build this project.",
diff --git a/Help/release/dev/presets-schema.rst b/Help/release/dev/presets-schema.rst
new file mode 100644
index 0000000..964373c
--- /dev/null
+++ b/Help/release/dev/presets-schema.rst
@@ -0,0 +1,5 @@
+presets-schema
+--------------
+
+* :manual:`cmake-presets(7)` files now support schema version ``8``.
+ It adds support for a ``$schema`` field.
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index f2e4804..1f82bb5 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1365,7 +1365,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_TIMER_DEPENDENCIES chrono)
set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
- else()
+ elseif(Boost_VERSION_STRING VERSION_LESS 1.83.0)
set(_Boost_CONTRACT_DEPENDENCIES thread chrono)
set(_Boost_COROUTINE_DEPENDENCIES context)
set(_Boost_FIBER_DEPENDENCIES context)
@@ -1380,7 +1380,21 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_TIMER_DEPENDENCIES chrono)
set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
- if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.83.0 AND NOT Boost_NO_WARN_NEW_VERSIONS)
+ else()
+ set(_Boost_CONTRACT_DEPENDENCIES thread chrono)
+ set(_Boost_COROUTINE_DEPENDENCIES context)
+ set(_Boost_FIBER_DEPENDENCIES context)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_JSON_DEPENDENCIES container)
+ set(_Boost_LOG_DEPENDENCIES log_setup filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+ set(_Boost_THREAD_DEPENDENCIES chrono atomic)
+ set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.84.0 AND NOT Boost_NO_WARN_NEW_VERSIONS)
message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
endif()
endif()
@@ -1655,7 +1669,7 @@ else()
# _Boost_COMPONENT_HEADERS. See the instructions at the top of
# _Boost_COMPONENT_DEPENDENCIES.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
- "1.82.0" "1.82" "1.81.0" "1.81" "1.80.0" "1.80" "1.79.0" "1.79"
+ "1.83.0" "1.83" "1.82.0" "1.82" "1.81.0" "1.81" "1.80.0" "1.80" "1.79.0" "1.79"
"1.78.0" "1.78" "1.77.0" "1.77" "1.76.0" "1.76" "1.75.0" "1.75" "1.74.0" "1.74"
"1.73.0" "1.73" "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69"
"1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 8a2e1a1..fcd30ff 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1290,7 +1290,7 @@ function(_Matlab_get_version_from_root matlab_root matlab_or_mcr matlab_known_ve
if(EXISTS "${matlab_root}/appdata/version.xml")
# we inspect the application version.xml file that contains the product information
- file(STRINGS "${matlab_root}/appdata/version.xml" productinfo_string NEWLINE_CONSUME)
+ file(READ "${matlab_root}/appdata/version.xml" productinfo_string)
string(REGEX MATCH "<installedProductData.*displayedString=\"([a-zA-Z ]+)\".*/>"
product_reg_match
${productinfo_string}
@@ -1363,8 +1363,14 @@ function(_Matlab_get_version_from_root matlab_root matlab_or_mcr matlab_known_ve
${_matlab_main_real_path_tmp}
CACHE INTERNAL "internal matlab location for the discovered version" FORCE)
- set(matlab_list_of_all_versions)
- matlab_get_version_from_matlab_run("${Matlab_PROG_VERSION_STRING_AUTO_DETECT}" matlab_list_of_all_versions)
+ _Matlab_VersionInfoXML()
+ if(Matlab_VERSION_STRING_INTERNAL AND NOT Matlab_VERSION_STRING_INTERNAL STREQUAL "unknown")
+ # at least back to R2016 VersionInfo.xml exists
+ set(matlab_list_of_all_versions ${Matlab_VERSION_STRING_INTERNAL})
+ else()
+ # time consuming, less stable way to find Matlab version by running Matlab
+ matlab_get_version_from_matlab_run("${Matlab_PROG_VERSION_STRING_AUTO_DETECT}" matlab_list_of_all_versions)
+ endif()
list(LENGTH matlab_list_of_all_versions list_of_all_versions_length)
if(list_of_all_versions_length GREATER 0)
@@ -1381,32 +1387,45 @@ function(_Matlab_get_version_from_root matlab_root matlab_or_mcr matlab_known_ve
message(WARNING "[MATLAB] Found several versions, taking the first one (versions found ${matlab_list_of_all_versions})")
endif()
- # return the updated value
- set(${matlab_final_version} ${Matlab_VERSION_STRING_INTERNAL} PARENT_SCOPE)
- elseif(EXISTS "${matlab_root}/VersionInfo.xml")
+ else()
# MCR
# we cannot run anything in order to extract the version. We assume that the file
# VersionInfo.xml exists under the MatlabRoot, we look for it and extract the version from there
- set(_matlab_version_tmp "unknown")
- file(STRINGS "${matlab_root}/VersionInfo.xml" versioninfo_string NEWLINE_CONSUME)
-
- if(versioninfo_string)
- # parses "<version>9.2.0.538062</version>"
- string(REGEX MATCH "<version>(.*)</version>"
- version_reg_match
- ${versioninfo_string}
- )
+ _Matlab_VersionInfoXML()
+ endif() # Matlab or MCR
- if(CMAKE_MATCH_1 MATCHES "(([0-9]+)\\.([0-9]+))[\\.0-9]*")
- set(_matlab_version_tmp "${CMAKE_MATCH_1}")
- endif()
+ # return the updated value
+ set(${matlab_final_version} ${Matlab_VERSION_STRING_INTERNAL} PARENT_SCOPE)
+
+endfunction()
+
+
+function(_Matlab_VersionInfoXML)
+
+ set(_matlab_version_tmp "unknown")
+
+ set(_XMLfile ${matlab_root}/VersionInfo.xml)
+ if(NOT EXISTS ${_XMLfile})
+ return()
+ endif()
+
+ file(READ ${_XMLfile} versioninfo_string)
+
+ if(versioninfo_string)
+ # parses "<version>9.2.0.538062</version>"
+ string(REGEX MATCH "<version>(.*)</version>"
+ version_reg_match
+ ${versioninfo_string}
+ )
+
+ if(CMAKE_MATCH_1 MATCHES "(([0-9]+)\\.([0-9]+))[\\.0-9]*")
+ set(_matlab_version_tmp "${CMAKE_MATCH_1}")
endif()
- set(${matlab_final_version} "${_matlab_version_tmp}" PARENT_SCOPE)
- set(Matlab_VERSION_STRING_INTERNAL
- "${_matlab_version_tmp}"
- CACHE INTERNAL "Matlab (MCR) version (automatically determined)"
- FORCE)
- endif() # Matlab or MCR
+ endif()
+
+ if(_matlab_version_tmp)
+ set(Matlab_VERSION_STRING_INTERNAL "${_matlab_version_tmp}" CACHE INTERNAL "Matlab version" FORCE)
+ endif()
endfunction()
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 4d29f45..6e8b784 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -563,8 +563,8 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
foreach (_pkg_check_modules_pkg ${_pkg_check_modules_list})
set(_pkg_check_modules_exist_query)
- # check whether version is given
- if (_pkg_check_modules_pkg MATCHES "(.*[^><])(=|[><]=?)(.*)")
+ # check whether version is given while ignoring whitespace
+ if (_pkg_check_modules_pkg MATCHES "(.*[^>< \t])[ \t]*(=|[><]=?)[ \t]*(.*)")
set(_pkg_check_modules_pkg_name "${CMAKE_MATCH_1}")
set(_pkg_check_modules_pkg_op "${CMAKE_MATCH_2}")
set(_pkg_check_modules_pkg_ver "${CMAKE_MATCH_3}")
diff --git a/Modules/Findosg.cmake b/Modules/Findosg.cmake
index 027f315..9e952c9 100644
--- a/Modules/Findosg.cmake
+++ b/Modules/Findosg.cmake
@@ -7,32 +7,40 @@ Findosg
-NOTE: It is highly recommended that you use the new
-FindOpenSceneGraph.cmake introduced in CMake 2.6.3 and not use this
-Find module directly.
+.. note::
+ It is highly recommended that you use the new
+ :module:`FindOpenSceneGraph` introduced in CMake 2.6.3 and not use this
+ Find module directly.
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osg This module defines
+Locate osg This module defines:
-OSG_FOUND - Was the Osg found? OSG_INCLUDE_DIR - Where to find the
-headers OSG_LIBRARIES - The libraries to link against for the OSG (use
-this)
+``OSG_FOUND``
+ Was the Osg found?
+``OSG_INCLUDE_DIR``
+ Where to find theheaders
+``OSG_LIBRARIES``
+ The libraries to link against for the OSG (use this)
+``OSG_LIBRARY``
+ The OSG library
+``OSG_LIBRARY_DEBUG``
+ The OSG debug library
-OSG_LIBRARY - The OSG library OSG_LIBRARY_DEBUG - The OSG debug
-library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgAnimation.cmake b/Modules/FindosgAnimation.cmake
index 65e3016..e31987e 100644
--- a/Modules/FindosgAnimation.cmake
+++ b/Modules/FindosgAnimation.cmake
@@ -7,29 +7,35 @@ FindosgAnimation
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgAnimation This module defines
+Locate osgAnimation This module defines:
-OSGANIMATION_FOUND - Was osgAnimation found? OSGANIMATION_INCLUDE_DIR
-- Where to find the headers OSGANIMATION_LIBRARIES - The libraries to
-link against for the OSG (use this)
+``OSGANIMATION_FOUND``
+ Was osgAnimation found?
+``OSGANIMATION_INCLUDE_DIR``
+ Where to find the headers
+``OSGANIMATION_LIBRARIES``
+ The libraries to link against for the OSG (use this)
+``OSGANIMATION_LIBRARY``
+ The OSG library
+``OSGANIMATION_LIBRARY_DEBUG``
+ The OSG debug library
-OSGANIMATION_LIBRARY - The OSG library OSGANIMATION_LIBRARY_DEBUG -
-The OSG debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgDB.cmake b/Modules/FindosgDB.cmake
index a28f650..9366d21 100644
--- a/Modules/FindosgDB.cmake
+++ b/Modules/FindosgDB.cmake
@@ -37,7 +37,9 @@ Locate osgDB This module defines:
``$OSGDIR`` is an environment variable that would correspond to::
- ./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
#]=======================================================================]
diff --git a/Modules/FindosgFX.cmake b/Modules/FindosgFX.cmake
index 438fab7..79362ef 100644
--- a/Modules/FindosgFX.cmake
+++ b/Modules/FindosgFX.cmake
@@ -7,28 +7,35 @@ FindosgFX
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgFX This module defines
+Locate osgFX This module defines:
-OSGFX_FOUND - Was osgFX found? OSGFX_INCLUDE_DIR - Where to find the
-headers OSGFX_LIBRARIES - The libraries to link against for the osgFX
-(use this)
+``OSGFX_FOUND``
+ Was osgFX found?
+``OSGFX_INCLUDE_DIR``
+ Where to find the headers
+``OSGFX_LIBRARIES``
+ The libraries to link against for the osgFX (use this)
+``OSGFX_LIBRARY``
+ The osgFX library
+``OSGFX_LIBRARY_DEBUG``
+ The osgFX debug library
-OSGFX_LIBRARY - The osgFX library OSGFX_LIBRARY_DEBUG - The osgFX
-debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgGA.cmake b/Modules/FindosgGA.cmake
index 7b6ef30..7ebcce8 100644
--- a/Modules/FindosgGA.cmake
+++ b/Modules/FindosgGA.cmake
@@ -7,28 +7,35 @@ FindosgGA
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgGA This module defines
+Locate osgGA This module defines:
-OSGGA_FOUND - Was osgGA found? OSGGA_INCLUDE_DIR - Where to find the
-headers OSGGA_LIBRARIES - The libraries to link against for the osgGA
-(use this)
+``OSGGA_FOUND``
+ Was osgGA found?
+``OSGGA_INCLUDE_DIR``
+ Where to find the headers
+``OSGGA_LIBRARIES``
+ The libraries to link against for the osgGA (use this)
+``OSGGA_LIBRARY``
+ The osgGA library
+``OSGGA_LIBRARY_DEBUG``
+ The osgGA debug library
-OSGGA_LIBRARY - The osgGA library OSGGA_LIBRARY_DEBUG - The osgGA
-debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgIntrospection.cmake b/Modules/FindosgIntrospection.cmake
index 625e4c2..c0c28f2 100644
--- a/Modules/FindosgIntrospection.cmake
+++ b/Modules/FindosgIntrospection.cmake
@@ -7,29 +7,35 @@ FindosgIntrospection
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgINTROSPECTION This module defines
+Locate osgINTROSPECTION This module defines:
-OSGINTROSPECTION_FOUND - Was osgIntrospection found?
-OSGINTROSPECTION_INCLUDE_DIR - Where to find the headers
-OSGINTROSPECTION_LIBRARIES - The libraries to link for
-osgIntrospection (use this)
+``OSGINTROSPECTION_FOUND``
+ Was osgIntrospection found?
+``OSGINTROSPECTION_INCLUDE_DIR``
+ Where to find the headers
+``OSGINTROSPECTION_LIBRARIES``
+ The libraries to link for osgIntrospection (use this)
+``OSGINTROSPECTION_LIBRARY``
+ The osgIntrospection library
+``OSGINTROSPECTION_LIBRARY_DEBUG``
+ The osgIntrospection debug library
-OSGINTROSPECTION_LIBRARY - The osgIntrospection library
-OSGINTROSPECTION_LIBRARY_DEBUG - The osgIntrospection debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgManipulator.cmake b/Modules/FindosgManipulator.cmake
index 857ff5d..47c74f6 100644
--- a/Modules/FindosgManipulator.cmake
+++ b/Modules/FindosgManipulator.cmake
@@ -7,29 +7,35 @@ FindosgManipulator
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgManipulator This module defines
+Locate osgManipulator This module defines:
-OSGMANIPULATOR_FOUND - Was osgManipulator found?
-OSGMANIPULATOR_INCLUDE_DIR - Where to find the headers
-OSGMANIPULATOR_LIBRARIES - The libraries to link for osgManipulator
-(use this)
+``OSGMANIPULATOR_FOUND``
+ Was osgManipulator found?
+``OSGMANIPULATOR_INCLUDE_DIR``
+ Where to find the headers
+``OSGMANIPULATOR_LIBRARIES``
+ The libraries to link for osgManipulator (use this)
+``OSGMANIPULATOR_LIBRARY``
+ The osgManipulator library
+``OSGMANIPULATOR_LIBRARY_DEBUG``
+ The osgManipulator debug library
-OSGMANIPULATOR_LIBRARY - The osgManipulator library
-OSGMANIPULATOR_LIBRARY_DEBUG - The osgManipulator debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgParticle.cmake b/Modules/FindosgParticle.cmake
index 91a30dc..cbe033d 100644
--- a/Modules/FindosgParticle.cmake
+++ b/Modules/FindosgParticle.cmake
@@ -7,28 +7,35 @@ FindosgParticle
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgParticle This module defines
+Locate osgParticle This module defines:
-OSGPARTICLE_FOUND - Was osgParticle found? OSGPARTICLE_INCLUDE_DIR -
-Where to find the headers OSGPARTICLE_LIBRARIES - The libraries to
-link for osgParticle (use this)
+``OSGPARTICLE_FOUND``
+ Was osgParticle found?
+``OSGPARTICLE_INCLUDE_DIR``
+ Where to find the headers
+``OSGPARTICLE_LIBRARIES``
+ The libraries to link for osgParticle (use this)
+``OSGPARTICLE_LIBRARY``
+ The osgParticle library
+``OSGPARTICLE_LIBRARY_DEBUG``
+ The osgParticle debug library
-OSGPARTICLE_LIBRARY - The osgParticle library
-OSGPARTICLE_LIBRARY_DEBUG - The osgParticle debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgPresentation.cmake b/Modules/FindosgPresentation.cmake
index eae75d6..e8c8b4f 100644
--- a/Modules/FindosgPresentation.cmake
+++ b/Modules/FindosgPresentation.cmake
@@ -7,30 +7,35 @@ FindosgPresentation
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgPresentation This module defines
+Locate osgPresentation This module defines:
-OSGPRESENTATION_FOUND - Was osgPresentation found?
-OSGPRESENTATION_INCLUDE_DIR - Where to find the headers
-OSGPRESENTATION_LIBRARIES - The libraries to link for osgPresentation
-(use this)
+``OSGPRESENTATION_FOUND``
+ Was osgPresentation found?
+``OSGPRESENTATION_INCLUDE_DIR``
+ Where to find the headers
+``OSGPRESENTATION_LIBRARIES``
+ The libraries to link for osgPresentation (use this)
+``OSGPRESENTATION_LIBRARY``
+ The osgPresentation library
+``OSGPRESENTATION_LIBRARY_DEBUG``
+ The osgPresentation debug library
-OSGPRESENTATION_LIBRARY - The osgPresentation library
-OSGPRESENTATION_LIBRARY_DEBUG - The osgPresentation debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+used in building osg.
Created by Eric Wing. Modified to work with osgPresentation by Robert
Osfield, January 2012.
#]=======================================================================]
diff --git a/Modules/FindosgProducer.cmake b/Modules/FindosgProducer.cmake
index 33b9f73..92f0d20 100644
--- a/Modules/FindosgProducer.cmake
+++ b/Modules/FindosgProducer.cmake
@@ -7,28 +7,35 @@ FindosgProducer
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgProducer This module defines
+Locate osgProducer This module defines:
-OSGPRODUCER_FOUND - Was osgProducer found? OSGPRODUCER_INCLUDE_DIR -
-Where to find the headers OSGPRODUCER_LIBRARIES - The libraries to
-link for osgProducer (use this)
+``OSGPRODUCER_FOUND``
+ Was osgProducer found?
+``OSGPRODUCER_INCLUDE_DIR``
+ Where to find the headers
+``OSGPRODUCER_LIBRARIES``
+ The libraries to link for osgProducer (use this)
+``OSGPRODUCER_LIBRARY``
+ The osgProducer library
+``OSGPRODUCER_LIBRARY_DEBUG``
+ The osgProducer debug library
-OSGPRODUCER_LIBRARY - The osgProducer library
-OSGPRODUCER_LIBRARY_DEBUG - The osgProducer debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgQt.cmake b/Modules/FindosgQt.cmake
index cf35630..2ad7174 100644
--- a/Modules/FindosgQt.cmake
+++ b/Modules/FindosgQt.cmake
@@ -7,27 +7,35 @@ FindosgQt
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgQt This module defines
+Locate osgQt This module defines:
-OSGQT_FOUND - Was osgQt found? OSGQT_INCLUDE_DIR - Where to find the
-headers OSGQT_LIBRARIES - The libraries to link for osgQt (use this)
+``OSGQT_FOUND``
+ Was osgQt found?
+``OSGQT_INCLUDE_DIR``
+ Where to find the headers
+``OSGQT_LIBRARIES``
+ The libraries to link for osgQt (use this)
+``OSGQT_LIBRARY``
+ The osgQt library
+``OSGQT_LIBRARY_DEBUG``
+ The osgQt debug library
-OSGQT_LIBRARY - The osgQt library OSGQT_LIBRARY_DEBUG - The osgQt
-debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing. Modified to work with osgQt by Robert Osfield,
January 2012.
diff --git a/Modules/FindosgShadow.cmake b/Modules/FindosgShadow.cmake
index 0049c4e..12eb9da 100644
--- a/Modules/FindosgShadow.cmake
+++ b/Modules/FindosgShadow.cmake
@@ -7,28 +7,35 @@ FindosgShadow
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgShadow This module defines
+Locate osgShadow This module defines:
-OSGSHADOW_FOUND - Was osgShadow found? OSGSHADOW_INCLUDE_DIR - Where
-to find the headers OSGSHADOW_LIBRARIES - The libraries to link for
-osgShadow (use this)
+``OSGSHADOW_FOUND``
+ Was osgShadow found?
+``OSGSHADOW_INCLUDE_DIR``
+ Where to find the headers
+``OSGSHADOW_LIBRARIES``
+ The libraries to link for osgShadow (use this)
+``OSGSHADOW_LIBRARY``
+ The osgShadow library
+``OSGSHADOW_LIBRARY_DEBUG``
+ The osgShadow debug library
-OSGSHADOW_LIBRARY - The osgShadow library OSGSHADOW_LIBRARY_DEBUG -
-The osgShadow debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgSim.cmake b/Modules/FindosgSim.cmake
index 43ba542..37ef03c 100644
--- a/Modules/FindosgSim.cmake
+++ b/Modules/FindosgSim.cmake
@@ -7,28 +7,35 @@ FindosgSim
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgSim This module defines
+Locate osgSim This module defines:
-OSGSIM_FOUND - Was osgSim found? OSGSIM_INCLUDE_DIR - Where to find
-the headers OSGSIM_LIBRARIES - The libraries to link for osgSim (use
-this)
+``OSGSIM_FOUND``
+ Was osgSim found?
+``OSGSIM_INCLUDE_DIR``
+ Where to find the headers
+``OSGSIM_LIBRARIES``
+ The libraries to link for osgSim (use this)
+``OSGSIM_LIBRARY``
+ The osgSim library
+``OSGSIM_LIBRARY_DEBUG``
+ The osgSim debug library
-OSGSIM_LIBRARY - The osgSim library OSGSIM_LIBRARY_DEBUG - The osgSim
-debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgTerrain.cmake b/Modules/FindosgTerrain.cmake
index c6f5b69..a2de4ea 100644
--- a/Modules/FindosgTerrain.cmake
+++ b/Modules/FindosgTerrain.cmake
@@ -7,28 +7,35 @@ FindosgTerrain
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgTerrain This module defines
+Locate osgTerrain This module defines:
-OSGTERRAIN_FOUND - Was osgTerrain found? OSGTERRAIN_INCLUDE_DIR -
-Where to find the headers OSGTERRAIN_LIBRARIES - The libraries to link
-for osgTerrain (use this)
+``OSGTERRAIN_FOUND``
+ Was osgTerrain found?
+``OSGTERRAIN_INCLUDE_DIR``
+ Where to find the headers
+``OSGTERRAIN_LIBRARIES``
+ The libraries to link for osgTerrain (use this)
+``OSGTERRAIN_LIBRARY``
+ The osgTerrain library
+``OSGTERRAIN_LIBRARY_DEBUG``
+ The osgTerrain debug library
-OSGTERRAIN_LIBRARY - The osgTerrain library OSGTERRAIN_LIBRARY_DEBUG -
-The osgTerrain debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgText.cmake b/Modules/FindosgText.cmake
index fd3c232..7646ad0 100644
--- a/Modules/FindosgText.cmake
+++ b/Modules/FindosgText.cmake
@@ -7,28 +7,35 @@ FindosgText
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgText This module defines
+Locate osgText This module defines:
-OSGTEXT_FOUND - Was osgText found? OSGTEXT_INCLUDE_DIR - Where to find
-the headers OSGTEXT_LIBRARIES - The libraries to link for osgText (use
-this)
+``OSGTEXT_FOUND``
+ Was osgText found?
+``OSGTEXT_INCLUDE_DIR``
+ Where to find the headers
+``OSGTEXT_LIBRARIES``
+ The libraries to link for osgText (use this)
+``OSGTEXT_LIBRARY``
+ The osgText library
+``OSGTEXT_LIBRARY_DEBUG``
+ The osgText debug library
-OSGTEXT_LIBRARY - The osgText library OSGTEXT_LIBRARY_DEBUG - The
-osgText debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgUtil.cmake b/Modules/FindosgUtil.cmake
index e84727a..a34fea0 100644
--- a/Modules/FindosgUtil.cmake
+++ b/Modules/FindosgUtil.cmake
@@ -7,28 +7,35 @@ FindosgUtil
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgUtil This module defines
+Locate osgUtil This module defines:
-OSGUTIL_FOUND - Was osgUtil found? OSGUTIL_INCLUDE_DIR - Where to find
-the headers OSGUTIL_LIBRARIES - The libraries to link for osgUtil (use
-this)
+``OSGUTIL_FOUND``
+ Was osgUtil found?
+``OSGUTIL_INCLUDE_DIR``
+ Where to find the headers
+``OSGUTIL_LIBRARIES``
+ The libraries to link for osgUtil (use this)
+``OSGUTIL_LIBRARY``
+ The osgUtil library
+``OSGUTIL_LIBRARY_DEBUG``
+ The osgUtil debug library
-OSGUTIL_LIBRARY - The osgUtil library OSGUTIL_LIBRARY_DEBUG - The
-osgUtil debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgViewer.cmake b/Modules/FindosgViewer.cmake
index 2174357..c3834e8 100644
--- a/Modules/FindosgViewer.cmake
+++ b/Modules/FindosgViewer.cmake
@@ -7,28 +7,35 @@ FindosgViewer
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgViewer This module defines
+Locate osgViewer This module defines:
-OSGVIEWER_FOUND - Was osgViewer found? OSGVIEWER_INCLUDE_DIR - Where
-to find the headers OSGVIEWER_LIBRARIES - The libraries to link for
-osgViewer (use this)
+``OSGVIEWER_FOUND``
+ Was osgViewer found?
+``OSGVIEWER_INCLUDE_DIR``
+ Where to find the headers
+``OSGVIEWER_LIBRARIES``
+ The libraries to link for osgViewer (use this)
+``OSGVIEWER_LIBRARY``
+ The osgViewer library
+``OSGVIEWER_LIBRARY_DEBUG``
+ The osgViewer debug library
-OSGVIEWER_LIBRARY - The osgViewer library OSGVIEWER_LIBRARY_DEBUG -
-The osgViewer debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgVolume.cmake b/Modules/FindosgVolume.cmake
index 35defef..58d9f7a 100644
--- a/Modules/FindosgVolume.cmake
+++ b/Modules/FindosgVolume.cmake
@@ -7,28 +7,35 @@ FindosgVolume
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgVolume This module defines
+Locate osgVolume This module defines:
-OSGVOLUME_FOUND - Was osgVolume found? OSGVOLUME_INCLUDE_DIR - Where
-to find the headers OSGVOLUME_LIBRARIES - The libraries to link for
-osgVolume (use this)
+``OSGVOLUME_FOUND``
+ Was osgVolume found?
+``OSGVOLUME_INCLUDE_DIR``
+ Where to find the headers
+``OSGVOLUME_LIBRARIES``
+ The libraries to link for osgVolume (use this)
+``OSGVOLUME_LIBRARY``
+ The osgVolume library
+``OSGVOLUME_LIBRARY_DEBUG``
+ The osgVolume debug library
-OSGVOLUME_LIBRARY - The osgVolume library OSGVOLUME_LIBRARY_DEBUG -
-The osgVolume debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
Created by Eric Wing.
#]=======================================================================]
diff --git a/Modules/FindosgWidget.cmake b/Modules/FindosgWidget.cmake
index c7aae44..4049fad 100644
--- a/Modules/FindosgWidget.cmake
+++ b/Modules/FindosgWidget.cmake
@@ -7,28 +7,35 @@ FindosgWidget
-This is part of the Findosg* suite used to find OpenSceneGraph
+This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
-module (perhaps because the default FindOpenGL.cmake module doesn't
+module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
-FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
+:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
-Locate osgWidget This module defines
+Locate osgWidget This module defines:
-OSGWIDGET_FOUND - Was osgWidget found? OSGWIDGET_INCLUDE_DIR - Where
-to find the headers OSGWIDGET_LIBRARIES - The libraries to link for
-osgWidget (use this)
+``OSGWIDGET_FOUND``
+ Was osgWidget found?
+``OSGWIDGET_INCLUDE_DIR``
+ Where to find the headers
+``OSGWIDGET_LIBRARIES``
+ The libraries to link for osgWidget (use this)
+``OSGWIDGET_LIBRARY``
+ The osgWidget library
+``OSGWIDGET_LIBRARY_DEBUG``
+ The osgWidget debug library
-OSGWIDGET_LIBRARY - The osgWidget library OSGWIDGET_LIBRARY_DEBUG -
-The osgWidget debug library
+``$OSGDIR`` is an environment variable that would correspond to::
-$OSGDIR is an environment variable that would correspond to the
-./configure --prefix=$OSGDIR used in building osg.
+ ./configure --prefix=$OSGDIR
+
+used in building osg.
FindosgWidget.cmake tweaked from Findosg* suite as created by Eric
Wing.
diff --git a/Modules/Findosg_functions.cmake b/Modules/Findosg_functions.cmake
index 563b6bd..5226102 100644
--- a/Modules/Findosg_functions.cmake
+++ b/Modules/Findosg_functions.cmake
@@ -10,7 +10,7 @@ Findosg_functions
This CMake file contains two macros to assist with searching for OSG
-libraries and nodekits. Please see FindOpenSceneGraph.cmake for full
+libraries and nodekits. Please see :module:`FindOpenSceneGraph` for full
documentation.
#]=======================================================================]
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index 2c85029..81481a7 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -374,6 +374,7 @@ function(FortranCInterface_VERIFY)
"-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}"
"-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}"
"-DFortranCInterface_BINARY_DIR=${FortranCInterface_BINARY_DIR}"
+ "-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}"
${_FortranCInterface_OSX_ARCH}
${_FortranCInterface_EXE_LINKER_FLAGS}
OUTPUT_VARIABLE _output)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 289f22a..395d321 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 27)
-set(CMake_VERSION_PATCH 20230911)
+set(CMake_VERSION_PATCH 20230914)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/cmCMakePresetsErrors.cxx b/Source/cmCMakePresetsErrors.cxx
index e0ff0c6..1b88a0c 100644
--- a/Source/cmCMakePresetsErrors.cxx
+++ b/Source/cmCMakePresetsErrors.cxx
@@ -302,4 +302,9 @@ void PRESET_MISSING_FIELD(const std::string& presetName,
state->AddError(cmStrCat("Preset \"", presetName, "\" missing field \"",
missingField, "\""));
}
+
+void SCHEMA_UNSUPPORTED(cmJSONState* state)
+{
+ state->AddError("File version must be 8 or higher for $schema support");
+}
}
diff --git a/Source/cmCMakePresetsErrors.h b/Source/cmCMakePresetsErrors.h
index 14aaed7..b755c25 100644
--- a/Source/cmCMakePresetsErrors.h
+++ b/Source/cmCMakePresetsErrors.h
@@ -113,4 +113,6 @@ JsonErrors::ErrorGenerator INVALID_ROOT_OBJECT(
void PRESET_MISSING_FIELD(const std::string& presetName,
const std::string& missingField, cmJSONState* state);
+
+void SCHEMA_UNSUPPORTED(cmJSONState* state);
}
diff --git a/Source/cmCMakePresetsGraphInternal.h b/Source/cmCMakePresetsGraphInternal.h
index f133efb..5c76e0e 100644
--- a/Source/cmCMakePresetsGraphInternal.h
+++ b/Source/cmCMakePresetsGraphInternal.h
@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#pragma once
+#include <cstddef>
#include <memory>
#include <string>
#include <vector>
@@ -179,4 +180,6 @@ bool PresetVectorOneOrMoreStringHelper(std::vector<std::string>& out,
bool EnvironmentMapHelper(
std::map<std::string, cm::optional<std::string>>& out,
const Json::Value* value, cmJSONState* state);
+
+cmJSONHelper<std::nullptr_t> SchemaHelper();
}
diff --git a/Source/cmCMakePresetsGraphReadJSON.cxx b/Source/cmCMakePresetsGraphReadJSON.cxx
index 8d63441..0d8ec63 100644
--- a/Source/cmCMakePresetsGraphReadJSON.cxx
+++ b/Source/cmCMakePresetsGraphReadJSON.cxx
@@ -38,7 +38,7 @@ using MacroExpander = cmCMakePresetsGraphInternal::MacroExpander;
using cmCMakePresetsGraphInternal::ExpandMacros;
constexpr int MIN_VERSION = 1;
-constexpr int MAX_VERSION = 7;
+constexpr int MAX_VERSION = 8;
struct CMakeVersion
{
@@ -294,7 +294,9 @@ auto const RootPresetsHelper =
.Bind<std::nullptr_t>("vendor"_s, nullptr,
cmCMakePresetsGraphInternal::VendorHelper(
cmCMakePresetsErrors::INVALID_ROOT),
- false);
+ false)
+ .Bind<std::nullptr_t>("$schema"_s, nullptr,
+ cmCMakePresetsGraphInternal::SchemaHelper(), false);
}
namespace cmCMakePresetsGraphInternal {
@@ -413,6 +415,13 @@ bool EnvironmentMapHelper(
return helper(out, value, state);
}
+
+cmJSONHelper<std::nullptr_t> SchemaHelper()
+{
+ return [](std::nullptr_t&, const Json::Value*, cmJSONState*) -> bool {
+ return true;
+ };
+}
}
bool cmCMakePresetsGraph::ReadJSONFile(const std::string& filename,
@@ -488,6 +497,12 @@ bool cmCMakePresetsGraph::ReadJSONFile(const std::string& filename,
return false;
}
+ // Support for $schema added in version 8.
+ if (v < 8 && root.isMember("$schema")) {
+ cmCMakePresetsErrors::SCHEMA_UNSUPPORTED(&this->parseState);
+ return false;
+ }
+
RootPresets presets;
if ((result = RootPresetsHelper(presets, &root, &parseState)) != true) {
return result;
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index 1919b01..782d6c8 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -23,6 +23,7 @@ class cmGeneratorTarget;
SELECT(F, EvaluatingSystemIncludeDirectories, SYSTEM_INCLUDE_DIRECTORIES) \
SELECT(F, EvaluatingCompileDefinitions, COMPILE_DEFINITIONS) \
SELECT(F, EvaluatingCompileOptions, COMPILE_OPTIONS) \
+ SELECT(F, EvaluatingAutoMocMacroNames, AUTOMOC_MACRO_NAMES) \
SELECT(F, EvaluatingAutoUicOptions, AUTOUIC_OPTIONS) \
SELECT(F, EvaluatingSources, SOURCES) \
SELECT(F, EvaluatingCompileFeatures, COMPILE_FEATURES) \
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 54c3737..30305a1 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -554,6 +554,15 @@ cmGlobalNinjaGenerator::cmGlobalNinjaGenerator(cmake* cm)
{
#ifdef _WIN32
cm->GetState()->SetWindowsShell(true);
+
+ // Attempt to use full path to COMSPEC, default "cmd.exe"
+ std::string comspec;
+ if (cmSystemTools::GetEnv("COMSPEC", comspec) &&
+ cmSystemTools::FileIsFullPath(comspec)) {
+ this->Comspec = comspec;
+ } else {
+ this->Comspec = "cmd.exe";
+ }
#endif
this->FindMakeProgramFile = "CMakeNinjaFindMake.cmake";
}
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 4b026eb..c43e27c 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -282,6 +282,10 @@ public:
};
MapToNinjaPathImpl MapToNinjaPath() { return { this }; }
+#ifdef _WIN32
+ std::string const& GetComspec() const { return this->Comspec; }
+#endif
+
// -- Additional clean files
void AddAdditionalCleanFile(std::string fileName, const std::string& config);
const char* GetAdditionalCleanTargetName() const
@@ -592,6 +596,11 @@ private:
codecvt_Encoding NinjaExpectedEncoding = codecvt_Encoding::None;
+#ifdef _WIN32
+ // Windows Command shell.
+ std::string Comspec;
+#endif
+
bool DiagnosedCxxModuleNinjaSupport = false;
void InitOutputPathPrefix();
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 6472031..63c8aa8 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2770,10 +2770,10 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
}
if (editAndContinueDebugInfo || msvc2008OrLess) {
- this->CopyPchCompilePdb(config, target, *ReuseFrom,
+ this->CopyPchCompilePdb(config, lang, target, *ReuseFrom,
reuseTarget, { ".pdb", ".idb" });
} else if (programDatabaseDebugInfo) {
- this->CopyPchCompilePdb(config, target, *ReuseFrom,
+ this->CopyPchCompilePdb(config, lang, target, *ReuseFrom,
reuseTarget, { ".pdb" });
}
}
@@ -2830,9 +2830,9 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
}
void cmLocalGenerator::CopyPchCompilePdb(
- const std::string& config, cmGeneratorTarget* target,
- const std::string& ReuseFrom, cmGeneratorTarget* reuseTarget,
- const std::vector<std::string>& extensions)
+ const std::string& config, const std::string& language,
+ cmGeneratorTarget* target, const std::string& ReuseFrom,
+ cmGeneratorTarget* reuseTarget, const std::vector<std::string>& extensions)
{
const std::string pdb_prefix =
this->GetGlobalGenerator()->IsMultiConfig() ? cmStrCat(config, "/") : "";
@@ -2916,6 +2916,7 @@ void cmLocalGenerator::CopyPchCompilePdb(
cc->SetCommandLines(commandLines);
cc->SetComment(no_message);
cc->SetStdPipesUTF8(true);
+ cc->AppendDepends({ reuseTarget->GetPchFile(config, language) });
if (this->GetGlobalGenerator()->IsVisualStudio()) {
cc->SetByproducts(outputs);
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index eddc033..a920cfe 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -649,7 +649,9 @@ private:
bool AllAppleArchSysrootsAreTheSame(const std::vector<std::string>& archs,
cmValue sysroot);
- void CopyPchCompilePdb(const std::string& config, cmGeneratorTarget* target,
+ void CopyPchCompilePdb(const std::string& config,
+ const std::string& language,
+ cmGeneratorTarget* target,
const std::string& ReuseFrom,
cmGeneratorTarget* reuseTarget,
std::vector<std::string> const& extensions);
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 2316fb3..bc3da6e 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -538,13 +538,14 @@ std::string cmLocalNinjaGenerator::BuildCommandLine(
std::ostringstream cmd;
#ifdef _WIN32
+ cmGlobalNinjaGenerator const* gg = this->GetGlobalNinjaGenerator();
bool const needCMD =
cmdLines.size() > 1 || (customStep.empty() && RuleNeedsCMD(cmdLines[0]));
for (auto li = cmdLines.begin(); li != cmdLines.end(); ++li) {
if (li != cmdLines.begin()) {
cmd << " && ";
} else if (needCMD) {
- cmd << "cmd.exe /C \"";
+ cmd << gg->GetComspec() << " /C \"";
}
// Put current cmdLine in brackets if it contains "||" because it has
// higher precedence than "&&" in cmd.exe
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 09f8495..6187543 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -49,6 +49,8 @@
#include "cmValue.h"
#include "cmake.h"
+class cmCustomCommand;
+
std::unique_ptr<cmNinjaTargetGenerator> cmNinjaTargetGenerator::New(
cmGeneratorTarget* target)
{
@@ -972,16 +974,15 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements(
<< cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType())
<< " target " << this->GetTargetName() << "\n\n";
+ std::vector<cmCustomCommand const*> customCommands;
{
- std::vector<cmSourceFile const*> customCommands;
- this->GeneratorTarget->GetCustomCommands(customCommands, config);
- for (cmSourceFile const* sf : customCommands) {
+ std::vector<cmSourceFile const*> customCommandSources;
+ this->GeneratorTarget->GetCustomCommands(customCommandSources, config);
+ for (cmSourceFile const* sf : customCommandSources) {
cmCustomCommand const* cc = sf->GetCustomCommand();
this->GetLocalGenerator()->AddCustomCommandTarget(
cc, this->GetGeneratorTarget());
- // Record the custom commands for this target. The container is used
- // in WriteObjectBuildStatement when called in a loop below.
- this->Configs[config].CustomCommands.push_back(cc);
+ customCommands.push_back(cc);
}
}
{
@@ -1028,7 +1029,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements(
cm::append(orderOnlyDeps, this->Configs[config].ExtraFiles);
// Add order-only dependencies on custom command outputs.
- for (cmCustomCommand const* cc : this->Configs[config].CustomCommands) {
+ for (cmCustomCommand const* cc : customCommands) {
cmCustomCommandGenerator ccg(*cc, config, this->GetLocalGenerator());
const std::vector<std::string>& ccoutputs = ccg.GetOutputs();
const std::vector<std::string>& ccbyproducts = ccg.GetByproducts();
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 49e7018..d41d86e 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -19,7 +19,6 @@
#include "cmNinjaTypes.h"
#include "cmOSXBundleGenerator.h"
-class cmCustomCommand;
class cmGeneratedFileStream;
class cmGeneratorTarget;
class cmLocalNinjaGenerator;
@@ -251,7 +250,6 @@ private:
mutable ImportedCxxModuleLookup ImportedCxxModules;
// Swift Support
Json::Value SwiftOutputMap;
- std::vector<cmCustomCommand const*> CustomCommands;
cmNinjaDeps ExtraFiles;
std::unique_ptr<MacOSXContentGeneratorType> MacOSXContentGenerator;
};
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index c9f65f6..b1d90ee 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1177,17 +1177,22 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
this->Makefile->AddCMakeOutputFile(this->AutogenTarget.InfoFile);
// Determine whether to use a depfile for the AUTOGEN target.
- const bool useNinjaDepfile = this->QtVersion >= IntegerVersion(5, 15) &&
- this->GlobalGen->GetName().find("Ninja") != std::string::npos;
+ bool const useDepfile = [this]() -> bool {
+ auto const& gen = this->GlobalGen->GetName();
+ return this->QtVersion >= IntegerVersion(5, 15) &&
+ (gen.find("Ninja") != std::string::npos ||
+ gen.find("Make") != std::string::npos);
+ }();
// Files provided by the autogen target
std::vector<std::string> autogenByproducts;
std::vector<std::string> timestampByproducts;
if (this->Moc.Enabled) {
this->AddGeneratedSource(this->Moc.CompilationFile, this->Moc, true);
- if (useNinjaDepfile) {
+ if (useDepfile) {
if (this->MultiConfig &&
- !this->Makefile->GetSafeDefinition("CMAKE_CROSS_CONFIGS").empty()) {
+ !this->Makefile->GetSafeDefinition("CMAKE_CROSS_CONFIGS").empty() &&
+ this->GlobalGen->GetName().find("Ninja") != std::string::npos) {
// Make all mocs_compilation_<CONFIG>.cpp files byproducts of the
// ${target}_autogen/timestamp custom command.
// We cannot just use Moc.CompilationFileGenex here, because that
@@ -1365,7 +1370,7 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
this->AutogenTarget.DependFiles.begin(),
this->AutogenTarget.DependFiles.end());
- if (useNinjaDepfile) {
+ if (useDepfile) {
// Create a custom command that generates a timestamp file and
// has a depfile assigned. The depfile is created by JobDepFilesMergeT.
//
@@ -1472,7 +1477,7 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
autogenTarget->AddUtility(depName.Value.first, false, this->Makefile);
}
}
- if (!useNinjaDepfile) {
+ if (!useDepfile) {
// Add additional autogen target dependencies to autogen target
for (cmTarget const* depTarget : this->AutogenTarget.DependTargets) {
autogenTarget->AddUtility(depTarget->GetName(), false, this->Makefile);
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 7ca23a3..96a01ad 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3869,7 +3869,10 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions(
void cmVisualStudio10TargetGenerator::WriteCudaLinkOptions(
Elem& e1, std::string const& configName)
{
- if (this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) {
+ // We need to write link options for OBJECT libraries so that
+ // we override the default device link behavior ( enabled ) when
+ // building object libraries with ptx/optix-ir/etc
+ if (this->GeneratorTarget->GetType() > cmStateEnums::OBJECT_LIBRARY) {
return;
}
diff --git a/Tests/CudaOnly/Fatbin/CMakeLists.txt b/Tests/CudaOnly/Fatbin/CMakeLists.txt
index db0dc22..9974404 100644
--- a/Tests/CudaOnly/Fatbin/CMakeLists.txt
+++ b/Tests/CudaOnly/Fatbin/CMakeLists.txt
@@ -10,6 +10,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/../CUBIN/kernelB.cu
${CMAKE_CURRENT_SOURCE_DIR}/../CUBIN/kernelC.cu)
set_property(TARGET CudaFATBIN PROPERTY CUDA_FATBIN_COMPILATION ON)
+set_property(TARGET CudaFATBIN PROPERTY CUDA_SEPARABLE_COMPILATION ON)
# Will use `cuModuleLoadFatBinary` to load the fatbinaries
add_executable(CudaOnlyFatbin main.cu)
diff --git a/Tests/CudaOnly/OptixIR/CMakeLists.txt b/Tests/CudaOnly/OptixIR/CMakeLists.txt
index afeabda..f408d40 100644
--- a/Tests/CudaOnly/OptixIR/CMakeLists.txt
+++ b/Tests/CudaOnly/OptixIR/CMakeLists.txt
@@ -13,6 +13,7 @@ if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "11.7.0")
set_property(TARGET CudaOptix PROPERTY CUDA_OPTIX_COMPILATION ON)
endif()
+set_property(TARGET CudaOptix PROPERTY CUDA_SEPARABLE_COMPILATION ON)
set_property(TARGET CudaOptix PROPERTY CUDA_ARCHITECTURES native)
add_executable(CudaOnlyOptixIR main.cu)
diff --git a/Tests/RunCMake/Autogen/MyWindow.cpp b/Tests/RunCMake/Autogen/MyWindow.cpp
new file mode 100644
index 0000000..d87c2e9
--- /dev/null
+++ b/Tests/RunCMake/Autogen/MyWindow.cpp
@@ -0,0 +1,7 @@
+#include "MyWindow.h"
+
+MyWindow::MyWindow(QWidget* parent)
+ : QWidget(parent)
+{
+ this->m_ui.setupUi(this);
+}
diff --git a/Tests/RunCMake/Autogen/MyWindow.h b/Tests/RunCMake/Autogen/MyWindow.h
new file mode 100644
index 0000000..c267610
--- /dev/null
+++ b/Tests/RunCMake/Autogen/MyWindow.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <QWidget>
+
+#include "ui_MyWindow.h"
+
+class MyWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit MyWindow(QWidget* parent = nullptr);
+
+private:
+ Ui::MyWindow m_ui;
+};
diff --git a/Tests/RunCMake/Autogen/MyWindow.ui b/Tests/RunCMake/Autogen/MyWindow.ui
new file mode 100644
index 0000000..fbf294c
--- /dev/null
+++ b/Tests/RunCMake/Autogen/MyWindow.ui
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MyWindow</class>
+ <widget class="QWidget" name="MyWindow"/>
+</ui>
diff --git a/Tests/RunCMake/Ninja/QtAutoMocDeps-stderr.txt b/Tests/RunCMake/Autogen/QtAutoMocDeps-stderr.txt
index 6024984..6024984 100644
--- a/Tests/RunCMake/Ninja/QtAutoMocDeps-stderr.txt
+++ b/Tests/RunCMake/Autogen/QtAutoMocDeps-stderr.txt
diff --git a/Tests/RunCMake/Ninja/QtAutoMocDeps.cmake b/Tests/RunCMake/Autogen/QtAutoMocDeps.cmake
index c441169..fc3b2f2 100644
--- a/Tests/RunCMake/Ninja/QtAutoMocDeps.cmake
+++ b/Tests/RunCMake/Autogen/QtAutoMocDeps.cmake
@@ -1,27 +1,23 @@
enable_language(CXX)
-set(QtX Qt${with_qt_version})
-
-find_package(${QtX} REQUIRED COMPONENTS Core)
+find_package(Qt${with_qt_version} REQUIRED COMPONENTS Core Widgets Gui)
set(CMAKE_AUTOMOC ON)
add_library(simple_lib SHARED simple_lib.cpp)
add_executable(app_with_qt app.cpp app_qt.cpp)
-target_link_libraries(app_with_qt PRIVATE simple_lib ${QtX}::Core)
+target_link_libraries(app_with_qt PRIVATE simple_lib Qt${with_qt_version}::Core)
-if(${QtX}Widgets_DIR)
- find_package(${QtX} REQUIRED COMPONENTS Widgets)
+if(${with_qt_version}Widgets_DIR)
if(with_qt_version STREQUAL 5)
qt5_wrap_ui(_headers MyWindow.ui)
else()
qt_wrap_ui(_headers MyWindow.ui)
endif()
add_executable(app_with_widget app.cpp MyWindow.cpp ${_headers})
- target_link_libraries(app_with_widget PRIVATE ${QtX}::Widgets)
+ target_link_libraries(app_with_widget PRIVATE Qt${with_qt_version}::Widgets)
target_include_directories(app_with_widget PRIVATE "${CMAKE_BINARY_DIR}")
endif()
-
add_subdirectory(QtSubDir1)
add_subdirectory(QtSubDir2)
add_subdirectory(QtSubDir3)
diff --git a/Tests/RunCMake/Ninja/QtSubDir1/CMakeLists.txt b/Tests/RunCMake/Autogen/QtSubDir1/CMakeLists.txt
index 3a12dcd..f215b9e 100644
--- a/Tests/RunCMake/Ninja/QtSubDir1/CMakeLists.txt
+++ b/Tests/RunCMake/Autogen/QtSubDir1/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_policy(SET CMP0116 OLD)
add_executable(sub_exe_1 ../app.cpp)
-target_link_libraries(sub_exe_1 PRIVATE ${QtX}::Core)
+target_link_libraries(sub_exe_1 PRIVATE Qt${with_qt_version}::Core)
diff --git a/Tests/RunCMake/Ninja/QtSubDir2/CMakeLists.txt b/Tests/RunCMake/Autogen/QtSubDir2/CMakeLists.txt
index a2f77e4..cccb1e0 100644
--- a/Tests/RunCMake/Ninja/QtSubDir2/CMakeLists.txt
+++ b/Tests/RunCMake/Autogen/QtSubDir2/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_policy(SET CMP0116 NEW)
add_executable(sub_exe_2 ../app.cpp)
-target_link_libraries(sub_exe_2 PRIVATE ${QtX}::Core)
+target_link_libraries(sub_exe_2 PRIVATE Qt${with_qt_version}::Core)
diff --git a/Tests/RunCMake/Autogen/QtSubDir3/CMakeLists.txt b/Tests/RunCMake/Autogen/QtSubDir3/CMakeLists.txt
new file mode 100644
index 0000000..d268bfe
--- /dev/null
+++ b/Tests/RunCMake/Autogen/QtSubDir3/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(sub_exe_3 ../app.cpp)
+target_link_libraries(sub_exe_3 PRIVATE Qt${with_qt_version}::Core)
diff --git a/Tests/RunCMake/Autogen/RunCMakeTest.cmake b/Tests/RunCMake/Autogen/RunCMakeTest.cmake
index 4fe9406..886065a 100644
--- a/Tests/RunCMake/Autogen/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Autogen/RunCMakeTest.cmake
@@ -122,4 +122,55 @@ if (DEFINED with_qt_version)
endblock()
endif()
endif()
+
+ if(RunCMake_GENERATOR MATCHES "Make|Ninja")
+ block()
+ if(QtCore_VERSION VERSION_GREATER_EQUAL 5.15.0)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/QtAutoMocDeps-build)
+ run_cmake(QtAutoMocDeps)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ # Build the project.
+ run_cmake_command(QtAutoMocDeps-build ${CMAKE_COMMAND} --build . --verbose)
+ # Touch just the library source file, which shouldn't cause a rerun of AUTOMOC
+ # for app_with_qt target.
+ file(TOUCH "${RunCMake_SOURCE_DIR}/simple_lib.cpp")
+ set(RunCMake_TEST_NOT_EXPECT_stdout "Automatic MOC for target app_with_qt|\
+Automatic MOC for target sub_exe_1|\
+Automatic MOC for target sub_exe_2")
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-Don't execute AUTOMOC for 'app_with_qt', 'sub_exe_1' and 'sub_exe_2'")
+ # Build and assert that AUTOMOC was not run for app_with_qt, sub_exe_1 and sub_exe_2.
+ run_cmake_command(QtAutoMocDeps-build ${CMAKE_COMMAND} --build . --verbose)
+ unset(RunCMake_TEST_VARIANT_DESCRIPTION)
+ unset(RunCMake_TEST_NOT_EXPECT_stdout)
+
+ macro(check_file_exists file)
+ if (EXISTS "${file}")
+ set(check_result "PASSED")
+ set(message_type "STATUS")
+ else()
+ set(check_result "FAILED")
+ set(message_type "FATAL_ERROR")
+ endif()
+
+ message(${message_type} "QtAutoMocDeps-build-\"${file}\" was generated - ${check_result}")
+ endmacro()
+
+ check_file_exists("${RunCMake_TEST_BINARY_DIR}/app_with_qt_autogen/deps")
+ check_file_exists("${RunCMake_TEST_BINARY_DIR}/QtSubDir1/sub_exe_1_autogen/deps")
+ check_file_exists("${RunCMake_TEST_BINARY_DIR}/QtSubDir2/sub_exe_2_autogen/deps")
+
+ check_file_exists("${RunCMake_TEST_BINARY_DIR}/app_with_qt_autogen/timestamp")
+ check_file_exists("${RunCMake_TEST_BINARY_DIR}/QtSubDir1/sub_exe_1_autogen/timestamp")
+ check_file_exists("${RunCMake_TEST_BINARY_DIR}/QtSubDir2/sub_exe_2_autogen/timestamp")
+
+ # Touch a header file to make sure an automoc dependency cycle is not introduced.
+ file(TOUCH "${RunCMake_SOURCE_DIR}/MyWindow.h")
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-First build after touch to detect dependency cycle")
+ run_cmake_command(QtAutoMocDeps-build ${CMAKE_COMMAND} --build . --verbose)
+ # Need to run a second time to hit the dependency cycle.
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-Don't hit dependency cycle")
+ run_cmake_command(QtAutoMocDeps-build ${CMAKE_COMMAND} --build . --verbose)
+ endif()
+ endblock()
+ endif()
endif ()
diff --git a/Tests/RunCMake/Autogen/app.cpp b/Tests/RunCMake/Autogen/app.cpp
new file mode 100644
index 0000000..57380e4
--- /dev/null
+++ b/Tests/RunCMake/Autogen/app.cpp
@@ -0,0 +1,6 @@
+int main(int argc, char* argv[])
+{
+ (void)argc;
+ (void)argv;
+ return 0;
+}
diff --git a/Tests/RunCMake/Autogen/app_qt.cpp b/Tests/RunCMake/Autogen/app_qt.cpp
new file mode 100644
index 0000000..302c672
--- /dev/null
+++ b/Tests/RunCMake/Autogen/app_qt.cpp
@@ -0,0 +1,11 @@
+#include <QObject>
+
+class Mango : public QObject
+{
+ Q_OBJECT
+public:
+Q_SIGNALS:
+ void eatFruit();
+};
+
+#include "app_qt.moc"
diff --git a/Tests/RunCMake/Autogen/simple_lib.cpp b/Tests/RunCMake/Autogen/simple_lib.cpp
new file mode 100644
index 0000000..cf8d689
--- /dev/null
+++ b/Tests/RunCMake/Autogen/simple_lib.cpp
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void dummy_symbol()
+{
+}
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index bf93042..9b9a53e 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -274,6 +274,7 @@ if(CMake_TEST_Qt6 AND Qt6Widgets_FOUND)
cmake_path(GET base_dir PARENT_PATH base_dir) # <base>
add_RunCMake_test(AutogenQt6 TEST_DIR Autogen
-Dwith_qt_version=6
+ -DQtCore_VERSION=${Qt6Core_VERSION}
"-DQt6_DIR:PATH=${Qt6_DIR}"
"-DCMAKE_PREFIX_PATH:STRING=${base_dir}"
-DPSEUDO_TIDY=$<TARGET_FILE:pseudo_tidy>
@@ -286,6 +287,7 @@ endif ()
if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
add_RunCMake_test(AutogenQt5 TEST_DIR Autogen
-Dwith_qt_version=5
+ -DQtCore_VERSION=${Qt5Core_VERSION}
"-DQt5_DIR:PATH=${Qt5_DIR}"
)
set(want_NoQt_test FALSE)
diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
index c4a8b3f..88027fb 100644
--- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
@@ -153,6 +153,13 @@ run_cmake_presets(ConditionFuture)
run_cmake_presets(SubConditionNull)
run_cmake_presets(TraceNotSupported)
+set(CMakePresets_NO_PRESET 1)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
+run_cmake_presets(SchemaSupported --list-presets)
+set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+run_cmake_presets(SchemaNotSupported --list-presets)
+unset(CMakePresets_NO_PRESET)
+
# Test cmakeMinimumRequired field
run_cmake_presets(MinimumRequiredInvalid)
set(CMakePresets_SCHEMA_EXPECTED_RESULT 0)
diff --git a/Tests/RunCMake/CMakePresets/SchemaNotSupported-result.txt b/Tests/RunCMake/CMakePresets/SchemaNotSupported-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/SchemaNotSupported-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMakePresets/SchemaNotSupported-stderr.txt b/Tests/RunCMake/CMakePresets/SchemaNotSupported-stderr.txt
new file mode 100644
index 0000000..2df4b3d
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/SchemaNotSupported-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/SchemaNotSupported:
+File version must be 8 or higher for [$]schema support$
diff --git a/Tests/RunCMake/CMakePresets/SchemaNotSupported.json.in b/Tests/RunCMake/CMakePresets/SchemaNotSupported.json.in
new file mode 100644
index 0000000..736f307
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/SchemaNotSupported.json.in
@@ -0,0 +1,4 @@
+{
+ "version": 7,
+ "$schema": "https://example.com/schema.json"
+}
diff --git a/Tests/RunCMake/CMakePresets/SchemaSupported-result.txt b/Tests/RunCMake/CMakePresets/SchemaSupported-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/SchemaSupported-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMakePresets/SchemaSupported.json.in b/Tests/RunCMake/CMakePresets/SchemaSupported.json.in
new file mode 100644
index 0000000..5426131
--- /dev/null
+++ b/Tests/RunCMake/CMakePresets/SchemaSupported.json.in
@@ -0,0 +1,4 @@
+{
+ "version": 8,
+ "$schema": "https://example.com/schema.json"
+}
diff --git a/Tests/RunCMake/Ninja/QtSubDir3/CMakeLists.txt b/Tests/RunCMake/Ninja/QtSubDir3/CMakeLists.txt
deleted file mode 100644
index 70644fa..0000000
--- a/Tests/RunCMake/Ninja/QtSubDir3/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-add_executable(sub_exe_3 ../app.cpp)
-target_link_libraries(sub_exe_3 PRIVATE ${QtX}::Core)
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 6eb0b1d..6cc6234 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -380,45 +380,6 @@ function (run_ChangeBuildType)
endfunction()
run_ChangeBuildType()
-function(run_QtAutoMocDeps)
- set(QtX Qt${CMake_TEST_Qt_version})
- if(CMake_TEST_${QtX}Core_Version VERSION_GREATER_EQUAL 5.15.0)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/QtAutoMocDeps-build)
- run_cmake_with_options(QtAutoMocDeps
- "-Dwith_qt_version=${CMake_TEST_Qt_version}"
- "-D${QtX}_DIR=${${QtX}_DIR}"
- "-D${QtX}Core_DIR=${${QtX}Core_DIR}"
- "-D${QtX}Widgets_DIR=${${QtX}Widgets_DIR}"
- "-DCMAKE_PREFIX_PATH:STRING=${CMAKE_PREFIX_PATH}"
- )
- # Build the project.
- run_ninja("${RunCMake_TEST_BINARY_DIR}")
- # Touch just the library source file, which shouldn't cause a rerun of AUTOMOC
- # for app_with_qt target.
- file(TOUCH "${RunCMake_SOURCE_DIR}/simple_lib.cpp")
- # Build and assert that AUTOMOC was not run for app_with_qt.
- run_ninja("${RunCMake_TEST_BINARY_DIR}")
- if(ninja_stdout MATCHES "Automatic MOC for target app_with_qt")
- message(FATAL_ERROR
- "AUTOMOC should not have executed for 'app_with_qt' target:\nstdout:\n${ninja_stdout}")
- endif()
- # Assert that the subdir executables were not rebuilt.
- if(ninja_stdout MATCHES "Automatic MOC for target sub_exe_1")
- message(FATAL_ERROR
- "AUTOMOC should not have executed for 'sub_exe_1' target:\nstdout:\n${ninja_stdout}")
- endif()
- if(ninja_stdout MATCHES "Automatic MOC for target sub_exe_2")
- message(FATAL_ERROR
- "AUTOMOC should not have executed for 'sub_exe_2' target:\nstdout:\n${ninja_stdout}")
- endif()
- # Touch a header file to make sure an automoc dependency cycle is not introduced.
- file(TOUCH "${RunCMake_SOURCE_DIR}/MyWindow.h")
- run_ninja("${RunCMake_TEST_BINARY_DIR}")
- # Need to run a second time to hit the dependency cycle.
- run_ninja("${RunCMake_TEST_BINARY_DIR}")
- endif()
-endfunction()
-
function(run_QtAutoMocSkipPch)
set(QtX Qt${CMake_TEST_Qt_version})
if(CMake_TEST_${QtX}Core_Version VERSION_GREATER_EQUAL 5.15.0)
@@ -433,7 +394,7 @@ function(run_QtAutoMocSkipPch)
run_ninja("${RunCMake_TEST_BINARY_DIR}")
endif()
endfunction()
+
if(CMake_TEST_Qt_version)
- run_QtAutoMocDeps()
run_QtAutoMocSkipPch()
endif()
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index bc4a330..baeb9ca 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -53,6 +53,11 @@ function(run_cmake test)
unset(expect_${o})
endif()
endforeach()
+ foreach(o IN ITEMS stdout stderr config)
+ if(DEFINED RunCMake_TEST_NOT_EXPECT_${o})
+ string(REGEX REPLACE "\n+$" "" not_expect_${o} "${RunCMake_TEST_NOT_EXPECT_${o}}")
+ endif()
+ endforeach()
if (NOT expect_stderr)
if (NOT RunCMake_DEFAULT_stderr)
set(RunCMake_DEFAULT_stderr "^$")
@@ -145,7 +150,19 @@ function(run_cmake test)
${maybe_timeout}
${maybe_input_file}
)]])
+ if(DEFINED ENV{PWD})
+ set(old_pwd "$ENV{PWD}")
+ else()
+ set(old_pwd)
+ endif()
+ # Emulate a shell using this directory.
+ set(ENV{PWD} "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}")
cmake_language(EVAL CODE "${_code}")
+ if(DEFINED old_pwd)
+ set(ENV{PWD} "${old_pwd}")
+ else()
+ set(ENV{PWD})
+ endif()
set(msg "")
if(NOT "${actual_result}" MATCHES "${expect_result}")
string(APPEND msg "Result is [${actual_result}], not [${expect_result}].\n")
@@ -216,6 +233,11 @@ function(run_cmake test)
string(APPEND msg "${o} does not match that expected.\n")
endif()
endif()
+ if(DEFINED not_expect_${o})
+ if("${actual_${o}}" MATCHES "${not_expect_${o}}")
+ string(APPEND msg "${o} matches that not expected.\n")
+ endif()
+ endif()
endforeach()
unset(RunCMake_TEST_FAILED)
if(RunCMake-check-file AND EXISTS ${top_src}/${RunCMake-check-file})
diff --git a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
index 58a111a..12f004b 100644
--- a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
+++ b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake
@@ -29,8 +29,6 @@ function (run_symlink_test case src bin src_from_bin bin_from_src)
# Test running in binary directory.
set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
- # Emulate a shell using this directory.
- set(ENV{PWD} "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}")
# Pass absolute path to the source tree, plain.
set(RunCMake_TEST_VARIANT_DESCRIPTION " $abs/${name}/${src}")
@@ -50,8 +48,6 @@ function (run_symlink_test case src bin src_from_bin bin_from_src)
# Test running in source directory.
set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${RunCMake_TEST_SOURCE_DIR}")
- # Emulate a shell using this directory.
- set(ENV{PWD} "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}")
# Pass absolute path to the binary tree with -B.
set(RunCMake_TEST_VARIANT_DESCRIPTION " -B $abs/${name}/${bin}")
@@ -63,8 +59,6 @@ function (run_symlink_test case src bin src_from_bin bin_from_src)
# Test running in another directory.
set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${RunCMake_BINARY_DIR}/${name}")
- # Emulate a shell using this directory.
- set(ENV{PWD} "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}")
# Pass absolute paths to the source and binary trees.
set(RunCMake_TEST_VARIANT_DESCRIPTION " -S $abs/${name}/${src} -B $abs/${name}/${bin}")