Fine tuning linking strategy
static linking on Windows (MSVC and mingw) dyn linking everywhere else.
This commit is contained in:
@@ -18,12 +18,12 @@ if(UNIX)
|
|||||||
endif(UNIX)
|
endif(UNIX)
|
||||||
|
|
||||||
#Prep ourselves for compiling boost
|
#Prep ourselves for compiling boost
|
||||||
IF(MSVC)
|
IF(WIN32)
|
||||||
set(Boost_DEBUG OFF)
|
|
||||||
set(Boost_DETAILED_FAILURE_MSG OFF)
|
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
# add_definitions(-DBOOST_ALL_DYN_LINK)
|
ELSE(TRUE)
|
||||||
ENDIF(MSVC)
|
set(Boost_USE_STATIC_LIBS OFF)
|
||||||
|
add_definitions(-DBOOST_ALL_DYN_LINK)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
set(Boost_THREAD_FOUND OFF)
|
set(Boost_THREAD_FOUND OFF)
|
||||||
find_package(Boost COMPONENTS unit_test_framework system thread filesystem)
|
find_package(Boost COMPONENTS unit_test_framework system thread filesystem)
|
||||||
|
|||||||
@@ -9,10 +9,13 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
|
||||||
if (MSVC)
|
#Prep ourselves for compiling boost
|
||||||
|
IF(WIN32)
|
||||||
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
|
ELSE(TRUE)
|
||||||
set(Boost_USE_STATIC_LIBS OFF)
|
set(Boost_USE_STATIC_LIBS OFF)
|
||||||
add_definitions(-DBOOST_ALL_DYN_LINK)
|
add_definitions(-DBOOST_ALL_DYN_LINK)
|
||||||
endif(MSVC)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
find_package(Boost COMPONENTS unit_test_framework)
|
find_package(Boost COMPONENTS unit_test_framework)
|
||||||
include_directories (${Boost_INCLUDE_DIRS} ../../src/outfile/include)
|
include_directories (${Boost_INCLUDE_DIRS} ../../src/outfile/include)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#define BOOST_TEST_MAIN
|
#define BOOST_TEST_MAIN
|
||||||
#define BOOST_TEST_MODULE toolkit
|
#define BOOST_TEST_MODULE toolkit
|
||||||
|
|
||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/included/unit_test.hpp>
|
||||||
|
|
||||||
#include "test_toolkit.hpp"
|
#include "test_toolkit.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,13 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
|
||||||
IF(MSVC)
|
#Prep ourselves for compiling boost
|
||||||
|
IF(WIN32)
|
||||||
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
|
ELSE(TRUE)
|
||||||
set(Boost_USE_STATIC_LIBS OFF)
|
set(Boost_USE_STATIC_LIBS OFF)
|
||||||
add_definitions(-DBOOST_ALL_DYN_LINK)
|
add_definitions(-DBOOST_ALL_DYN_LINK)
|
||||||
ENDIF(MSVC)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|
||||||
find_package(Boost COMPONENTS unit_test_framework)
|
find_package(Boost COMPONENTS unit_test_framework)
|
||||||
include_directories (${Boost_INCLUDE_DIRS} ../../src/)
|
include_directories (${Boost_INCLUDE_DIRS} ../../src/)
|
||||||
|
|||||||
Reference in New Issue
Block a user