Skip to content

Commit ea7d47f

Browse files
mgronckijenkins
authored and
jenkins
committed
QPR-11793 fix python script and cmake projects for windows
1 parent 2d3670a commit ea7d47f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Examples/ore_examples_helper.py

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def _locate_ore_exe(self):
4949
self.ore_exe = "..\..\\..\\build\\ore\\App\\ore.exe"
5050
elif os.path.isfile("..\\..\\..\\build\\ore\\App\\RelWithDebInfo\\ore.exe"):
5151
self.ore_exe = "..\\..\\..\\build\\ore\\App\\RelWithDebInfo\\ore.exe"
52+
elif os.path.isfile("..\\..\\build\\App\\Release\\ore.exe"):
53+
self.ore_exe = "..\\..\\build\\App\\Release\\ore.exe"
5254
else:
5355
print_on_console("ORE executable not found.")
5456
quit()

cmake/commonSettings.cmake

+7-5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ if(MSVC)
6060
endif()
6161
endif()
6262

63+
# add build/QuantLib as first include directory to make sure we include QL's cmake-configured files
64+
include_directories("${PROJECT_BINARY_DIR}/QuantLib")
65+
66+
# similar if QuantLib is build separately
67+
include_directories("${CMAKE_CURRENT_LIST_DIR}/../QuantLib/build")
68+
6369
IF(NOT Boost_USE_STATIC_LIBS)
6470
add_definitions(-DBOOST_ALL_DYN_LINK)
6571
add_definitions(-DBOOST_TEST_DYN_LINK)
@@ -148,11 +154,7 @@ else()
148154
# disable warnings from boost
149155
add_compiler_flag("--system-header-prefix=boost/" supportsSystemHeaderPrefixBoost)
150156

151-
# add build/QuantLib as first include directory to make sure we include QL's cmake-configured files
152-
include_directories("${PROJECT_BINARY_DIR}/QuantLib")
153-
154-
# similar if QuantLib is build separately
155-
include_directories("${CMAKE_CURRENT_LIST_DIR}/../QuantLib/build")
157+
156158
endif()
157159

158160
# workaround when building with boost 1.81, see https://github.com/boostorg/phoenix/issues/111

runCmakeVS.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mkdir build
22
rem amend the BOOST variables to your environment
3-
cmake -G "Visual Studio 17 2022" -A x64 -DBOOST_INCLUDEDIR=%BOOST% -DBOOST_LIBRARYDIR=%BOOST_LIB64% -DENABLE_SESSIONS=ON -B build
3+
cmake -G "Visual Studio 17 2022" -A x64 -DBOOST_INCLUDEDIR=%BOOST% -DBOOST_LIBRARYDIR=%BOOST_LIB64% -DQL_ENABLE_SESSIONS=ON -B build
44
cmake --build build -v --config Release
55
pause

0 commit comments

Comments
 (0)