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

split cmakelist #384

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

olofkallander
Copy link
Contributor

@olofkallander olofkallander commented Oct 13, 2024

Moves the test build into its own cmakelist.
Upgraded gtest to 1.15.2

@olofkallander olofkallander force-pushed the testcmake branch 2 times, most recently from a6cf554 to 6253895 Compare October 29, 2024 17:28

target_link_libraries(LoadTest testlib gtest gmock)
add_subdirectory(test)
set_target_properties(UnitTest PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
Copy link
Contributor Author

@olofkallander olofkallander Nov 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to make Test executables end up in build top folder.
However, maybe we should consider allowing the build folder to be structured as cmake default:

build
  bin
  _deps
  libs

and put the binaries in bin folder

include(FetchContent)

# Download and unpack googletest at configure time
configure_file(CMakeLists-gtest.txt.in googletest-download/CMakeLists.txt)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done with fetchContent but it would require the cmake to be upgraded on all docker images first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant