Skip to content

Conversation

niceEli
Copy link

@niceEli niceEli commented Jul 20, 2025

Allow a CMake option to allow choosing whether or not to build the .natvis file, there is no issue for this but it caused some issues with me so I fixed it.

The CMake option JSON_BuildNatvis being ON or OFF controls its build, it will still not build if MSVC is not ON.

This wont break anyones projects, but if people want to optionally not build the natvis file then they can.

  • The changes are described in detail, both the what and why.
  • If applicable, an existing issue is referenced.
  • The Code coverage remained at 100%. A test case for every new line of code.
  • If applicable, the documentation is updated.
  • The source code is amalgamated by running make amalgamate.

Read the Contribution Guidelines for detailed information.

Signed-off-by: Eli <tape-infix.3m@icloud.com>
@coveralls
Copy link

coveralls commented Jul 21, 2025

Coverage Status

coverage: 99.191%. remained the same
when pulling 29dc94c on niceEli:feat-anti-natvis
into 22db828 on nlohmann:develop.

CMakeLists.txt Outdated
@@ -208,7 +209,7 @@ if(JSON_Install)
FILES ${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE} ${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE}
DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR}
)
if (NLOHMANN_ADD_NATVIS)
if (NLOHMANN_ADD_NATVIS AND JSON_BuildNatvis)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part needed? NLOHMANN_ADD_NATVIS will already not be defined if JSON_BuildNatvis is false.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea your right its kinda redundant

Signed-off-by: Eli <78963198+niceEli@users.noreply.github.com>
Copy link

This pull request has been marked as stale because it has had no activity for 30 days. While we won’t close it automatically, we encourage you to update or comment if it is still relevant. Keeping pull requests active and up-to-date helps us review and merge changes more efficiently. Thank you for your contributions!

@github-actions github-actions bot added the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Aug 24, 2025
@niceEli niceEli requested a review from gregmarr August 25, 2025 01:23
@github-actions github-actions bot removed the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants