'GPRBUILD and multiple file suffix (.cc, .cpp)

The GNAT Project files (.gpr) allow to specify the suffix of source code for compilation. For example:

package Naming is
    for Spec_Suffix ("c++") use ".h";
    for Body_Suffix ("c++") use ".cc";
 end Naming;

However in some cases, like C++ you may need to support multiple suffixes when code comes from several sources (typically .cc and .cpp).

Any idea how to do this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source