OSGeo/gdal
cmake/modules/CheckLinkerFlag.cmake
:80
#check_source_compiles(${_lang} "${_source}" ${_var} ${_common_patterns})
#check_source_compiles(${_lang} "${_source}" ${_var} ${_common_patterns})
check_source_compiles ( C
"#include <complex.h>
int main (void)
{
double _Complex z1 = 1.0 ;
double _Complex z2 = 1.0 * I ;
double _Complex z3 = z1 * z2 ;
return ((int) creal (z3)) ;
}"
GxB_HAVE_COMPLEX_C99 )
check_source_compiles ( C
"#include <complex.h>
int main (void)
{
_Dcomplex z1 = {1., 0.} ;
_Dcomplex z2 = {0., 1.} ;
_Dcomplex z3 = _Cmulcc(z1, z2) ;
return 0 ;
}"
GxB_HAVE_COMPLEX_MSVC )
check_source_compiles ( C
"int main(void) {
#pragma GCC ivdep
for (int j = 0; j < 1; j++) { }
return 0;
}"
HAVE_PRAGMA_GCC_IVDEP
FAIL_REGEX "[wW]arning" )
check_source_compiles ( C
"int main(void) {
#pragma clang loop vectorize(enable)
for (int j = 0; j < 1; j++) { }
return 0;
}"
HAVE_PRAGMA_CLANG_LOOP_VECTORIZE
FAIL_REGEX "[wW]arning" )
check_source_compiles ( C
"int main(void) {
#pragma ivdep
for (int j = 0; j < 1; j++) { }
return 0;
}"
HAVE_PRAGMA_IVDEP
FAIL_REGEX "[wW]arning" )
check_source_compiles ( C
"int main(void) {
#pragma loop( ivdep )
for (int j = 0; j < 1; j++) { }
return 0;
}"
HAVE_PRAGMA_LOOP_IVDEP
FAIL_REGEX "[wW]arning" )
check_source_compiles ( C
"int main(void) {
#pragma GCC novector
for (int j = 0; j < 1; j++) { }
return 0;
}"
HAVE_PRAGMA_GCC_NOVECTOR
FAIL_REGEX "[wW]arning" )
check_source_compiles ( C
"int main(void) {
#pragma novector
for (int j = 0; j < 1; j++) { }
return 0;
}"
HAVE_PRAGMA_NOVECTOR
FAIL_REGEX "[wW]arning" )
check_source_compiles ( C
"int main(void) {
#pragma loop( no_vector )
for (int j = 0; j < 1; j++) { }
return 0;
}"
HAVE_PRAGMA_LOOP_NO_VECTOR
FAIL_REGEX "[wW]arning" )
check_source_compiles(CXX
"#if !(__has_attribute(swiftcall) && \
__has_attribute(swift_context) && \
__has_attribute(swift_error_result) && \
__has_attribute(swift_indirect_result))
#error CXX compiler must support Swift calling conventions
#endif
int main(void) { return 0; }"
HAVE_SWIFTCALL)
check_source_compiles(CXX
"#if !(__has_attribute(swiftasynccall) && \
__has_attribute(swift_async_context))
#error CXX compiler must support Swift async calling conventions
#endif
int main(void) { return 0; }"
HAVE_SWIFT_ASYNC_CALL)