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

Add build variable: FMT_MASTER_PROJECT #2099

Closed
wants to merge 1 commit into from
Closed

Add build variable: FMT_MASTER_PROJECT #2099

wants to merge 1 commit into from

Conversation

randomizedthinking
Copy link
Contributor

The build variable FMT_MASTER_PROJECT is added so user can build and install fmt library even if the project is included as a submodule. See discussion: #2098 (comment).

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

CMakeLists.txt Outdated
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(MASTER_PROJECT ON)
message(STATUS "CMake version: ${CMAKE_VERSION}")
if(NOT DEFINED FMT_MASTER_PROJECT)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: please add a space after if for consistency

CMakeLists.txt Outdated
Comment on lines 14 to 15
else ()
set(FMT_MASTER_PROJECT OFF)
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest setting FMT_MASTER_PROJECT to OFF outside of if as before and removing the else branch.

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.

2 participants