diff options
| author | Alexandr Timofeev | 2020-10-31 20:58:57 +0300 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-11-02 15:37:35 +0100 |
| commit | 2f31f9037d1139511fa6c5b73fc45698c5783c9e (patch) | |
| tree | 36ab38dc2a38b97db75f4a2808f9751de01d4fec | |
| parent | 33bcdc6bf5a74a03885f8d610bc48927b53d77e5 (diff) | |
| download | catch3-2f31f9037d1139511fa6c5b73fc45698c5783c9e.tar.gz | |
Inject conan_basic_setup to properly set MD/MT flags
| -rw-r--r-- | conanfile.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/conanfile.py b/conanfile.py index 3a1bf224..d3fa47ef 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class CatchConan(ConanFile): @@ -18,6 +18,8 @@ class CatchConan(ConanFile): options = {"with_main": [True, False]} default_options = {"with_main": True} + generators = "cmake" + def _configure_cmake(self): cmake = CMake(self) cmake.definitions["BUILD_TESTING"] = "OFF" @@ -27,6 +29,12 @@ class CatchConan(ConanFile): return cmake def build(self): + line_to_replace = 'list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")' + tools.replace_in_file("CMakeLists.txt", line_to_replace, + '''{} +include({}/conanbuildinfo.cmake) +conan_basic_setup()'''.format(line_to_replace, self.install_folder)) + cmake = self._configure_cmake() cmake.build() |