Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BioEM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPIBP-Hummer
BioEM
Commits
ef000207
Commit
ef000207
authored
9 years ago
by
Markus Rampp
Browse files
Options
Downloads
Patches
Plain Diff
use canonical cmake procedure to link selected boost components
* this fixes the issue of a missing rpath to the shared objects
parent
448a268c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+19
-4
19 additions, 4 deletions
CMakeLists.txt
with
19 additions
and
4 deletions
CMakeLists.txt
+
19
−
4
View file @
ef000207
cmake_minimum_required
(
VERSION 2.6
)
cmake_minimum_required
(
VERSION 2.6
)
project
(
BioEM
)
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
###Set up options
option
(
USE_CUDA
"Build BioEM with CUDA support"
OFF
)
option
(
USE_CUDA
"Build BioEM with CUDA support"
OFF
)
option
(
USE_OPENMP
"Build BioEM with OpenMP support"
ON
)
option
(
USE_OPENMP
"Build BioEM with OpenMP support"
ON
)
...
@@ -8,6 +21,7 @@ option (USE_MPI "Build BioEM with MPI 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
(
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
)
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 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
}
/cmake/Modules/"
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
"
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
"
)
...
@@ -35,8 +49,10 @@ if (NOT FFTW_FOUND)
...
@@ -35,8 +49,10 @@ if (NOT FFTW_FOUND)
endif
()
endif
()
include_directories
(
${
FFTW_INCLUDE_DIRS
}
)
include_directories
(
${
FFTW_INCLUDE_DIRS
}
)
find_package
(
Boost 1.43 REQUIRED
)
find_package
(
Boost 1.43 REQUIRED COMPONENTS program_options
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
###Find Optional Packages
###Find Optional Packages
...
@@ -127,7 +143,7 @@ if (FFTWF_LIBRARIES)
...
@@ -127,7 +143,7 @@ if (FFTWF_LIBRARIES)
else
()
else
()
target_link_libraries
(
bioEM -L
${
FFTW_LIBDIR
}
-lfftw3 -lfftw3f
)
target_link_libraries
(
bioEM -L
${
FFTW_LIBDIR
}
-lfftw3 -lfftw3f
)
endif
()
endif
()
target_link_libraries
(
bioEM
-L
${
Boost_
LIBRARY_DIRS
}
-lboost_program_options
)
target_link_libraries
(
bioEM
${
Boost_
PROGRAM_OPTIONS_LIBRARY
}
)
if
(
MPI_FOUND
)
if
(
MPI_FOUND
)
target_link_libraries
(
bioEM
${
MPI_LIBRARIES
}
)
target_link_libraries
(
bioEM
${
MPI_LIBRARIES
}
)
...
@@ -150,4 +166,3 @@ if (PRINT_CMAKE_VARIABLES)
...
@@ -150,4 +166,3 @@ if (PRINT_CMAKE_VARIABLES)
message
(
STATUS
"
${
_variableName
}
=
${${
_variableName
}}
"
)
message
(
STATUS
"
${
_variableName
}
=
${${
_variableName
}}
"
)
endforeach
()
endforeach
()
endif
()
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment