llnl / llnl/blt

Allow specifying the language for flags in blt_add_target_compile_flags macro?

Open
#178 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
296
Forks
66
Avg merge
1h 3m
Merged PRs (30d)
1

Description

PR #177 allows the ``blt_add_target_compile_flags`` macro to work with ``INTERFACE`` targets.

An additional feature that we might wish to add is to specify the languages of dependent targets to which an ``INTERFACE`` (or ``PUBLIC``) compiler flag should apply.

For example, the ``sparsehash`` library on ``gcc@8.1`` needs to silence a new warning message about memory access (i.e. ``-Wno-class-memaccess``). However, we only want to add this to ``C++`` dependencies since ``gfortran`` complains about this flag (``f951: Warning: command line option '-Wno-class-memaccess' is valid for C++/ObjC++ but not for Fortran``).

Note: This problem seems similar in nature to issue #175, where we'd like to have different openmp flags depending on the language.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing PR #177 and issue #175, then inspect the implementation of the blt_add_target_compile_flags macro. Determine how language-specific flags should be expressed for INTERFACE and PUBLIC dependencies; done means C++-only flags avoid Fortran warnings while existing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, fortran
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.