diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 1537e63b9..4b1653064 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -284,8 +284,6 @@ jobs: -DLIBINT2_PYTHON=ON \ -DCMAKE_PREFIX_PATH="${CONDA_PREFIX}" \ ${{ matrix.cfg.libargs }} - cat build/build.ninja - ninja -t wincodepage cmake --build build --target install libint2-python-test - name: Test Libint library - unit tests diff --git a/export/cmake/CMakeLists.txt.export b/export/cmake/CMakeLists.txt.export index 9b88a43b8..c7dcbc640 100644 --- a/export/cmake/CMakeLists.txt.export +++ b/export/cmake/CMakeLists.txt.export @@ -191,8 +191,21 @@ set(LIBINT2_INSTALL_CMAKEDIR "lib/cmake/libint2" file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/srclist.cmake" LIBINT2_LIBRARY_CXX_SRC ENCODING UTF-8) set(LIB_CXX_SRC ) foreach(FN IN LISTS LIBINT2_LIBRARY_CXX_SRC) - message(WARNING "found source file src/${FN}") - list(APPEND LIB_CXX_SRC "src/${FN}") + set(srcfile "${CMAKE_CURRENT_SOURCE_DIR}/src/${FN}") + if (MSVC) + string(REGEX REPLACE "[a-zA-Z0-9_.]" "" NONASCII_FN "${FN}") + if (NONASCII_FN) + message(WARNING "Non-ASCII characters in filename ${FN}") + string(MAKE_C_IDENTIFIER "${FN}" C_FN) + if (FN STREQUAL C_FN) + message(FATAL_ERROR "Non-ASCII characters in filename ${FN} but C identifier is the same") + endif() + file(CREATE_LINK "${CMAKE_CURRENT_SOURCE_DIR}/src/${FN}" "${CMAKE_CURRENT_SOURCE_DIR}/src/${C_FN}" SYMBOLIC) + message(WARNING "Created symbolic link ${CMAKE_CURRENT_SOURCE_DIR}/src/${C_FN} -> ${CMAKE_CURRENT_SOURCE_DIR}/src/${FN}") + set(srcfile "${CMAKE_CURRENT_SOURCE_DIR}/src/${C_FN}") + endif() + endif(MSVC) + list(APPEND LIB_CXX_SRC "${srcfile}") endforeach() # Create object files to use for static and shared libraries add_library(libint2_obj OBJECT ${LIB_CXX_SRC} "src/configuration.cc")