Changeset: d3f56345235d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3f56345235d Modified Files: CMakeLists.txt Branch: mbedded Log Message:
Some symbols on Linux (e.g. pipe2) require _GNU_SOURCE macro to be defined, so move it before the symbol existance checks diffs (27 lines): diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,6 +95,11 @@ endif() check_include_file("stdatomic.h" HAVE_STDATOMIC_H) +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + add_definitions(-D_XOPEN_SOURCE -D_GNU_SOURCE) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE") # required for symbol existance tests +endif() + # Linux specific, in the future, it might be ported to other platforms check_symbol_exists("S_ISREG" "sys/stat.h" HAVE_SYS_STAT_H) check_symbol_exists("getaddrinfo" "netdb.h" HAVE_GETADDRINFO) @@ -301,11 +306,6 @@ set(RUNDIR # Some custom target will need these setting. include(monetdb-custom-targets) -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - add_definitions(-D_XOPEN_SOURCE -D_GNU_SOURCE) - set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE") # required for tests -endif() - # Used for installing testing python module execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(0,0,'${MONETDB_PREFIX}'))" RESULT_VARIABLE PY3_LIBDIR_CODE _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list