Skip to content

Commit 787440a

Browse files
committed
Merge branch 'develop' of https://github.com/NREL/ssc into rmrflandbosse
2 parents 7c1db40 + 94cd6ab commit 787440a

File tree

4 files changed

+56
-5
lines changed

4 files changed

+56
-5
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ jobs:
4646
git add '${{ github.workspace }}/ssc/test/elapsed_time_release'
4747
git commit -m "Update Test Elapsed Time CSVs for new Release"
4848
git push origin update_test_times
49-
gh pr create -B develop -H update_test_times --title 'Merge update_test_times into develop' --body 'Created by Github action'
49+
gh pr create -B develop -H update_test_times --title 'Merge update_test_times into develop' --body 'As part of automated release process, run the SSC tests and update the test times CSV. This allows tracking of the test times across releases, and for comparison of feature branchs' test times to that of the latest release.\n\nCreated via release.yml by Github action'

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ endif()
5050

5151
Project(sam_simulation_core VERSION 1.0.0 LANGUAGES CXX C)
5252

53+
if(MSVC)
54+
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Debug and Release Builds Configured" FORCE)
55+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20")
56+
# for linking to Release build of ortools
57+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
58+
# Get the current debug flags and remove the /D_DEBUG option.
59+
string(REPLACE "/D_DEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
60+
endif()
61+
5362

5463
#####################################################################################################################
5564
#

sdktool/CMakeLists.txt

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,52 @@ if (UNIX)
2424
set(wxWidgets_CONFIG_EXECUTABLE /usr/local/bin/wx-config-3)
2525
find_package(wxWidgets QUIET COMPONENTS qa aui richtext html propgrid adv net stc core xml base REQUIRED)
2626
else()
27-
set(wxWidgets_ROOT_DIR $ENV{WXMSW3})
28-
find_package(wxWidgets QUIET COMPONENTS qa webview aui richtext html propgrid adv net stc core xml base scintilla REQUIRED)
27+
# set(wxWidgets_ROOT_DIR $ENV{WXMSW3})
28+
# find_package(wxWidgets QUIET COMPONENTS qa webview aui richtext html propgrid adv net stc core xml base scintilla REQUIRED)
29+
30+
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Debug and Release Builds Configured" FORCE)
31+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20")
32+
# for linking to Release build of ortools
33+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
34+
# Get the current debug flags and remove the /D_DEBUG option.
35+
string(REPLACE "/D_DEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
36+
# following does not force release libraries for wxWidgets using find_package
37+
#set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG RELEASE)
38+
39+
set(wxWidgets_ROOT_DIR $ENV{WXMSW3})
40+
find_package(wxWidgets QUIET REQUIRED xrc webview stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla)
41+
42+
# message("All wxWidgets: " ${wxWidgets_LIBRARIES})
43+
set(FOUND "false")
44+
foreach(lib ${wxWidgets_LIBRARIES})
45+
string(FIND ${lib} "optimized" INDEX)
46+
string(FIND ${lib} "debug" INDEX2)
47+
string(FIND ${lib} "wxWidgets" INDEX3)
48+
if (INDEX GREATER_EQUAL 0) # skip once
49+
set(FOUND "true")
50+
continue()
51+
elseif((INDEX2 LESS 0) AND (INDEX3 LESS 0))
52+
set(FOUND "true")
53+
endif()
54+
if (${FOUND} STREQUAL "true")
55+
set(FOUND "false")
56+
message("lib: ${lib}")
57+
list(APPEND WX_LIBS_LIST ${lib})
58+
endif()
59+
endforeach()
60+
61+
list(JOIN WX_LIBS_LIST ";" wxWidgets_LIBRARIES)
62+
# message("Link Libraries for wxWidgets: ${wxWidgets_LIBRARIES}")
63+
64+
2965
endif()
3066

31-
include(${wxWidgets_USE_FILE})
67+
if (wxWidgets_FOUND)
68+
include(${wxWidgets_USE_FILE})
69+
endif ()
70+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
71+
72+
3273

3374

3475
#####################################################################################################################

test/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ endif()
7878
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR "Debug" IN_LIST CMAKE_CONFIGURATION_TYPES)
7979
find_library( GTESTD_LIB
8080
NAMES libgtest.a gtest.lib libgtest.so
81-
PATHS $ENV{GTEST_DIR} ${GTDIR}/build/lib ${GTDIR}/build/lib/Debug)
81+
# ortools release libraries only
82+
PATHS $ENV{GTEST_DIR} ${GTDIR}/build/lib ${GTDIR}/build/lib/Release)
8283
if(UNIX AND ENABLE_COVERAGE)
8384
target_link_options(Test PRIVATE --coverage)
8485
target_link_libraries(Test debug gcov ${GTESTD_LIB})

0 commit comments

Comments
 (0)