We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 914c8f1 commit 6f49521Copy full SHA for 6f49521
cpp/CMakeLists.txt
@@ -58,8 +58,6 @@ include(htslib)
58
# if htslib is not in your environment, then build htslib from source
59
if(NOT HTSlib_FOUND)
60
add_dependencies(${PROJECT_NAME} htslib)
61
- # also ensure the htslib target itself sees _GNU_SOURCE
62
- target_compile_definitions(htslib PRIVATE _GNU_SOURCE)
63
endif()
64
65
# Link dependencies
cpp/cmake/htslib.cmake
@@ -66,6 +66,8 @@ else()
66
INSTALL_COMMAND ${MAKE_COMMAND} install prefix=${htslib_INSTALL}
67
)
68
69
+ ENVIRONMENT "CFLAGS=-D_GNU_SOURCE ${CFLAGS}" "CXXFLAGS=-D_GNU_SOURCE ${CXXFLAGS}"
70
+
71
message(STATUS "ZLIB_BUILD: ${ZLIB_BUILD}")
72
if(ZLIB_BUILD)
73
include(../cmake/zlib.cmake)
0 commit comments