forked from ochubar/SRW
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Synchrotron-Radiation-Workshop/build_impro…
…vements ENH: Switch build system to CMake
- Loading branch information
Showing
21 changed files
with
1,478 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
ext_lib | ||
# Build directory | ||
build/ | ||
|
||
# Python build products | ||
python/build/ | ||
python/dist/ | ||
python/srwpy.egg-info/ | ||
|
||
# Documentation artifacts | ||
docs/source/cookbook | ||
docs/build/ | ||
|
||
# Python and C compiled files | ||
*.pyc | ||
*.o | ||
data_example* | ||
.idea | ||
|
||
# Compiled libraries | ||
*.a | ||
*.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Minimum cmake version | ||
# Picked 3.12 as this one introduces a proper FindOpenMP | ||
cmake_minimum_required(VERSION 3.12 FATAL_ERROR) | ||
|
||
# Project name | ||
project(SRW) | ||
|
||
cmake_policy(SET CMP0074 NEW) | ||
|
||
# Folder for helper modules (Find*.cmake) | ||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) | ||
|
||
# Uncomment for VERBOSE Makefiles. Useful for debugging. | ||
#set(CMAKE_VERBOSE_MAKEFILE ON) | ||
|
||
# Useful debug for Find commands | ||
#set(CMAKE_FIND_DEBUG_MODE ON) | ||
|
||
# Uncomment for install messages | ||
#set(CMAKE_INSTALL_MESSAGE ALWAYS) | ||
|
||
# Uncomment for Debug Build | ||
#set(CMAKE_BUILD_TYPE Debug) | ||
set(CMAKE_BUILD_TYPE Release) | ||
|
||
# Option for OpenMP build, OFF by default. | ||
option(USE_OPENMP "Activate OpenMP build" OFF) | ||
|
||
# Option for C client library to be built or not - See src/clients/CMakeLists.txt | ||
option(BUILD_CLIENT_C "Activate C Client library build" OFF) | ||
|
||
# Option for Python client library to be built or not - See src/clients/CMakeLists.txt | ||
option(BUILD_CLIENT_PYTHON "Activate Python Client library build" OFF) | ||
|
||
# Option for Igor Pro client library to be built or not - See src/clients/CMakeLists.txt | ||
option(BUILD_CLIENT_IGOR "Activate Igor Pro Client library build" OFF) | ||
|
||
|
||
# Temporary path for FFTW in case we need to build it | ||
set(STAGED_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/stage) | ||
message(STATUS "${PROJECT_NAME} staged install: ${STAGED_INSTALL_PREFIX}") | ||
|
||
|
||
if(UNIX) | ||
# Use /lib /bin /include /share folder structure | ||
include(GNUInstallDirs) | ||
else() | ||
if (WIN32) | ||
set(${CMAKE_INSTALL_LIBDIR} "lib") | ||
set(${CMAKE_INSTALL_DATADIR} "share") | ||
set(${CMAKE_INSTALL_INCLUDEDIR} "include") | ||
set(${CMAKE_INSTALL_BINDIR} "bin") | ||
message(STATUS "Setting installation destination on Windows to: ${CMAKE_INSTALL_PREFIX}") | ||
else() | ||
message(FATAL_ERROR "System not UNIX nor WIN32 - not implemented yet") | ||
endif() | ||
endif() | ||
|
||
# Force FFTW to look for STATIC libraries that we need | ||
set(FFTW_USE_STATIC_LIBS ON) | ||
|
||
# External Libraries | ||
add_subdirectory(ext_lib) | ||
|
||
# Main library | ||
add_subdirectory(src) |
Oops, something went wrong.