Skip to content

Commit 6f49521

Browse files
committed
test fix
1 parent 914c8f1 commit 6f49521

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cpp/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ include(htslib)
5858
# if htslib is not in your environment, then build htslib from source
5959
if(NOT HTSlib_FOUND)
6060
add_dependencies(${PROJECT_NAME} htslib)
61-
# also ensure the htslib target itself sees _GNU_SOURCE
62-
target_compile_definitions(htslib PRIVATE _GNU_SOURCE)
6361
endif()
6462

6563
# Link dependencies

cpp/cmake/htslib.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ else()
6666
INSTALL_COMMAND ${MAKE_COMMAND} install prefix=${htslib_INSTALL}
6767
)
6868

69+
ENVIRONMENT "CFLAGS=-D_GNU_SOURCE ${CFLAGS}" "CXXFLAGS=-D_GNU_SOURCE ${CXXFLAGS}"
70+
6971
message(STATUS "ZLIB_BUILD: ${ZLIB_BUILD}")
7072
if(ZLIB_BUILD)
7173
include(../cmake/zlib.cmake)

0 commit comments

Comments
 (0)