Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Always build gie if testing is requested #2899

Merged
merged 2 commits into from
Oct 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ if(BUILD_PROJINFO)
set(BIN_TARGETS ${BIN_TARGETS} binprojinfo)
endif()

if(BUILD_GIE)
# Always build gie if testing is requested
if(BUILD_GIE OR BUILD_TESTING)
include(bin_gie.cmake)
set(BIN_TARGETS ${BIN_TARGETS} gie)
endif()
Expand Down
6 changes: 4 additions & 2 deletions src/bin_gie.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ add_executable(gie ${GIE_SRC} ${GIE_INCLUDE})
target_link_libraries(gie PRIVATE ${PROJ_LIBRARIES})
target_compile_options(gie PRIVATE ${PROJ_CXX_WARN_FLAGS})

install(TARGETS gie
DESTINATION ${BINDIR})
if(BUILD_GIE)
install(TARGETS gie
DESTINATION ${BINDIR})
endif()

if(MSVC AND BUILD_SHARED_LIBS)
target_compile_definitions(gie PRIVATE PROJ_MSVC_DLL_IMPORT=1)
Expand Down