diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2023-06-07 16:54:22 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2023-06-07 16:54:22 +0200 |
| commit | fc033418a95d0eae238a4e2718b6429cdc160d0d (patch) | |
| tree | af7aa5f27a9135e069d259932e386e10a1bbf74b | |
| parent | a984ee355ea8bcdeeb6f5ff2dc1e17c566044223 (diff) | |
| download | newtype-fc033418a95d0eae238a4e2718b6429cdc160d0d.tar.xz newtype-fc033418a95d0eae238a4e2718b6429cdc160d0d.zip | |
conan: fix CMake generator selection
| -rw-r--r-- | conanfile.py | 4 | ||||
| -rw-r--r-- | source/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | source/tests/CMakeLists.txt | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/conanfile.py b/conanfile.py index 990b8ac..618073b 100644 --- a/conanfile.py +++ b/conanfile.py @@ -48,14 +48,14 @@ class NewtypeConan(ConanFile): self.test_requires("catch2/[~3.3]") def generate(self): - toolchain = CMakeToolchain(self) + toolchain = CMakeToolchain(self, generator="Ninja Multi-Config") toolchain.variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = True toolchain.variables["PROJECT_VERSION"] = self.version toolchain.variables["PROJECT_DESCRIPTION"] = self.description toolchain.generate() def layout(self): - cmake_layout(self, generator="Ninja Multi-Config", src_folder="source") + cmake_layout(self, src_folder="source") def package(self): cmake = CMake(self) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index c84eda9..82beacd 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -5,6 +5,8 @@ project("newtype" DESCRIPTION "A library of types and functions to create strong type aliases" ) +enable_testing() + # Project Options option(BUILD_EXAMPLES "Build the library examples" OFF) diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt index fe405db..2287a91 100644 --- a/source/tests/CMakeLists.txt +++ b/source/tests/CMakeLists.txt @@ -1,10 +1,9 @@ -enable_testing() - find_package("Catch2" "3.1" COMPONENTS "Catch2WithMain" REQUIRED ) +include("CTest") include("Catch") add_executable("${PROJECT_NAME}_tests" |
