public function check_cxx_flags_supported(self, compile_flags, link_flags)
Check if the given C++ compile and/or link flags are accepted by the C++ compiler
Type Bound
compiler_t
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(compiler_t),
|
intent(in) |
|
|
:: |
self |
|
character(len=*),
|
intent(in), |
optional |
|
:: |
compile_flags |
|
character(len=*),
|
intent(in), |
optional |
|
:: |
link_flags |
|
Return Value
logical
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
character(len=*),
|
public, |
parameter
|
:: |
hello_world_cxx |
= |
"#include <cstdio>"//new_line('a')//"int main() { printf(""Hello, World!""); return 0; }" |
|
Source Code
logical function check_cxx_flags_supported(self, compile_flags, link_flags)
class(compiler_t), intent(in) :: self
character(len=*), optional, intent(in) :: compile_flags, link_flags
! Minimal C++ program that always compiles
character(len=*), parameter :: hello_world_cxx = &
"#include <cstdio>" // new_line('a') // &
"int main() { printf(""Hello, World!""); return 0; }"
check_cxx_flags_supported = self%check_cxx_source_runs(hello_world_cxx, compile_flags, link_flags)
end function check_cxx_flags_supported