Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPIBP-Hummer
BioEM
Commits
ef000207
Commit
ef000207
authored
Jun 15, 2016
by
Markus Rampp
Browse files
use canonical cmake procedure to link selected boost components
* this fixes the issue of a missing rpath to the shared objects
parent
448a268c
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
ef000207
cmake_minimum_required
(
VERSION 2.6
)
project
(
BioEM
)
###use g++ and gcc instead of c++ and cc
##this works but would change the default cmake toolchain precedence c++,g++,...
#if (NOT (CMAKE_CXX_COMPILER OR $ENV{CXX}))
# set (CMAKE_CXX_COMPILER g++)
#endif()
##this works but would change the default cmake toolchain precedence cc,gcc,...
#if (NOT (CMAKE_C_COMPILER OR $ENV{CC}))
# set (CMAKE_C_COMPILER gcc)
#endif()
###Set up options
option
(
USE_CUDA
"Build BioEM with CUDA support"
OFF
)
option
(
USE_OPENMP
"Build BioEM with OpenMP support"
ON
)
...
...
@@ -8,6 +21,7 @@ option (USE_MPI "Build BioEM with MPI support" ON)
option
(
PRINT_CMAKE_VARIABLES
"List all CMAKE Variables"
OFF
)
option
(
CUDA_FORCE_GCC
"Force GCC as host compiler for CUDA part (If standard host compiler is incompatible with CUDA)"
ON
)
###Set up general variables
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
/cmake/Modules/"
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
"
)
...
...
@@ -35,8 +49,10 @@ if (NOT FFTW_FOUND)
endif
()
include_directories
(
${
FFTW_INCLUDE_DIRS
}
)
find_package
(
Boost 1.43 REQUIRED
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
find_package
(
Boost 1.43 REQUIRED COMPONENTS program_options
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
###Find Optional Packages
...
...
@@ -127,7 +143,7 @@ if (FFTWF_LIBRARIES)
else
()
target_link_libraries
(
bioEM -L
${
FFTW_LIBDIR
}
-lfftw3 -lfftw3f
)
endif
()
target_link_libraries
(
bioEM
-L
${
Boost_
LIBRARY_DIRS
}
-lboost_program_options
)
target_link_libraries
(
bioEM
${
Boost_
PROGRAM_OPTIONS_LIBRARY
}
)
if
(
MPI_FOUND
)
target_link_libraries
(
bioEM
${
MPI_LIBRARIES
}
)
...
...
@@ -150,4 +166,3 @@ if (PRINT_CMAKE_VARIABLES)
message
(
STATUS
"
${
_variableName
}
=
${${
_variableName
}}
"
)
endforeach
()
endif
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment