Commit Graph

11 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Marc Chevrier
0619c064ff Linker configuration: enhance usability
The linker configuration file is now optional: It is loaded only if
variable CMAKE_<LANG>_USE_LINKER_CONFIGURATION is set to TRUE.

The file CMakeAddNewLanguage.txt is updated to take into account the
linker configuration.

Fixes: #26393
2024-10-24 16:37:30 +02:00
Brad King
ae1d5ef47f Modules: Initialize per-language platform-specific flag variables consistently
The `Platform/<OS>.cmake` modules record platform-specific flag
variables for the C toolchain.  The `CMake<LANG>Information` modules
initialize the per-language platform-specific flag variables to defaults
copied from C.  However, they have diverged over time, and not all
platform-specific flag variables are initialized correctly for all
languages.  Factor out the CXX language's instance of this logic into a
helper macro, and reuse it for all languages for which we previously
had the platform-specific flag variables at least partially filled out.

Previously the Fortran language's copy of this logic used
`if(NOT DEFINED <var>)` instead of just `if(NOT <var>)` to allow
`Platform/<OS>-<COMPILER_ID>-<LANG>` modules to specify empty values for
some platform-specific flag variables without being overridden.
Use this approach in the helper macro so it applies to all languages.

Fixes: #25990
2024-05-16 11:46:58 -04:00
Michael Hirsch
ec2ad53d18
Modules: refactor compiler find to use modern foreach 2023-11-18 19:08:00 -05:00
Marc Chevrier
14e57e9637 LINK_WHAT_YOU_USE feature: externalize configuration
Currently, this feature is only supported on ELF platforms. So, the property
LINK_WHAT_YOU_USE will be ignored for other plateforms.
Moreover, flags and commands are now controled by CMake variables.

Fixes: #20174
2021-07-09 14:50:50 +02:00
Bobby D Reynolds
ae108418ae Launchers: Support setting linker launchers
Fixes: #18316
2021-05-28 12:28:43 -04:00
Cristian Adam
8a2977ba55 OBJCXX: Fix regression for compiling cpp files as objcxx
In commit 8d61294c3e (PCH: Mark CMake PCH source files as -x
<lang>-header, 2020-09-04, v3.18.3~14^2) we removed the explicit `-x
objective-c++` flag.  This broke cases with custom source extensions.

Restore the explicit `-x objective-c[++]` flag and put it before the
`<FLAGS>` placeholder.  The latter will contain the proper `-x
objective-c[++]-header` value and will override the `-x objective-c[++]`
value set before.

Fixes: #21234
2020-09-29 12:35:49 -04:00
Daan De Meyer
d8622fbd0f Modules: Collapse consecutive whitespace in strings 2020-03-23 21:34:17 +01:00
Cristian Adam
1a9f6bad98 ObjC: Add _COMPILE_LAUNCHER support
Fixes: #20178
2020-01-09 13:52:37 -05:00
Cristian Adam
9a7b4f47aa ObjC: Mark explicitly the language for compilation
This way you can have .cpp files compiled as ObjC++.

Fixes: #19926
2019-11-06 16:21:45 +01:00
Steve Wilson
80f120a85f Languages: Add support for Objective-C
Add entries in Modules and Modules/Platform to support
Objective-C compiler determination and identification.
Add Modules to check Objective-C compiler flags, source
compilations, program checks, etc...

Use OBJC as the designator of the language, eg:

project(foo OBJC)

Add various tests for Objective-C language features.  Add
tests to preserve C++ handling of .m and .mm files when
OBJC is not a configured language.

Co-Authored-By: Cristian Adam <cristian.adam@gmail.com>
2019-09-28 15:56:46 +02:00