Added proper support for boost detection

This commit is contained in:
Guilhem Lavaux 2014-05-20 09:43:00 +02:00
parent b6d1cf7591
commit 34de699863
3 changed files with 17 additions and 10 deletions

View File

@ -31,6 +31,8 @@ find_library(NETCDF_LIBRARY netcdf)
find_library(GSL_LIBRARY gsl) find_library(GSL_LIBRARY gsl)
find_library(GSLCBLAS_LIBRARY gslcblas) find_library(GSLCBLAS_LIBRARY gslcblas)
find_package(Boost 1.53)
if (ENABLE_SHARP) if (ENABLE_SHARP)
SET(SHARP_SOURCE ${CMAKE_SOURCE_DIR}/external/sharp) SET(SHARP_SOURCE ${CMAKE_SOURCE_DIR}/external/sharp)
SET(DEP_BUILD ${CMAKE_SOURCE_DIR}/external/sharp/auto) SET(DEP_BUILD ${CMAKE_SOURCE_DIR}/external/sharp/auto)

View File

@ -1,5 +1,7 @@
SET(tolink ${GSL_LIBRARIES} CosmoTool ${CosmoTool_LIBS}) SET(tolink ${GSL_LIBRARIES} CosmoTool ${CosmoTool_LIBS})
include_directories(${CMAKE_SOURCE_DIR}/src ${FFTW3_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH}) include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${FFTW3_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS} ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH})
IF(SHARP_INCLUDE_PATH) IF(SHARP_INCLUDE_PATH)
include_directories(BEFORE ${SHARP_INCLUDE_PATH}) include_directories(BEFORE ${SHARP_INCLUDE_PATH})
@ -11,9 +13,6 @@ target_link_libraries(testBQueue ${tolink})
add_executable(testInterpolate testInterpolate.cpp) add_executable(testInterpolate testInterpolate.cpp)
target_link_libraries(testInterpolate ${tolink}) target_link_libraries(testInterpolate ${tolink})
add_executable(testSmooth testSmooth.cpp)
target_link_libraries(testSmooth ${tolink})
add_executable(testkd testkd.cpp) add_executable(testkd testkd.cpp)
target_link_libraries(testkd ${tolink}) target_link_libraries(testkd ${tolink})
@ -69,6 +68,12 @@ endif (ENABLE_SHARP AND SHARP_LIBRARY AND SHARP_INCLUDE_PATH AND EIGEN3_FOUND)
add_executable(test_cosmopower test_cosmopower.cpp) add_executable(test_cosmopower test_cosmopower.cpp)
target_link_libraries(test_cosmopower ${tolink}) target_link_libraries(test_cosmopower ${tolink})
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(simple3DFilter simple3DFilter.cpp) add_executable(testSmooth testSmooth.cpp)
target_link_libraries(simple3DFilter ${tolink}) target_link_libraries(testSmooth ${tolink})
add_executable(simple3DFilter simple3DFilter.cpp)
target_link_libraries(simple3DFilter ${tolink})
endif (Boost_FOUND)

View File

@ -1,8 +1,8 @@
#include <cassert> #include <cassert>
#include <CosmoTool/yorick.hpp> #include "yorick.hpp"
#include <CosmoTool/sphSmooth.hpp> #include "sphSmooth.hpp"
#include <CosmoTool/mykdtree.hpp> #include "mykdtree.hpp"
#include <CosmoTool/miniargs.hpp> #include "miniargs.hpp"
using namespace std; using namespace std;
using namespace CosmoTool; using namespace CosmoTool;