Skip to content
Snippets Groups Projects
Commit 6c9045c2 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Revert "CMake: unify option names"

This reverts commit 1f1e2d78.
parent cd10c6c6
No related branches found
No related tags found
1 merge request!658Restore Python doc strings; revert renaming (-> BA_) in CMake; restore ALLCONFIG
......@@ -106,7 +106,7 @@ webdoc:
- cd ..
- mkdir build
- cd build
- cmake ..
- cmake .. -DCONFIGURE_DOXY=ON
- make doxyuser
- cp -fr html/user/* ~/ba-main/doxy/user-API/
- make doxylong
......
......@@ -59,12 +59,12 @@ add_custom_target(fullcheck COMMAND ${CMAKE_CTEST_COMMAND})
# options that are on by default (switch off for accelerated builds of limited scope)
option(BORNAGAIN_PYTHON "Build with python support" ON)
option(BORNAGAIN_GUI "Build a graphical user interface" ON)
option(BORNAGAIN_TIFF "Tiff files read/write support" ON)
option(BORNAGAIN_TIFF_SUPPORT "Tiff files read/write support" ON)
# options that are off by default (switch on for additional functionality)
option(BORNAGAIN_MPI "Build with MPI support" OFF)
option(BORNAGAIN_SWIG "Generate python bindings during build (requires swig)" OFF)
option(CONFIGURE_BINDINGS "Generate python bindings during build (requires swig)" OFF)
option(BUILD_DEBIAN "Build a debian package" OFF)
option(BORNAGAIN_APPLE_BUNDLE "Create a Mac OS X bundle" OFF)
......
......@@ -35,10 +35,10 @@ target_include_directories(${lib}
${tspectrum_INCLUDE_DIR}
)
if(BORNAGAIN_TIFF)
if(BORNAGAIN_TIFF_SUPPORT)
target_link_libraries(${lib} PUBLIC ${TIFF_LIBRARIES})
target_include_directories(${lib} PUBLIC ${TIFF_INCLUDE_DIR})
target_compile_definitions(${lib} PUBLIC -DBORNAGAIN_TIFF)
target_compile_definitions(${lib} PUBLIC -DBORNAGAIN_TIFF_SUPPORT)
endif()
if(WIN32)
......
......@@ -7,7 +7,7 @@ file(MAKE_DIRECTORY ${OUTPUT_DIR})
file(GLOB tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py)
list(REMOVE_ITEM tests utils.py)
if(NOT BORNAGAIN_TIFF)
if(NOT BORNAGAIN_TIFF_SUPPORT)
list(REMOVE_ITEM tests intensitydata_io_tiff.py)
endif()
......
......@@ -97,8 +97,8 @@ if(BORNAGAIN_MPI)
endif()
# --- Tiff ---
if(BORNAGAIN_TIFF)
message(STATUS "Looking for libtiff (use -DBORNAGAIN_TIFF=OFF to disable)")
if(BORNAGAIN_TIFF_SUPPORT)
message(STATUS "Looking for libtiff (use -DBORNAGAIN_TIFF_SUPPORT=OFF to disable)")
find_package(TIFF 4.0.2 REQUIRED COMPONENTS CXX)
endif()
......@@ -137,7 +137,7 @@ if(BORNAGAIN_PYTHON)
message(STATUS " Python3_NumPy_VERSION : ${Python3_NumPy_VERSION}")
message(STATUS " Python3_NumPy_INCLUDE_DIRS : ${Python3_NumPy_INCLUDE_DIRS}")
if(BORNAGAIN_SWIG)
if(CONFIGURE_BINDINGS)
find_package(SWIG 4.0 REQUIRED)
include(${SWIG_USE_FILE})
message(STATUS "Found SWIG version ${SWIG_VERSION} at ${SWIG_EXECUTABLE} with flags '${SWIG_FLAGS}'; CMake definitions in ${SWIG_USE_FILE}")
......@@ -227,7 +227,7 @@ if(WIN32)
endforeach()
## TIFF
if(BORNAGAIN_TIFF)
if(BORNAGAIN_TIFF_SUPPORT)
## Same as for Boost above: list can contain
# mixture of debug/optimized libs
message(STATUS "Installation of TIFF:")
......
......@@ -20,7 +20,7 @@ foreach(mod ba_plot.py ba_fitmonitor.py)
configure_file(${WRAP_DIR}/Python/${mod} ${CMAKE_BINARY_DIR}/lib/bornagain/${mod} COPYONLY)
endforeach()
if(BORNAGAIN_SWIG)
if(CONFIGURE_BINDINGS)
add_custom_command(
OUTPUT ${AUTO_DIR}/swig_runtime.h
COMMAND ${SWIG_EXECUTABLE} -c++;-python;-external-runtime;${AUTO_DIR}/swig_runtime.h
......
......@@ -9,7 +9,7 @@ function(SwigLib name lib tmpdir)
message(STATUS "SwigLib ${name}: ${lib} ${tmpdir}")
if(BORNAGAIN_SWIG)
if(CONFIGURE_BINDINGS)
file(MAKE_DIRECTORY ${tmpdir})
......@@ -50,7 +50,7 @@ function(SwigLib name lib tmpdir)
DEPENDS ${swig_dependencies} ${include_files}
)
endif(BORNAGAIN_SWIG)
endif(CONFIGURE_BINDINGS)
add_custom_target(
${lib}_python
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment