limix / bgen

A BGEN file format reader.
MIT License
10 stars 2 forks source link

On Windows, CMake complains that "warning" is not in any export set #10

Closed CarlKCarlK closed 4 years ago

CarlKCarlK commented 4 years ago

Greetings,

When I try to "cmake ." (or use Visual Studio's Generate Cache on CMakeLists.txt), I get this error message:

Error CMake Error: install(EXPORT "bgen-targets" ...) includes target "bgen" which requires target "warning" that is not in any export set.

I see there is extra metacode in CMakeLists.txt about the warning interface and Windows (below), but I don't understand Cmake well enough to understand or debug it.

add_library(warning INTERFACE)
add_library(BGEN::warning ALIAS warning)
target_compile_options(warning INTERFACE
    $<$<STREQUAL:${CMAKE_C_COMPILER_ID},MSVC>:/W3>
    $<$<NOT:$<STREQUAL:${CMAKE_C_COMPILER_ID},MSVC>>:-Wall -Wextra -pedantic
    -Wstrict-prototypes -Wshadow -Wconversion -Wmissing-prototypes
    -Wno-unused-parameter -Wsign-conversion>

Thanks,

CarlKCarlK commented 4 years ago

Everything seems to work. Thanks!

(On Windows, I just ran cmake, which generated a *.sln, which I opened. And compiled ALL_BUILD in debug and release node.)

From: Danilo Horta notifications@github.com Sent: Monday, April 06, 2020 7:31 AM To: limix/bgen bgen@noreply.github.com Cc: Carl Kadie carlk@msn.com; Author author@noreply.github.com Subject: Re: [limix/bgen] On Windows, CMake complains that "warning" is not in any export set (#10)

Closed #10https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flimix%2Fbgen%2Fissues%2F10&data=02%7C01%7C%7C11c7c5f9f3c346c677de08d7da37271f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637217802715641376&sdata=Gos%2B8qdUhwhxS2vcLBQ4p50lXoEJJX9IrcKcsyGGzXE%3D&reserved=0.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flimix%2Fbgen%2Fissues%2F10%23event-3205656315&data=02%7C01%7C%7C11c7c5f9f3c346c677de08d7da37271f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637217802715651385&sdata=uLZyCTnA5xbM9JuxCt4zQvGKee4CRcSJhgs6K%2FyL6ls%3D&reserved=0, or unsubscribehttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABR65P3YGQHPR3RWSQK2HC3RLHRS5ANCNFSM4L6ZMRVA&data=02%7C01%7C%7C11c7c5f9f3c346c677de08d7da37271f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637217802715651385&sdata=q17gstceuDM%2BZ8gAyQYo9m5bAF025lUFZqYx5WugOK8%3D&reserved=0.