From 478fa42a11d1c018364c44a96ee3da29a1ad5bc6 Mon Sep 17 00:00:00 2001 From: Maxime Leblanc Date: Fri, 10 Feb 2017 17:54:33 +0100 Subject: [PATCH 1/3] CMakeLists.txt: let developer choose build type --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d8e0c7..98d81db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ option(WITH_BENCHMARK "enable building benchmark executable" OFF) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) -set(CMAKE_BUILD_TYPE Release) set(mstch_VERSION 1.0.1) From 103c3d6c70c9bdbd14a4cc7bcc9a7c1d680f8052 Mon Sep 17 00:00:00 2001 From: Maxime Leblanc Date: Fri, 10 Feb 2017 17:58:00 +0100 Subject: [PATCH 2/3] src/CMakeLists.txt: expose Boost include dir --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6517fc4..c72aa7d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,6 +26,8 @@ add_library(mstch STATIC ${SRC}) set_property(TARGET mstch PROPERTY VERSION ${mstch_VERSION}) +target_include_directories(mstch PUBLIC ${Boost_INCLUDE_DIR}) + install( TARGETS mstch EXPORT mstchTargets LIBRARY DESTINATION lib From 5ac5b311ebbd410f6c8f82f22c0e04b3439d3a24 Mon Sep 17 00:00:00 2001 From: Maxime Leblanc Date: Fri, 10 Feb 2017 18:14:40 +0100 Subject: [PATCH 3/3] README.md: add information about build types --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ff806c8..2721b18 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,11 @@ from the root of the source tree: $ make install ``` -The install command may require root privileges. This will also install CMake +You can specify the +[build type](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html) (Release, Debug...) +by adding -DCMAKE\_BUILD\_TYPE=BuildType to the `cmake` command. + +The install command may require root privileges. This will also install CMake config files, so you can use use `find_package` in your CMakeLists.txt: ```cmake