Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cmake's target_sources(), and general cmake file cleanup. #291

Merged
merged 12 commits into from
Dec 5, 2022
39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
## Fips Changelog

- **05-Dec-2022**: Another code cleanup, mainly focusing on the cmake script files.
Since the last cleanup bumped the minimal cmake version to 3.21 it was possible
to make use of other 'modern cmake' features which had been added in the meantime.
Most importantly, that's the ability to create 'empty' build targets, and then add
sources files afterwards. Fips now creates build targets in the ```fips_begin_*()```
macros instead of ```fips_end_*()```. This allows to simplify the implementation:
target properties and sources no longer need to be stored until ```fips_end```,
but instead can be added directly to the target now. Also, it's now finally possible
to place cmake ```target_*``` commands inside the ```fips_begin/end``` block, instead
of after the ```fips_end_*()``` (which worked, but just didn't look right).

The following other changes have been applied:

- The default warning level for MSVC builds has been bumped to /W3. Use
```target_compile_options``` inside an ```if (FIPS_MSVC)``` block to tweak
warnings if necessary.
- A new compiler identification warning: ```FIPS_APPLE_CLANG```, this is set
in addiiton to ```FIPS_CLANG``` to identify Apple's Clang fork. Checking
specifically for Apple's Clang is mainly useful for warning hygiene.

A number of fips macros have been deprecated in favour of 'modern cmake' functions
or other existing fips macros:
These macros behave as before, but print a deprecated warning:
- ```fips_project``` is deprecated, use ```project``` instead
- ```fips_finish``` is deprecated, should be removed
- ```fips_begin_module``` and ```fips_end_module``` are deprecated,
use ```fips_begin_lib``` and ```fips_end_lib``` instead
- ```fips_include_dirs``` is deprecated, instead if possible use ```target_include_directories```,
or (less ideal) the older ```include_directories``` function
- ```fips_add_subdirectory``` is deprecated, use ```add_subdirectory``` instead
- ```fips_vs_warning_level``` and ```fips_vs_disable_warning``` is deprecated,
use ```target_compile_options``` instead

PR: https://github.com/floooh/fips/pull/291

- **01-Dec-2022**: A general code cleanup, modernization and simplification session:
- fips now uses the cmake-presets in cmake 3.21 and later for communicating
build config arguments to cmake. Running './fips gen' will write
Expand All @@ -9,7 +44,7 @@
new approach is that it better integrates with IDEs which support
build configuration from cmake presets (such as VSCode with the CMake Tools
extension).
- ...this means the minimal required cmake version is now 3.21, which in
- ...this means the minimal required make version is now 3.21, which in
turn will enable a couple for simplifications in the future
- VSCode support has been totally rewritten. This now expects the
[CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
Expand Down Expand Up @@ -47,6 +82,8 @@
- General cleanup (mainly remove unused variables and imports) with the help
of Pylance, and cleanup white space.

PR: https://github.com/floooh/fips/pull/290

- **16-May-2022**: fips will now always call ```cmake --build``` instead of
invoking the build tools ```make```, ```ninja``` or ```xcodebuild``` directly.
This should "just work" and not require any changes on your project.
Expand Down
Loading