Commit 7c1759c2 authored by Thomas Moulard's avatar Thomas Moulard
Browse files

Fix Boost dectection.

parent 4cebcb6b
......@@ -28,6 +28,8 @@ SETUP_PROJECT()
SET(PKG_CONFIG_LIBS "${PKG_CONFIG_LIBS} -lhpp-util")
# Search for Boost.
SET(Boost_USE_STATIC_LIBS OFF)
SET(Boost_USE_MULTITHREAD ON)
FIND_PACKAGE(Boost 1.34 COMPONENTS filesystem system)
SET(${PROJECT_NAME}_HEADERS
......@@ -41,6 +43,9 @@ SET(${PROJECT_NAME}_HEADERS
include/hpp/util/version.hh
)
# Add Boost path to include directories.
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)
......
......@@ -13,9 +13,24 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
INCLUDE(../cmake/test.cmake)
# DEFINE_TEST(NAME)
# -----------------
#
# Compile a program and add it as a test.
#
MACRO(DEFINE_TEST NAME LIB)
ADD_EXECUTABLE(${NAME} ${NAME}.cc)
TARGET_LINK_LIBRARIES(${NAME} hpp-util)
# Link against Boost.
TARGET_LINK_LIBRARIES(${NAME} ${Boost_LIBRARIES})
ADD_TEST(${NAME} ${RUNTIME_OUTPUT_DIRECTORY}/${NAME})
ENDMACRO(DEFINE_TEST)
# Define tests.
DEFINE_UNIT_TEST(simple-test hpp-util)
DEFINE_UNIT_TEST(assertion hpp-util)
DEFINE_UNIT_TEST(exception hpp-util)
DEFINE_TEST(simple-test hpp-util)
DEFINE_TEST(assertion hpp-util)
DEFINE_TEST(exception hpp-util)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment