diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a9c8c60c..ab97fbd5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -43,7 +43,9 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 - name: Configure + shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DENABLE_ALL=ON # We do the following in order to help ensure files are "flushed" # to disk before compilation is attempted @@ -52,7 +54,10 @@ jobs: powershell Write-VolumeCache D - name: Build - run: cd build && ninja -j2 -v + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" + cd build && ninja -j2 -v # TODO - if the loading isn't too extreme, it would be good to do a BRL-CAD # build against the output of this... @@ -83,7 +88,9 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 - name: Configure + shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Debug -DENABLE_ALL=ON # We do the following in order to help ensure files are "flushed" # to disk before compilation is attempted @@ -92,7 +99,10 @@ jobs: powershell Write-VolumeCache D - name: Build - run: cd build && ninja -j2 -v + shell: cmd + run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" + cd build && ninja -j2 -v # TODO - if the loading isn't too extreme, it would be good to do a BRL-CAD # build against the output of this... @@ -118,7 +128,9 @@ jobs: run: echo "$ENV{GITHUB_WORKSPACE}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 - name: Configure + shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" cmake -S . -B build -DENABLE_ALL=ON # We do the following in order to help ensure files are "flushed" # to disk before compilation is attempted @@ -127,7 +139,9 @@ jobs: powershell Write-VolumeCache D - name: Build + shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" cmake --build build --config Release -j2 windows_std_tools_debug: @@ -147,7 +161,9 @@ jobs: run: echo "$ENV{GITHUB_WORKSPACE}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 - name: Configure + shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" cmake -S . -B build -DENABLE_ALL=ON # We do the following in order to help ensure files are "flushed" # to disk before compilation is attempted @@ -156,7 +172,9 @@ jobs: powershell Write-VolumeCache D - name: Build + shell: cmd run: | + call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" cmake --build build --config Debug -j2 diff --git a/qt/qt_build.cmake.in b/qt/qt_build.cmake.in index fe6c8d04..a3d34319 100644 --- a/qt/qt_build.cmake.in +++ b/qt/qt_build.cmake.in @@ -12,13 +12,7 @@ else () message(WARNING "Unexpected CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} building Qt6") endif ("${CMAKE_BUILD_TYPE}" STREQUAL "" OR "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") - -if (WIN32) - file(TO_NATIVE_PATH "@VCVARS_BAT@" VCVARS_BAT_NATIVE) - execute_process(COMMAND "${VCVARS_BAT_NATIVE}" && "@CMAKE_COMMAND@" --build . ${QT_CMAKE_OPTS} RESULT_VARIABLE QT_RET WORKING_DIRECTORY "@QT_BUILD_DIR@" OUTPUT_VARIABLE MSG ERROR_VARIABLE MSG) -else (WIN32) - execute_process(COMMAND "@CMAKE_COMMAND@" --build . ${QT_CMAKE_OPTS} RESULT_VARIABLE QT_RET WORKING_DIRECTORY "@QT_BUILD_DIR@" OUTPUT_VARIABLE MSG ERROR_VARIABLE MSG) -endif (WIN32) +execute_process(COMMAND "@CMAKE_COMMAND@" --build . ${QT_CMAKE_OPTS} RESULT_VARIABLE QT_RET WORKING_DIRECTORY "@QT_BUILD_DIR@" OUTPUT_VARIABLE MSG ERROR_VARIABLE MSG) if (QT_RET) message(FATAL_ERROR "Qt build failed: ${MSG}\n") diff --git a/qt/qt_config.cmake.in b/qt/qt_config.cmake.in index 3594c66a..f42c3718 100644 --- a/qt/qt_config.cmake.in +++ b/qt/qt_config.cmake.in @@ -33,11 +33,7 @@ else () message(WARNING "Unexpected CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} preparing Qt6") endif ("${CMAKE_BUILD_TYPE}" STREQUAL "" OR "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") -if (WIN32) - execute_process(COMMAND "@VCVARS_BAT@" && @QT_SOURCE_DIR@/${CONFIG_FILE} ${CONFIG_EXTRA_OPTS} ${QT_CONFIG_OPTS} --prefix=@CMAKE_BUNDLE_INSTALL_PREFIX@ RESULT_VARIABLE QT_RET WORKING_DIRECTORY @QT_BUILD_DIR@ OUTPUT_VARIABLE MSG ERROR_VARIABLE MSG) -else (WIN32) - execute_process(COMMAND @QT_SOURCE_DIR@/${CONFIG_FILE} ${CONFIG_EXTRA_OPTS} ${QT_CONFIG_OPTS} --prefix=@CMAKE_BUNDLE_INSTALL_PREFIX@ RESULT_VARIABLE QT_RET WORKING_DIRECTORY @QT_BUILD_DIR@ OUTPUT_VARIABLE MSG ERROR_VARIABLE MSG) -endif (WIN32) +execute_process(COMMAND @QT_SOURCE_DIR@/${CONFIG_FILE} ${CONFIG_EXTRA_OPTS} ${QT_CONFIG_OPTS} --prefix=@CMAKE_BUNDLE_INSTALL_PREFIX@ RESULT_VARIABLE QT_RET WORKING_DIRECTORY @QT_BUILD_DIR@ OUTPUT_VARIABLE MSG ERROR_VARIABLE MSG) if (QT_RET) message(FATAL_ERROR "Qt configure failed: ${MSG}\n")