File tree Expand file tree Collapse file tree 4 files changed +23
-6
lines changed
Expand file tree Collapse file tree 4 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,18 @@ jobs:
4545 - uses : actions/checkout@v2
4646
4747 - name : Configure CMake
48- run : cmake -B build
48+ run : cmake --preset multi
4949
5050 - name : print config log
5151 if : ${{ failure() }}
5252 run : cat build/CMakeFiles/CMakeError.log
5353
5454 - name : Release build
55- run : cmake --build build
56-
55+ run : cmake --build --preset release
5756 - name : Release unit test
58- run : ctest --test-dir build --output-junit test-release-oneapi.xml
57+ run : ctest --preset release --output-junit test-release-oneapi.xml
58+
59+ - name : debug build
60+ run : cmake --build --preset debug
61+ - name : debug unit test
62+ run : ctest --preset debug --output-junit test-debug-oneapi.xml
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.20...3.21)
22
3+ get_property (is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
4+ if (NOT is_multi_config AND NOT (CMAKE_BUILD_TYPE OR DEFINED ENV{CMAKE_BUILD_TYPE }))
5+ set (CMAKE_BUILD_TYPE Release CACHE STRING "Release default" )
6+ endif ()
7+
38file (STRINGS ${CMAKE_CURRENT_SOURCE_DIR} /VERSION PROJECT_VERSION
49 REGEX "^([0-9]+\. [0-9]+\. [0-9]+)" LIMIT_INPUT 16 LENGTH_MAXIMUM 16 LIMIT_COUNT 1)
510
@@ -14,6 +19,12 @@ if(NOT DEFINED ${PROJECT_NAME}_BUILD_TESTING)
1419 set (${PROJECT_NAME} _BUILD_TESTING ${BUILD_TESTING} )
1520endif ()
1621
22+ if (CMAKE_GENERATOR STREQUAL "Ninja Multi-Config" )
23+ set (EXTPROJ_GENERATOR "Ninja" )
24+ else ()
25+ set (EXTPROJ_GENERATOR ${CMAKE_GENERATOR} )
26+ endif ()
27+
1728list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /cmake/Modules)
1829
1930include (cmake/options .cmake)
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.20...3.21 )
1+ cmake_minimum_required (VERSION 3.20...3.22 )
22# builds HDF5 library from scratch
33# note: the use of "lib" vs. CMAKE_STATIC_LIBRARY_PREFIX is deliberate based on the particulars of these libraries
44# across Intel Fortran on Windows vs. Gfortran on Windows vs. Linux.
@@ -73,6 +73,7 @@ ExternalProject_Add(HDF5
7373URL ${hdf5_url}
7474URL_HASH SHA256=${hdf5_sha256}
7575CMAKE_ARGS ${hdf5_cmake_args}
76+ CMAKE_GENERATOR ${EXTPROJ_GENERATOR}
7677BUILD_BYPRODUCTS ${HDF5_LIBRARIES}
7778DEPENDS ZLIB
7879CONFIGURE_HANDLED_BY_BUILD ON
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.20...3.21 )
1+ cmake_minimum_required (VERSION 3.20...3.22 )
22# build Zlib to ensure compatibility.
33# We use Zlib 2.x for speed and robustness.
44
@@ -33,6 +33,7 @@ ExternalProject_Add(ZLIB
3333URL ${zlib_url}
3434URL_HASH SHA256=${zlib_sha256}
3535CMAKE_ARGS ${zlib_cmake_args}
36+ CMAKE_GENERATOR ${EXTPROJ_GENERATOR}
3637BUILD_BYPRODUCTS ${ZLIB_LIBRARY}
3738CONFIGURE_HANDLED_BY_BUILD ON
3839INACTIVITY_TIMEOUT 15)
You can’t perform that action at this time.
0 commit comments