Skip to content

Commit

Permalink
Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Oct 21, 2024
1 parent 4e9382b commit a57ffda
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .ci_support/run_docker_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ set -xe
cd /tmp
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=~/.local \
-DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32 \
-DCMAKE_UNITY_BUILD=ON \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Wshadow -Werror -D_GLIBCXX_ASSERTIONS" \
-DSWIG_COMPILE_FLAGS="-O1 -Wno-unused-parameter -Wno-shadow" \
-DSPHINX_FLAGS="-W -T -j4" \
-DUSE_SPHINX=ON -DSPHINX_FLAGS="-W -T -j4" \
/io
make install
make tests
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/run_docker_mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ mkdir build && cd build
PREFIX=${PWD}/install
CXXFLAGS="-Wall -Wextra -D_GLIBCXX_ASSERTIONS" ${ARCH}-w64-mingw32-cmake \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_UNITY_BUILD=ON \
-DPython_INCLUDE_DIR=${MINGW_PREFIX}/include/python${PYMAJMIN} \
-DPython_LIBRARY=${MINGW_PREFIX}/lib/libpython${PYMAJMIN}.dll.a \
-DPython_EXECUTABLE=/usr/bin/${ARCH}-w64-mingw32-python${PYMAJMIN}-bin \
-DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32 \
-DBUILD_DOC=OFF \
/io
make install
Expand Down
21 changes: 6 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ endif()

find_package (OpenTURNS CONFIG REQUIRED)
message (STATUS "Found OpenTURNS: ${OPENTURNS_ROOT_DIR} (found version \"${OPENTURNS_VERSION_STRING}\")")
if (NOT DEFINED OPENTURNS_PYTHON_MODULE_PATH)
set (OPENTURNS_PYTHON_MODULE_PATH ${OPENTURNS_PYTHON3_MODULE_PATH})
endif ()

find_package (FFTW REQUIRED)
list (APPEND OTFFTW_INCLUDE_DIRS ${FFTW_INCLUDE_DIRS})
Expand All @@ -58,16 +55,14 @@ set (OTFFTW_DATA_PATH ${CMAKE_INSTALL_DATAROOTDIR})
set (OTFFTW_CONFIG_CMAKE_PATH ${CMAKE_INSTALL_LIBDIR}/cmake/otfftw)
set (OTFFTW_DOC_PATH ${CMAKE_INSTALL_DOCDIR})

set (CMAKE_CXX_STANDARD 11)

if (BUILD_PYTHON)
find_package (SWIG 3)
include (${SWIG_USE_FILE})

if (CMAKE_VERSION VERSION_LESS 3.24)
find_package (Python 3.5 COMPONENTS Interpreter Development)
if (CMAKE_VERSION VERSION_LESS 3.28)
find_package (Python 3.6 COMPONENTS Interpreter Development)
else ()
find_package (Python 3.5 COMPONENTS Interpreter Development.Module)
find_package (Python 3.6 COMPONENTS Interpreter Development.Module Development.SABIModule)
endif ()

if (Python_FOUND)
Expand All @@ -87,14 +82,10 @@ if (BUILD_PYTHON)
endif ()
endif ()

if (DEFINED PYTHON_SITE_PACKAGES)
set (OTFFTW_PYTHON_MODULE_PATH "${PYTHON_SITE_PACKAGES}")
if (WIN32)
set (OTFFTW_PYTHON_MODULE_PATH Lib/site-packages CACHE PATH "site-packages dir")
else ()
if (WIN32)
set (OTFFTW_PYTHON_MODULE_PATH Lib/site-packages)
else ()
set (OTFFTW_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
endif ()
set (OTFFTW_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages CACHE PATH "site-packages dir")
endif ()
endif ()
endif ()
Expand Down

0 comments on commit a57ffda

Please sign in to comment.