-
Notifications
You must be signed in to change notification settings - Fork 15
Mods to support spectra file IO out of fortran #34
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
base: master
Are you sure you want to change the base?
Changes from all commits
ba53a82
ab9e951
cc1b35f
0334e4d
aed541f
aca0c47
4b8bdc9
aefc329
fd24efd
17cc031
48421d9
0c59d47
8af3a3b
358b706
c89674c
4aef394
fb679da
45bed0e
c498e6d
e6032bb
738cd14
6d8371f
80d3ce5
7f4a595
2b03814
ae3c9a3
31cb465
af3631d
f39635e
0e27b16
62e653c
46dbbc5
936b7af
48a3268
8d547a3
9b195e4
a96f242
e0391ad
854b836
431c65c
2f35d06
e29f078
20c6e55
1b77e69
882b503
a1e4396
68babc7
6a07a20
d6e44d7
74d4418
13bb819
0caf7ca
3981033
cdc7ecd
0f58916
a80f9af
074926e
1047d13
9c6163e
9451d07
fee1904
02c71ab
a22e940
61f3224
65621cb
3018b0d
2ce11ec
dccb2e4
ee04054
5e97ccc
5408630
79d81cb
ba26b47
03d8889
960c637
6f55a3b
4e6c62b
6310f65
caab293
06fcc6e
56d8b78
679bf4e
53b5039
160b5bd
16643d3
1359228
e3ffee4
9adcc44
902074e
bb9fb76
f1c5e48
bf77e65
a93c8c8
5b47ea2
301ee76
ae11b15
7de1a45
2cceea1
874d8a5
cbfc685
1cd879c
0e9ebde
9ca9f3c
ef7c3dc
01c8443
d87b2db
ecf3d0e
4e70828
4f0f402
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 |
---|---|---|
|
@@ -28,8 +28,8 @@ jobs: | |
num-parse-method: FastFloat | ||
- os: windows-latest | ||
num-parse-method: FromChars | ||
- os: windows-latest | ||
num-parse-method: strtod | ||
# - os: windows-latest | ||
# num-parse-method: strtod | ||
|
||
steps: | ||
- name: Checkout code | ||
|
@@ -43,31 +43,105 @@ jobs: | |
# For linux, we will perform developer checks, so we need boost | ||
- name: Set up dependencies | ||
if: runner.os == 'Linux' | ||
run: sudo apt-get update && sudo apt-get install -y build-essential libboost-all-dev | ||
run: sudo apt-get update && sudo apt-get install -y build-essential libboost-all-dev gfortran zlib1g-dev | ||
|
||
- name: Create build directory | ||
run: mkdir build | ||
|
||
- name: Configure CMake on Windows | ||
if: runner.os == 'Windows' | ||
run: cmake -S ${{ github.workspace }} -B build -DSpecUtils_BUILD_UNIT_TESTS=ON -DSpecUtils_BUILD_REGRESSION_TEST=ON -DSpecUtils_ENABLE_EQUALITY_CHECKS=ON -DPERFORM_DEVELOPER_CHECKS=OFF -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=OFF -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON | ||
run: cmake -S ${{ github.workspace }} -B build -DSpecUtils_BUILD_UNIT_TESTS=ON -DSpecUtils_BUILD_REGRESSION_TEST=ON -DSpecUtils_ENABLE_EQUALITY_CHECKS=ON -DPERFORM_DEVELOPER_CHECKS=OFF -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=OFF -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON -DSpecUtils_C_BINDINGS=OFF -DCMAKE_INSTALL_PREFIX=install_prefix | ||
|
||
# On linux we will perform developer checks and compile as debug to catch asserts | ||
- name: Configure CMake on Linux | ||
if: runner.os == 'Linux' | ||
run: cmake -S ${{ github.workspace }} -B build -DSpecUtils_BUILD_UNIT_TESTS=ON -DSpecUtils_BUILD_REGRESSION_TEST=ON -DSpecUtils_ENABLE_EQUALITY_CHECKS=ON -DPERFORM_DEVELOPER_CHECKS=ON -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=ON -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON | ||
run: cmake -S ${{ github.workspace }} -B build -DSpecUtils_BUILD_UNIT_TESTS=ON -DSpecUtils_BUILD_REGRESSION_TEST=ON -DSpecUtils_ENABLE_EQUALITY_CHECKS=ON -DPERFORM_DEVELOPER_CHECKS=ON -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=OFF -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON -DSpecUtils_C_BINDINGS=ON -DSpecUtils_FORTRAN_SWIG=ON -DCMAKE_INSTALL_PREFIX=install_prefix | ||
|
||
- name: Configure CMake on macOS | ||
if: runner.os == 'macOS' | ||
run: cmake -S ${{ github.workspace }} -B build -DSpecUtils_BUILD_UNIT_TESTS=ON -DSpecUtils_BUILD_REGRESSION_TEST=ON -DSpecUtils_ENABLE_EQUALITY_CHECKS=ON -DPERFORM_DEVELOPER_CHECKS=OFF -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=ON -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON | ||
run: cmake -S ${{ github.workspace }} -B build -DSpecUtils_BUILD_UNIT_TESTS=ON -DSpecUtils_BUILD_REGRESSION_TEST=ON -DSpecUtils_ENABLE_EQUALITY_CHECKS=ON -DPERFORM_DEVELOPER_CHECKS=OFF -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=ON -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON -DSpecUtils_C_BINDINGS=ON -DCMAKE_INSTALL_PREFIX=install_prefix | ||
|
||
- name: Build macOS and Windows | ||
if: runner.os != 'Linux' | ||
run: cmake --build build --config Release | ||
|
||
- name: Build Linux | ||
if: runner.os == 'Linux' | ||
run: cmake --build build --config Debug | ||
run: cmake --build build --config Release -j $(nproc) | ||
|
||
- name: Run tests | ||
run: ctest --test-dir build -C Release | ||
run: ctest --rerun-failed --output-on-failure --test-dir build -C Release | ||
|
||
- name: Package Lib | ||
if: runner.os == 'Windows' | ||
run: | | ||
cmake -S ${{ github.workspace }} -B build_static_lib_shared_runtime -DSpecUtils_BUILD_UNIT_TESTS=OFF -DSpecUtils_BUILD_REGRESSION_TEST=OFF -DSpecUtils_ENABLE_EQUALITY_CHECKS=OFF -DPERFORM_DEVELOPER_CHECKS=OFF -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=OFF -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON -DCMAKE_INSTALL_PREFIX=install_prefix_static_lib_shared_runtime -DSpecUtils_USE_MSVC_MultiThreadDLL=ON -DSpecUtils_SHARED_LIB=OFF | ||
cmake --build build_static_lib_shared_runtime --config Release --target package | ||
echo "Files present after package build_static_lib_shared_runtime" | ||
ls | ||
ls build_static_lib_shared_runtime | ||
ls build_static_lib_shared_runtime/Release | ||
ls build_static_lib_shared_runtime/x64/Release | ||
# | ||
cmake -S ${{ github.workspace }} -B build_shared_lib_shared_runtime -DSpecUtils_BUILD_UNIT_TESTS=OFF -DSpecUtils_BUILD_REGRESSION_TEST=OFF -DSpecUtils_ENABLE_EQUALITY_CHECKS=OFF -DPERFORM_DEVELOPER_CHECKS=OFF -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=OFF -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON -DCMAKE_INSTALL_PREFIX=install_prefix_build_shared_lib_shared_runtime -DSpecUtils_USE_MSVC_MultiThreadDLL=ON -DSpecUtils_SHARED_LIB=ON | ||
cmake --build build_shared_lib_shared_runtime --config Release --target package | ||
echo "Files present after package build_shared_lib_shared_runtime" | ||
ls | ||
ls build_shared_lib_shared_runtime | ||
ls build_shared_lib_shared_runtime/Release | ||
ls build_shared_lib_shared_runtime/x64/Release | ||
# | ||
cmake -S ${{ github.workspace }} -B build_shared_lib_static_runtime -DSpecUtils_BUILD_UNIT_TESTS=OFF -DSpecUtils_BUILD_REGRESSION_TEST=OFF -DSpecUtils_ENABLE_EQUALITY_CHECKS=OFF -DPERFORM_DEVELOPER_CHECKS=OFF -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=OFF -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON -DCMAKE_INSTALL_PREFIX=install_prefix_build_shared_lib_static_runtime -DSpecUtils_USE_MSVC_MultiThreadDLL=OFF -DSpecUtils_SHARED_LIB=ON | ||
cmake --build build_shared_lib_static_runtime --config Release --target package | ||
echo "Files present after package build_shared_lib_static_runtime" | ||
ls | ||
ls build_shared_lib_static_runtime | ||
ls build_shared_lib_static_runtime/Release | ||
ls build_shared_lib_static_runtime/x64/Release | ||
# | ||
cmake -S ${{ github.workspace }} -B build_static_lib_static_runtime -DSpecUtils_BUILD_UNIT_TESTS=OFF -DSpecUtils_BUILD_REGRESSION_TEST=OFF -DSpecUtils_ENABLE_EQUALITY_CHECKS=OFF -DPERFORM_DEVELOPER_CHECKS=OFF -DSpecUtils_ENABLE_D3_CHART=ON -DSpecUtils_D3_SUPPORT_FILE_STATIC=ON -DSpecUtils_ENABLE_URI_SPECTRA=OFF -DCMAKE_BUILD_TYPE=Release -DSpecUtils_FLT_PARSE_METHOD=${{ matrix.num-parse-method }} -DSpecUtils_FETCH_FAST_FLOAT=ON -DCMAKE_INSTALL_PREFIX=install_prefix_build_static_lib_static_runtime -DSpecUtils_USE_MSVC_MultiThreadDLL=OFF -DSpecUtils_SHARED_LIB=OFF | ||
cmake --build build_static_lib_static_runtime --config Release --target package | ||
echo "Files present after package build_static_lib_static_runtime" | ||
ls | ||
ls build_static_lib_static_runtime | ||
ls build_static_lib_static_runtime/Release | ||
ls build_static_lib_static_runtime/x64/Release | ||
|
||
|
||
# Update the bleeding-edge tag to be current commit | ||
- name: Run latest-tag | ||
uses: EndBug/[email protected] | ||
if: matrix.os == 'Windows' | ||
with: | ||
ref: bleeding-edge | ||
description: Latest successful automated build | ||
|
||
- name: Upload windows build to GitHub Artifact | ||
uses: actions/upload-artifact@v4 | ||
if: runner.os == 'Windows' | ||
with: | ||
name: SpecUtils_${{ runner.os }}_latest | ||
path: '.\build_*\*.zip' | ||
|
||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
if: runner.os == 'Windows' | ||
with: | ||
artifacts: '.\build_*\*.zip' | ||
draft: false | ||
prerelease: true | ||
body: "An automated, and untested build of the latest code pushed to the repository." | ||
allowUpdates: true | ||
generateReleaseNotes: false | ||
name: "Bleeding Edge Build" | ||
removeArtifacts: true | ||
replacesArtifacts: true | ||
tag: 'bleeding-edge' | ||
commit: ${{ github.sha }} | ||
makeLatest: true | ||
# Delete all the zip files we created | ||
- name: "Cleanup and finish" | ||
if: runner.os == 'Windows' | ||
run: | | ||
Get-ChildItem '.\build_*\*.zip' | foreach { Remove-Item -Path $_.FullName } | ||
echo "Job status is ${{ job.status }}." |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,11 @@ if(${CMAKE_VERSION} VERSION_LESS 3.12) | |
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) | ||
endif() | ||
|
||
project( SpecUtils VERSION 1.0.0 ) | ||
project( SpecUtils VERSION 2025.1.0 ) | ||
enable_testing() # Enable here to allow running `ctest` from top-most build dir | ||
|
||
# Add this line to specify the architectures for MacOS | ||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for MacOS" FORCE) | ||
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. @wcjohns so everything builds ok but macos*. Copilot said to add this but that didn't help. 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. 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. We can probably remove that added line; I think the macOS architectures are set by the nanobind stuff. I just triggered a build on the main branch, and it ran fine. Below is the step that is installing stuff into the python package: And the actual error: |
||
|
||
option( SpecUtils_ENABLE_D3_CHART "Enables exporting of the D3 chart format" ON ) | ||
option( SpecUtils_D3_SUPPORT_FILE_STATIC "Compiles the JS and CSS files into memory, rather than reading files on disk; disable to allow changing JS/CSS without having to recompile" ON ) | ||
|
@@ -20,6 +24,9 @@ option( SpecUtils_BUILD_FUZZING_TESTS "Builds fuzzing tests, requires clang" OFF | |
option( SpecUtils_BUILD_REGRESSION_TEST "Creates executable to perform interactive regression test" OFF ) | ||
option( SpecUtils_BUILD_EXAMPLE "Builds example SpecUtil applications" OFF ) | ||
option( SpecUtils_JAVA_SWIG "Creates swig/java bindings to the c++ code" OFF ) | ||
option( SpecUtils_FORTRAN_SWIG "Enables build/test of swig/FORTRAN bindings" OFF ) | ||
option( SpecUtils_FORTRAN_SWIG_GEN "When this is on, cmake will attemp to generate swig fortran bindings. | ||
Requires swig-fortran: https://github.com/swig-fortran/swig" OFF ) | ||
option( SpecUtils_C_BINDINGS "Creates C bindings to the c++ code" OFF ) | ||
option( SpecUtils_INJA_TEMPLATES "Creates inja template interface" OFF ) | ||
option( SpecUtils_USE_SIMD "Use SIMD operations; i386/x64 only right now, and very alpha, and extremely minimally used" OFF ) | ||
|
@@ -256,6 +263,19 @@ endif( SpecUtils_SHARED_LIB ) | |
add_library( SpecUtils ${SpecUtils_LIB_TYPE} ${sources} ${headers} ${OTHER_SUPPORT_FILES} ) | ||
set_target_properties( SpecUtils PROPERTIES PREFIX "lib" OUTPUT_NAME "SpecUtils" ) | ||
|
||
|
||
# Include the GenerateExportHeader module | ||
include(GenerateExportHeader) | ||
generate_export_header(SpecUtils | ||
BASE_NAME SpecUtils | ||
EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/SpecUtilsExport.h | ||
) | ||
|
||
if( NOT SpecUtils_SHARED_LIB ) | ||
target_compile_definitions( SpecUtils PRIVATE SPECUTILS_STATIC_DEFINE ) | ||
endif() | ||
|
||
|
||
set( SpecUtils_USE_FAST_FLOAT OFF ) # Uses https://github.com/fastfloat/fast_float . If fast_float.h isnt found, will be fetched | ||
set( SpecUtils_USE_FROM_CHARS OFF ) # Supported by MSVC >= 2019, and gcc >= 12. Not supported by Apple clang. In MSVC, about 50% slower than boost::spirit | ||
set( SpecUtils_USE_BOOST_SPIRIT OFF ) # Uses boost::spirit, and fasted method (maybe a hair faster than fastfloat) | ||
|
@@ -308,7 +328,7 @@ if( SpecUtils_USE_FAST_FLOAT ) | |
FetchContent_GetProperties( fast_float ) | ||
FetchContent_MakeAvailable( fast_float ) | ||
|
||
target_include_directories( SpecUtils PUBLIC ${fast_float_SOURCE_DIR} ) | ||
target_include_directories( SpecUtils PRIVATE ${fast_float_SOURCE_DIR} ) | ||
endif( SpecUtils_FETCH_FAST_FLOAT ) | ||
endif( NOT FAST_FLOAT_FILE_PATH ) | ||
endif( SpecUtils_USE_FAST_FLOAT ) | ||
|
@@ -383,6 +403,9 @@ if( SpecUtils_JAVA_SWIG ) | |
target_link_libraries( SpecUtils PUBLIC ${JAVA_LIBRARIES} ) | ||
endif( SpecUtils_JAVA_SWIG ) | ||
|
||
if( SpecUtils_FORTRAN_SWIG ) | ||
add_subdirectory(bindings/swig/fortran) | ||
endif( SpecUtils_FORTRAN_SWIG ) | ||
|
||
if( MINGW ) | ||
target_link_libraries( SpecUtils PUBLIC -static-libgcc -static libshlwapi.a libpthread.a libstdc++.a libwinpthread.a libmsvcrt.a ) | ||
|
@@ -393,8 +416,8 @@ elseif( WIN32 ) | |
target_link_libraries( SpecUtils PUBLIC "Shlwapi.lib" ) | ||
endif( MINGW ) | ||
|
||
target_include_directories( SpecUtils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} | ||
PRIVATE ${THIRD_PARTY_DIR} ) | ||
target_include_directories( SpecUtils PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> | ||
PRIVATE ${THIRD_PARTY_DIR} ${PYTHON_INCLUDE_DIRS} ) | ||
|
||
if( SpecUtils_BUILD_REGRESSION_TEST ) | ||
if( NOT SpecUtils_ENABLE_EQUALITY_CHECKS ) | ||
|
@@ -406,8 +429,7 @@ endif( SpecUtils_BUILD_REGRESSION_TEST ) | |
|
||
|
||
if( SpecUtils_BUILD_UNIT_TESTS ) | ||
enable_testing() # Enable here to allow running `ctest` from top-most build dir | ||
|
||
include (CTest) | ||
add_subdirectory( unit_tests ) | ||
endif( SpecUtils_BUILD_UNIT_TESTS ) | ||
|
||
|
@@ -416,9 +438,81 @@ if( SpecUtils_BUILD_FUZZING_TESTS ) | |
add_subdirectory( fuzz_test ) | ||
endif( SpecUtils_BUILD_FUZZING_TESTS ) | ||
|
||
set_property( TARGET SpecUtils PROPERTY POSITION_INDEPENDENT_CODE ON ) | ||
|
||
set( SpecUtils_config_OUT ${CMAKE_CURRENT_BINARY_DIR}/SpecUtils_config.h ) | ||
configure_file( | ||
${CMAKE_CURRENT_SOURCE_DIR}/SpecUtils/SpecUtils_config.h.in | ||
${CMAKE_CURRENT_BINARY_DIR}/SpecUtils_config.h | ||
${SpecUtils_config_OUT} | ||
) | ||
LIST(APPEND headers ${SpecUtils_config_OUT}) | ||
|
||
get_directory_property(hasParent PARENT_DIRECTORY) | ||
if( NOT hasParent ) | ||
# Specify installation rules | ||
include(GNUInstallDirs) | ||
|
||
|
||
# Install the library | ||
install(TARGETS SpecUtils | ||
EXPORT SpecUtilsTargets | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # For shared libraries on UNIX-like systems | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # For static libraries and import libraries on Windows | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # For DLLs | ||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
) | ||
|
||
# Install the headers | ||
install(FILES ${headers} ${CMAKE_BINARY_DIR}/SpecUtilsExport.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SpecUtils) | ||
|
||
# Create and install the CMake package configuration files | ||
include(CMakePackageConfigHelpers) | ||
|
||
write_basic_package_version_file( | ||
"${CMAKE_CURRENT_BINARY_DIR}/SpecUtilsConfigVersion.cmake" | ||
VERSION ${PROJECT_VERSION} | ||
COMPATIBILITY AnyNewerVersion | ||
) | ||
|
||
configure_package_config_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/SpecUtilsConfig.cmake.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/SpecUtilsConfig.cmake" | ||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SpecUtils | ||
) | ||
|
||
install(FILES | ||
"${CMAKE_CURRENT_BINARY_DIR}/SpecUtilsConfig.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/SpecUtilsConfigVersion.cmake" | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SpecUtils | ||
) | ||
|
||
install(EXPORT SpecUtilsTargets | ||
FILE SpecUtilsTargets.cmake | ||
NAMESPACE SpecUtils:: | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SpecUtils | ||
) | ||
|
||
set(CPACK_PACKAGE_NAME "SpecUtils") | ||
|
||
|
||
if( SpecUtils_SHARED_LIB ) | ||
set( SpecUtils_PACKAGE_POSTFIX "SharedLib" ) | ||
else( SpecUtils_SHARED_LIB ) | ||
set( SpecUtils_PACKAGE_POSTFIX "StaticLib" ) | ||
endif( SpecUtils_SHARED_LIB ) | ||
|
||
if( DEFINED ${PROJECT_NAME}_USE_MSVC_MultiThreadDLL ) | ||
if( ${PROJECT_NAME}_USE_MSVC_MultiThreadDLL ) | ||
set( SpecUtils_PACKAGE_POSTFIX "${SpecUtils_PACKAGE_POSTFIX}-SharedRuntime" ) | ||
else() | ||
set( SpecUtils_PACKAGE_POSTFIX "${SpecUtils_PACKAGE_POSTFIX}-StaticRuntime" ) | ||
endif() | ||
endif() | ||
|
||
# Lets just use the MAJOR.MINOR version of the compiler in the name. | ||
string(REGEX MATCH "^[0-9]+\\.[0-9]+" COMPILER_VERSION_SHORT "${CMAKE_CXX_COMPILER_VERSION}") | ||
|
||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-${COMPILER_VERSION_SHORT}-${SpecUtils_PACKAGE_POSTFIX}") | ||
set(CPACK_GENERATOR "ZIP") | ||
include(CPack) | ||
endif( NOT hasParent ) |
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.
If
SpecUtils_FLT_PARSE_METHOD
is left as 'default_value' here, there is some logic below to hopefully pick the most reasonable float parsing method. Like for MSVC ≥2019, it should pick 'FromChars'.Is there is reason to default to the slowest common denominator, or was it giving you an issue?