Skip to content

Added generator expression to /utf-8 compile option - #3995

Merged
vitaut merged 1 commit into
fmtlib:masterfrom
ChristianGebhardt:utf-8-generator-expression
Jun 9, 2024
Merged

vitaut merged 1 commit into
fmtlib:masterfrom
ChristianGebhardt:utf-8-generator-expression

Conversation

@ChristianGebhardt

Copy link
Copy Markdown
Contributor

Do not pass the compile options in the project to other compilers such as nvcc

When using the library within a project with multiple compilers, the compiler option should only be passed to the msvc compiler.

Do not pass the compile options in the project to other compilers such as nvcc
@vitaut

vitaut commented Jun 7, 2024

Copy link
Copy Markdown
Contributor

Thanks for the PR. I wonder how this solves the problem for nvcc? Wouldn't COMPILE_LANGUAGE:CXX options apply to it as well?

@ChristianGebhardt

Copy link
Copy Markdown
Contributor Author

Thanks for looking into it! For CUDA code, you would specify $<COMPILE_LANGUAGE:CUDA>. So, it indeed differentiates between them and ignores the compile option for CUDA (or also other languages like C# or C within the project).

Please, also checkout the supported languages for reference: https://cmake.org/cmake/help/latest/command/enable_language.html

@vitaut
vitaut merged commit 077e4ae into fmtlib:master Jun 9, 2024
@vitaut

vitaut commented Jun 9, 2024

Copy link
Copy Markdown
Contributor

Merged, thanks!

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