-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Windows CI #176
Add Windows CI #176
Changes from all commits
3adc7df
e89e73d
73a8181
d450945
fc6491b
cf78812
e90f5cd
ba6aa9f
0f32175
c13fbf2
3067cb0
723273b
a9528ad
b1c03be
4abfd50
f97ab3f
75c3322
8cec70e
d6c0adf
a0ceeb4
ce49058
bc9a44c
fbd0925
8d38a0d
8a26229
ca29d53
766fc14
82bb2fb
497f497
bb3f3c0
fa69197
236122b
f1ea709
45a0c23
985fb9a
72bbc8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
# SPDX-License-Identifier: MPL-2.0 | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.12 FATAL_ERROR) | ||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For |
||
|
||
include(CMakePackageConfigHelpers) | ||
|
||
|
@@ -28,12 +28,14 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | |
set(INSTALL_CMAKE_DIR cmake CACHE PATH "Installation directory for cmake files") | ||
|
||
if(MSVC) | ||
add_compile_definitions(WIN32) | ||
add_definitions(-D_WIN32_WINNT=0x0A00) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. windows 10+ |
||
add_compile_definitions("_CRT_SECURE_NO_WARNINGS") | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:5000000 ") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | ||
# In release, we prefer speed over size of the code | ||
set(CMAKE_CXX_FLAGS_RELEASE "/O2") | ||
set(CMAKE_C_FLAGS_RELEASE "/O2") | ||
set(Boost_USE_STATIC_RUNTIME ON) | ||
else() | ||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Release) | ||
|
@@ -142,6 +144,7 @@ target_link_libraries(${target} | |
SuiteSparse::SuiteSparse_BTF | ||
SuiteSparse::SuiteSparse_Config | ||
${Boost_LIBRARIES} | ||
$<$<BOOL:${MSVC}>:msvcrt.lib> | ||
) | ||
|
||
if (USE_SIRIUS_SHARED) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,7 @@ | |
# | ||
|
||
function(check_file file expected_file) | ||
configure_file(${file} ${file} NEWLINE_STYLE LF) # required for windows ctest | ||
execute_process( COMMAND ${CMAKE_COMMAND} -E compare_files ${file} ${expected_file} | ||
execute_process( COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${file} ${expected_file} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changed this way because previous code was assuming code was checked out using LF end of files, but this is not the default git behavior on Windows. Note that |
||
RESULT_VARIABLE compare_result) | ||
if(compare_result) | ||
MESSAGE(FATAL_ERROR "File " ${file} " is different from expected file " ${expected_file}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,6 @@ set(TEST_DIR ${MAIN_TEST_DIR}/${TEST_DIR_NAME}) | |
set(EXPECTED_TEST_DIR ${MAIN_TEST_DIR}_reference/${TEST_DIR_NAME}) | ||
|
||
if(METRIX_RUN_ALL_TESTS) | ||
metrix_test("variantes_regroupees_complexe" 11) # no check here because of random and equivalent solutions | ||
metrix_test_no_check("variantes_regroupees_complexe" 11) # no check here because of random and equivalent solutions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that the comment saying There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well actually also happens on Ubuntu, but sporadically: https://github.com/powsybl/powsybl-metrix/actions/runs/11273050987/job/31349239541 |
||
endif() | ||
metrix_test("variantes_regroupees_simple" 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not really a cmake expert ... feedback welcome