Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

chore: cleanup CMakePresets.json, add Ninja configs#19

Merged
ThirdEyeSqueegee merged 2 commits intoStarfield-Reverse-Engineering:mainfrom
ThirdEyeSqueegee:main
Sep 8, 2023
Merged

chore: cleanup CMakePresets.json, add Ninja configs#19
ThirdEyeSqueegee merged 2 commits intoStarfield-Reverse-Engineering:mainfrom
ThirdEyeSqueegee:main

Conversation

@ThirdEyeSqueegee
Copy link
Copy Markdown
Contributor

No description provided.

@ThirdEyeSqueegee ThirdEyeSqueegee merged commit 642c52b into Starfield-Reverse-Engineering:main Sep 8, 2023
gottyduke added a commit to gottyduke/CMakeLibSF that referenced this pull request Sep 9, 2023
gottyduke added a commit to gottyduke/CMakeLibSF that referenced this pull request Sep 9, 2023
gottyduke added a commit that referenced this pull request Sep 9, 2023
1. Removed `/FI` force include directive flag to accommodate recent
[vcpkg port
update](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg/).
This addresses the redefinition error when compiling project with a
clean commonblisf vcpkg package.
2. Reverted some notable changes in #19 , see below.

---

Changes reverted:
In
[CommonLibSF/CMakePresets.json](https://github.com/Starfield-Reverse-Engineering/CommonLibSF/compare/main...gottyduke:CommonLibSF:main?expand=1#diff-6d621fcc34a299795af75ba4026fa929d2b8b506efda705e332cf7dd06e6904f):

```json
{
  "name": "buildtype-debug-msvc",
  "hidden": true,
  "cacheVariables": {
    "CMAKE_BUILD_TYPE": "Debug",
    "CMAKE_CXX_FLAGS_DEBUG": "/Od /MDd",
    "CMAKE_SHARED_LINKER_FLAGS_DEBUG": "/DEBUG:FULL /LTCG:INCREMENTAL /DEBUGTYPE:FIXUP"
  }
}
```
Specifying `/LTCG:INCREMENTAL` for a debug build with `/Od` doesn't make
sense here, `/LTCG` would imply `/GL` and `/Od` disables all
optimizations. The other reason is that `/LTCG` flag is **explicitly**
turned off for debug build with
```cmake
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF)
```
Then the `/MDd` flag is also redundant, this has been specified with
```cmake
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
```
Othe occurrences of `/LTCG` and `/MDd`/`/MTd` has been removed for the
same reason.
`/MACHINE:x64` has been removed for linker flag, this is unnecessary.

configurePresets and buildPresets have added the
`<config>-clang-cl-msvc` variants, for generating a **visual studio**
solution with ClangCL toolset.

---

Fixes added for #19 : 
Updated the batch files to reflect the above CMakePresets.json changes.

---

closes #22

---------

Co-authored-by: maintenance <gottyduke@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant