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

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

Merged
merged 2 commits into from
Sep 8, 2023
Merged

Conversation

ThirdEyeSqueegee
Copy link
Member

No description provided.

@ThirdEyeSqueegee ThirdEyeSqueegee merged commit 642c52b into Starfield-Reverse-Engineering:main Sep 8, 2023
3 checks passed
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant