Salome HOME
Ensure cmake_build_type is used in SALOME 9.12.0
[tools/sat_salome.git] / products / patches / openturns-1.20.1.004.patch
1 diff -Naur openturns-1.20.1_ref/openturns-1.20.1/CMakeLists.txt openturns-1.20.1_dev/openturns-1.20.1/CMakeLists.txt
2 --- openturns-1.20.1_ref/openturns-1.20.1/CMakeLists.txt        2023-04-07 09:47:43.000000000 +0200
3 +++ openturns-1.20.1_dev/openturns-1.20.1/CMakeLists.txt        2023-05-17 10:52:58.551422902 +0200
4 @@ -40,6 +40,15 @@
5  option (BUILD_PYTHON                 "Build the python module for the library"                               ON)
6  option (BUILD_SHARED_LIBS            "Build shared libraries"                                                ON)
7  
8 +ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)  # To disable windows warnings for strcpy, fopen, ...
9 +ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)  # To disable windows warnings generated by checked iterators(e.g. std::copy, std::transform, ...)
10 +ADD_DEFINITIONS(-DWNT -DWIN32)
11 +ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500)      # Windows 2000 or later API is required
12 +ADD_DEFINITIONS(-DPPRO_NT)
13 +ADD_DEFINITIONS(-DNOMINMAX)
14 +
15 +SET(SWIG_ROOT_DIR $ENV{SWIG_ROOT_DIR} CACHE PATH "Path to the SWIG.")
16 +
17  # Defines our own module path
18  list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
19  
20 diff -Naur openturns-1.20.1_ref/openturns-1.20.1/python/src/CMakeLists.txt openturns-1.20.1_dev/openturns-1.20.1/python/src/CMakeLists.txt
21 --- openturns-1.20.1_ref/openturns-1.20.1/python/src/CMakeLists.txt     2023-04-07 09:47:43.000000000 +0200
22 +++ openturns-1.20.1_dev/openturns-1.20.1/python/src/CMakeLists.txt     2023-05-17 10:49:29.386285353 +0200
23 @@ -16,7 +16,7 @@
24  execute_process (COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/openturns)
25  add_custom_command (OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/openturns/swigpyrun.h
26                       COMMAND ${SWIG_EXECUTABLE}
27 -                     ARGS -python -external-runtime ${CMAKE_CURRENT_BINARY_DIR}/openturns/swigpyrun.h
28 +                     ARGS -I${SWIG_ROOT_DIR}/Lib -I${SWIG_ROOT_DIR}/Lib/python -python -external-runtime ${CMAKE_CURRENT_BINARY_DIR}/openturns/swigpyrun.h
29                       COMMENT "Swig runtime header")
30  add_custom_target (generate_swig_runtime DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/openturns/swigpyrun.h)
31  add_custom_target (generate_docstrings)