diff --git a/.github/actions/build-cse/action.yml b/.github/actions/build-cse/action.yml index 7c31e539e..0b0365ce7 100644 --- a/.github/actions/build-cse/action.yml +++ b/.github/actions/build-cse/action.yml @@ -1,14 +1,31 @@ name: "Build CSE" description: "Get git info (for version) and build CSE executable" +inputs: + arch: + description: Target architecture ("32" or "64" bit) + default: "32" + config: + description: Configuration (Release or Debug) + default: Release + compiler: + description: Compiler used for windows builds (clang or msvc) + default: msvc + build_dir: + description: Relative path to the build directory + default: build runs: using: composite steps: - name: Get branch name uses: tj-actions/branch-names@v6.4 id: branch-name + - name: Install Linux Libraries + if: runner.os == 'Linux' + shell: bash + run: sudo apt-get update && sudo apt-get -y install xorg-dev libgl1-mesa-dev - name: Save branch name run: echo "CI_GIT_BRANCH=${{steps.branch-name.outputs.current_branch}}" >> $GITHUB_ENV shell: bash - - name: Build - shell: cmd - run: build.bat + - name: Build and Configure + shell: bash + run: cmake -DBUILD_ARCHITECTURE=${{ inputs.arch }} -DCOMPILER_ID=${{ inputs.compiler }} -DCONFIGURATION=${{ inputs.config }} -DTARGET_NAME=CSE -DBUILD_DIRECTORY=${{ inputs.build_dir }} -P cmake/configure-and-build.cmake diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 2a00b85ac..b975a6e30 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -19,3 +19,6 @@ runs: run: rake shell: bash working-directory: doc + env: + CSE_EXE_PATH: ..\\build\\CSE.exe + diff --git a/.github/actions/download-cse-artifact/action.yml b/.github/actions/download-cse-artifact/action.yml index ee2234e2e..6cb503be6 100644 --- a/.github/actions/download-cse-artifact/action.yml +++ b/.github/actions/download-cse-artifact/action.yml @@ -6,5 +6,5 @@ runs: - name: Download executable artifact uses: actions/download-artifact@v4 with: - name: CSE.exe - path: msvc + name: CSE_windows-2022-32bit_Release + path: build diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f48d1159f..36d18aad6 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -4,11 +4,46 @@ on: push jobs: build-cse: - name: Build and test CSE - runs-on: windows-2022 + strategy: + fail-fast: false + matrix: + include: + - os: windows + os_ver: "2022" + config: Release + arch: "32" + compiler: msvc + experimental: false + - os: windows + os_ver: "2022" + config: Release + arch: "64" + compiler: msvc + experimental: true + - os: windows + os_ver: "2022" + config: Release + arch: "64" + compiler: clang + experimental: true + - os: macos + os_ver: "11" + config: Release + arch: "64" + compiler: clang + experimental: true + - os: ubuntu + os_ver: "22.04" + config: Release + arch: "64" + compiler: gcc + experimental: true defaults: run: shell: bash + name: ${{ matrix.os }}-${{ matrix.os_ver }}-${{ matrix.compiler }}-${{ matrix.arch }}bit ${{ matrix.config }} + runs-on: ${{ matrix.os }}-${{ matrix.os_ver }} + continue-on-error: ${{ matrix.experimental }} steps: - name: Checkout uses: actions/checkout@v4 @@ -17,27 +52,32 @@ jobs: submodules: recursive - name: Build CSE uses: ./.github/actions/build-cse + with: + arch: ${{ matrix.arch }} + config: ${{ matrix.config }} + compiler: ${{ matrix.compiler }} - name: Build cse_tests.exe (unit tests) - run: cmake --build . --config Release --target cse_tests - working-directory: msvc/build - - name: Upload cse.exe artifact + run: cmake -DBUILD_ARCHITECTURE=${{ matrix.arch }} -DCONFIGURATION=${{ matrix.config }} -DTARGET_NAME=cse_tests -DBUILD_DIRECTORY=build -P cmake/build.cmake + - name: Upload executable artifact uses: actions/upload-artifact@v4 with: - name: CSE.exe - path: msvc/CSE.exe + name: CSE_${{ matrix.os }}-${{ matrix.os_ver }}-${{ matrix.arch }}bit_${{ matrix.config }} + path: build/CSE* - name: Build wcmp executable - run: cmake --build . --config Release --target wcmp - working-directory: msvc/build + run: cmake -DBUILD_ARCHITECTURE=${{ matrix.arch }} -DCONFIGURATION=${{ matrix.config }} -DTARGET_NAME=wcmp -DBUILD_DIRECTORY=build -P cmake/build.cmake # - name: Setup Mesa3D # uses: bigladder/github-actions/setup-mesa3d@main # with: # install-directory: msvc - name: Test - run: ctest -C Release -j 2 --output-on-failure -E shadetest # CI can't do GPU calcs at this time (the steps above get us close, but throws an exception on destruction) - working-directory: msvc/build + run: ctest -C ${{ matrix.config }} -j 2 --output-on-failure -E shadetest # CI can't do GPU calcs at this time (the steps above get us close, but throws an exception on destruction) + working-directory: build build-doc: + strategy: + fail-fast: false name: Build CSE documentation needs: build-cse + if: ${{ always() }} runs-on: windows-2022 steps: - name: Checkout @@ -51,6 +91,8 @@ jobs: - name: Run coverage check run: rake coverage working-directory: doc + env: + CSE_EXE_PATH: ..\\build\\CSE.exe - name: Upload documentation uses: actions/upload-artifact@v4 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index af778f74a..1603b7947 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project(CSE) # target_link_libraries() allows use with targets in other directories. Set to new in 3.13 or higher. cmake_policy(SET CMP0079 NEW) -set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") +set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") # Only create Release and Debug configuration types # Set a default build type if none was specified @@ -32,12 +32,31 @@ if(NOT CSE_BUILD_ARCHITECTURE) set_property(CACHE CSE_BUILD_ARCHITECTURE PROPERTY STRINGS "32" "64") else() if(NOT WIN32 AND CSE_BUILD_ARCHITECTURE STREQUAL "32") - # TODO: Warn if 32 used on MacOS or Linux and set to 64 message(WARNING "CSE_BUILD_ARCHITECTURE was set to '32', but is not supported on Unix systems.") set(CSE_BUILD_ARCHITECTURE "64" CACHE STRING "Choose architecture size for the build." FORCE) endif() endif() +# Build OS +if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(CSE_OS_NAME "macos") +elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + set(CSE_OS_NAME "win") +else() + string(TOLOWER ${CMAKE_SYSTEM_NAME} CSE_OS_NAME) +endif() + +# Build Compiler +if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") + set(CSE_COMPILER_NAME "gcc") +else() + string(TOLOWER ${CMAKE_CXX_COMPILER_ID} CSE_COMPILER_NAME) +endif() + +if(NOT DEFINED CSE_EXECUTABLE_DIRECTORY) + set(CSE_EXECUTABLE_DIRECTORY ${CMAKE_BINARY_DIR}) +endif() + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") include(BuildFlags) diff --git a/build.bat b/build.bat index 797289d01..ac04266ad 100644 --- a/build.bat +++ b/build.bat @@ -5,13 +5,11 @@ if "%console_mode%"=="" (set console_mode=1& for %%x in (%cmdcmdline%) do if /i set arch="32" if "%1"=="64" (set arch="%1") -cmake -DBUILD_ARCHITECTURE=%arch% -P cmake/configure.cmake -if %errorlevel% neq 0 ( - if "%parent%"=="%~0" ( if "%console_mode%"=="0" pause ) - exit /B %errorlevel% -) +set compiler="msvc" +if "%2"=="clang" (set compiler="clang") + -cmake -DBUILD_ARCHITECTURE=%arch% -P cmake/build.cmake +cmake -DBUILD_ARCHITECTURE=%arch% -DCONFIGURATION=Release -DCOMPILER_ID=%compiler% -P cmake/configure-and-build.cmake if %errorlevel% neq 0 ( if "%parent%"=="%~0" ( if "%console_mode%"=="0" pause ) exit /B %errorlevel% diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..38182a428 --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +cmake -DCONFIGURATION=Release -P cmake/configure-and-build.cmake \ No newline at end of file diff --git a/cmake/build.cmake b/cmake/build.cmake index de0e68dfe..29d474653 100644 --- a/cmake/build.cmake +++ b/cmake/build.cmake @@ -1,14 +1,24 @@ -message("Building CSE...") -set(BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build) -if ("${BUILD_ARCHITECTURE}" STREQUAL "64") - set(BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build64) -endif() +if (NOT DEFINED TARGET_NAME) + if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") + set(TARGET_NAME "ALL_BUILD") # Needed for MSVC (not necessarily all Windows builds) + else () + set(TARGET_NAME "all") + endif () +endif () +message("Building ${TARGET_NAME}...") + +include(cmake/utility.cmake) +set_build_configuration() +if (NOT DEFINED BUILD_DIRECTORY) + set(BUILD_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/builds/${BUILD_CONFIGURATION}") +endif () + execute_process(COMMAND ${CMAKE_COMMAND} - --build ${BUILD_DIR} - --config Release - --target CSE - -- -m - WORKING_DIRECTORY ${BUILD_DIR} + --build . + --config ${CONFIGURATION} + --target ${TARGET_NAME} + -j + WORKING_DIRECTORY ${BUILD_DIRECTORY} RESULT_VARIABLE success ) if (${success} MATCHES "0") diff --git a/cmake/configure-and-build.cmake b/cmake/configure-and-build.cmake new file mode 100644 index 000000000..fa7a4a331 --- /dev/null +++ b/cmake/configure-and-build.cmake @@ -0,0 +1,2 @@ +include(cmake/configure.cmake) +include(cmake/build.cmake) \ No newline at end of file diff --git a/cmake/configure.cmake b/cmake/configure.cmake index 92dc4bb53..708f5c323 100644 --- a/cmake/configure.cmake +++ b/cmake/configure.cmake @@ -1,17 +1,35 @@ -set(TARGET_VS_ARCHITECTURE Win32) -set(BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build) -if ("${BUILD_ARCHITECTURE}" STREQUAL "64") - set(TARGET_VS_ARCHITECTURE x64) - set(BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build64) +include(cmake/utility.cmake) +set_build_configuration() +if (NOT DEFINED BUILD_DIRECTORY) + set(BUILDS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/builds") + set(BUILD_DIRECTORY "${BUILDS_DIRECTORY}/${BUILD_CONFIGURATION}") + set(EXECUTABLE_DIRECTORY ${BUILDS_DIRECTORY}) +endif () + +file(MAKE_DIRECTORY ${BUILD_DIRECTORY}) + +set(configure_command ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -DCSE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}) + +if (DEFINED EXECUTABLE_DIRECTORY) + set(configure_command ${configure_command} -DCSE_EXECUTABLE_DIRECTORY=${EXECUTABLE_DIRECTORY}) +endif () + +if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") + if (${COMPILER_ID} STREQUAL "msvc") + set(configure_command ${configure_command} -T v142,version=14.29.16.11 -A ${TARGET_VS_ARCHITECTURE} -DCMAKE_SYSTEM_VERSION=10.0.20348.0) + elseif(${COMPILER_ID} STREQUAL "clang") + set(configure_command ${configure_command} -T ClangCL -A ${TARGET_VS_ARCHITECTURE}) + endif () +else() + set(configure_command ${configure_command} -DCMAKE_BUILD_TYPE=${CONFIGURATION}) endif() -message("Making build directory: ${BUILD_DIR}") -file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc) -file(MAKE_DIRECTORY ${BUILD_DIR}) + message("Generating project files...") -execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142,version=14.29.16.11 -A ${TARGET_VS_ARCHITECTURE} -DCSE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE} -DCMAKE_SYSTEM_VERSION=10.0.20348.0 - WORKING_DIRECTORY ${BUILD_DIR} - RESULT_VARIABLE success +execute_process(COMMAND ${configure_command} + WORKING_DIRECTORY ${BUILD_DIRECTORY} + RESULT_VARIABLE success ) + if (NOT ${success} MATCHES "0") message(FATAL_ERROR "Generation step failed.") endif() \ No newline at end of file diff --git a/cmake/diff-failed.cmake b/cmake/diff-failed.cmake index 43bcf4d5d..9cdb39253 100644 --- a/cmake/diff-failed.cmake +++ b/cmake/diff-failed.cmake @@ -7,7 +7,7 @@ if(EXISTS ${testLog}) string(REGEX REPLACE "[0-9]+:([^;].*).Regression" "\\1" test_name "${test}") string(TOUPPER ${test_name} test_name) message("Diffing: ${test_name}.REP") - execute_process(COMMAND bc4.bat "${test_name}.REP" "ref/${test_name}.REP" + execute_process(COMMAND bc4.bat "${test_name}.REP" "${ref_dir}/${test_name}.REP" WORKING_DIRECTORY ${test_dir} RESULT_VARIABLE success ) diff --git a/cmake/update-failed.cmake b/cmake/update-failed.cmake index c43bf8740..f28a99483 100644 --- a/cmake/update-failed.cmake +++ b/cmake/update-failed.cmake @@ -7,7 +7,7 @@ if(EXISTS ${testLog}) string(REGEX REPLACE "[0-9]+:([^;].*).Regression" "\\1" test_name "${test}") string(TOUPPER ${test_name} test_name) message("Updating: ${test_name}.REP") - execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${test_name}.REP" "ref/${test_name}.REP" + execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${test_name}.REP" "${ref_dir}/${test_name}.REP" WORKING_DIRECTORY ${test_dir} RESULT_VARIABLE success ) diff --git a/cmake/utility.cmake b/cmake/utility.cmake new file mode 100644 index 000000000..7448044cf --- /dev/null +++ b/cmake/utility.cmake @@ -0,0 +1,32 @@ +macro(set_build_configuration) + if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") + set(OS_ID "win") + if (NOT DEFINED COMPILER_ID) + set(COMPILER_ID "msvc") + endif () + if (NOT DEFINED BUILD_ARCHITECTURE) + set(BUILD_ARCHITECTURE "32") + endif () + if ("${BUILD_ARCHITECTURE}" STREQUAL "64") + set(TARGET_VS_ARCHITECTURE "x64") + else () + set(TARGET_VS_ARCHITECTURE "Win32") + endif () + else () + if (NOT DEFINED CONFIGURATION) + set(CONFIGURATION Release) + endif () + string(TOLOWER "-${CONFIGURATION}" CONFIGURATION_STRING) + if (NOT DEFINED BUILD_ARCHITECTURE) + set(BUILD_ARCHITECTURE "64") + endif () + if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin") + set(OS_ID "macos") + set(COMPILER_ID "appleclang") + elseif ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") + set(OS_ID "linux") + set(COMPILER_ID "gcc") + endif () + endif () + set(BUILD_CONFIGURATION "${OS_ID}${BUILD_ARCHITECTURE}-${COMPILER_ID}${CONFIGURATION_STRING}") +endmacro() diff --git a/doc/lib/cse.rb b/doc/lib/cse.rb index 5f3875721..de7ecc2ac 100644 --- a/doc/lib/cse.rb +++ b/doc/lib/cse.rb @@ -7,10 +7,12 @@ module CSE # Create an Alias C = Command + cse_path = ENV.has_key?('CSE_EXE_PATH') ? ENV['CSE_EXE_PATH'] : '..\\builds\\cse' + # (Or (Array String) String) ?String -> String # Given an array of strings of options to cse and an optional input to Run = lambda do |opts, input=nil| - C::Run['..\\msvc\\cse', opts, input] + C::Run[cse_path, opts, input] end CullList = lambda do diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 913b4454a..dcdfa4e86 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,9 @@ add_custom_command( WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) +# Needed to establish dependency for other targets that depend on dtypes.h +add_custom_target(generate_dtypes DEPENDS ${CSE_BINARY_DIR}/src/dtypes.h) + # Set CSE Version add_custom_target(version_header DEPENDS "${PROJECT_SOURCE_DIR}/src/csevrsn.in.h" @@ -269,20 +272,24 @@ target_link_libraries(CSE PRIVATE ${libs}) add_dependencies(CSE version_header) -set(exeDir "${CMAKE_SOURCE_DIR}/msvc") # TODO: Change for other platforms. Alternatively, Bin/..? +if (${CSE_COMPILER_NAME} STREQUAL "msvc" AND ${CSE_BUILD_ARCHITECTURE} STREQUAL "32") + set(executable_name "CSE") + set(debug_postfix "d") +else() + set(executable_name "cse-${CSE_COMPILER_NAME}-${CSE_BUILD_ARCHITECTURE}") + set(debug_postfix "-debug") +endif () -if ("${CSE_BUILD_ARCHITECTURE}" STREQUAL "64") - set_target_properties(CSE PROPERTIES - OUTPUT_NAME "CSE64" - ) -endif() +set_target_properties(CSE PROPERTIES + OUTPUT_NAME "${executable_name}" +) set_target_properties(CSE PROPERTIES - DEBUG_POSTFIX "d" + DEBUG_POSTFIX "${debug_postfix}" ) foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG_CAPS) - set_target_properties(CSE PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG_CAPS} ${exeDir}) + set_target_properties(CSE PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG_CAPS} ${CSE_EXECUTABLE_DIRECTORY}) endforeach() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2d5e146cc..aad320e94 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,11 +5,7 @@ add_subdirectory(wcmp) add_subdirectory(error_handling) -if ("${CSE_BUILD_ARCHITECTURE}" STREQUAL "64") - set( refdir "ref64") -else() - set( refdir "ref") -endif() +set( ref_dir "ref-${CSE_OS_NAME}${CSE_BUILD_ARCHITECTURE}-${CSE_COMPILER_NAME}") macro(make_cse_test case) get_filename_component(test_name ${case} NAME_WE) @@ -19,11 +15,13 @@ macro(make_cse_test case) WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" ) - add_test(NAME ${test_name}.Regression - COMMAND $ "${CMAKE_CURRENT_SOURCE_DIR}/${test_name}.rep" "${CMAKE_CURRENT_SOURCE_DIR}/${refdir}/${test_name}.rep" "!" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - ) - set_tests_properties(${test_name}.Regression PROPERTIES DEPENDS ${test_name}.Run) + if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ref_dir}") + add_test(NAME ${test_name}.Regression + COMMAND $ "${CMAKE_CURRENT_SOURCE_DIR}/${test_name}.rep" "${CMAKE_CURRENT_SOURCE_DIR}/${ref_dir}/${test_name}.rep" "!" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + ) + set_tests_properties(${test_name}.Regression PROPERTIES DEPENDS ${test_name}.Run) + endif () endmacro() make_cse_test(minimum_running_file.cse) @@ -88,7 +86,15 @@ make_cse_test(CRTerminalAH) make_cse_test(MF8X) make_cse_test(ExportFileOutput -DEXPORT_FILE_ABSOLUTE_PATH="${CMAKE_SOURCE_DIR}/test/absolutePathEXPORTFILE.csv") -configure_file("diff.bat.in" "${CMAKE_BINARY_DIR}/diff.bat") -configure_file("update.bat.in" "${CMAKE_BINARY_DIR}/update.bat") +if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") + set(script_ext "bat") + set(shell_path "REM Batch script") +else() + set(script_ext "sh") + set(shell_path "#!/bin/bash") +endif() + +configure_file("diff.bat.in" "${CMAKE_BINARY_DIR}/diff.${script_ext}" FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) +configure_file("update.bat.in" "${CMAKE_BINARY_DIR}/update.${script_ext}" FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) diff --git a/test/diff.bat.in b/test/diff.bat.in index 3b33d7856..927d63015 100644 --- a/test/diff.bat.in +++ b/test/diff.bat.in @@ -1 +1,2 @@ -cmake -Dtest_dir="@CMAKE_SOURCE_DIR@/test" -P "@CMAKE_SOURCE_DIR@/cmake/diff-failed.cmake" +@shell_path@ +cmake -Dtest_dir="@CMAKE_SOURCE_DIR@/test" -Dref_dir="@ref_dir@" -P "@CMAKE_SOURCE_DIR@/cmake/diff-failed.cmake" diff --git a/test/ref/1ZATTIC.REP b/test/ref-win32-msvc/1ZATTIC.REP similarity index 100% rename from test/ref/1ZATTIC.REP rename to test/ref-win32-msvc/1ZATTIC.REP diff --git a/test/ref/1ZKIVA.REP b/test/ref-win32-msvc/1ZKIVA.REP similarity index 100% rename from test/ref/1ZKIVA.REP rename to test/ref-win32-msvc/1ZKIVA.REP diff --git a/test/ref/2ZATTIC.REP b/test/ref-win32-msvc/2ZATTIC.REP similarity index 100% rename from test/ref/2ZATTIC.REP rename to test/ref-win32-msvc/2ZATTIC.REP diff --git a/test/ref/2ZONE.REP b/test/ref-win32-msvc/2ZONE.REP similarity index 100% rename from test/ref/2ZONE.REP rename to test/ref-win32-msvc/2ZONE.REP diff --git a/test/ref/2ZUN.REP b/test/ref-win32-msvc/2ZUN.REP similarity index 100% rename from test/ref/2ZUN.REP rename to test/ref-win32-msvc/2ZUN.REP diff --git a/test/ref/3ZAIRNETAH.REP b/test/ref-win32-msvc/3ZAIRNETAH.REP similarity index 100% rename from test/ref/3ZAIRNETAH.REP rename to test/ref-win32-msvc/3ZAIRNETAH.REP diff --git a/test/ref/600.REP b/test/ref-win32-msvc/600.REP similarity index 100% rename from test/ref/600.REP rename to test/ref-win32-msvc/600.REP diff --git a/test/ref/930.REP b/test/ref-win32-msvc/930.REP similarity index 100% rename from test/ref/930.REP rename to test/ref-win32-msvc/930.REP diff --git a/test/ref/960.REP b/test/ref-win32-msvc/960.REP similarity index 100% rename from test/ref/960.REP rename to test/ref-win32-msvc/960.REP diff --git a/test/ref/ACTEST1BL.REP b/test/ref-win32-msvc/ACTEST1BL.REP similarity index 100% rename from test/ref/ACTEST1BL.REP rename to test/ref-win32-msvc/ACTEST1BL.REP diff --git a/test/ref/ASHPPKGROOM.REP b/test/ref-win32-msvc/ASHPPKGROOM.REP similarity index 100% rename from test/ref/ASHPPKGROOM.REP rename to test/ref-win32-msvc/ASHPPKGROOM.REP diff --git a/test/ref/ASHPTEST2.REP b/test/ref-win32-msvc/ASHPTEST2.REP similarity index 100% rename from test/ref/ASHPTEST2.REP rename to test/ref-win32-msvc/ASHPTEST2.REP diff --git a/test/ref/ASHPVC2.REP b/test/ref-win32-msvc/ASHPVC2.REP similarity index 100% rename from test/ref/ASHPVC2.REP rename to test/ref-win32-msvc/ASHPVC2.REP diff --git a/test/ref/ASHP_DFNG.REP b/test/ref-win32-msvc/ASHP_DFNG.REP similarity index 100% rename from test/ref/ASHP_DFNG.REP rename to test/ref-win32-msvc/ASHP_DFNG.REP diff --git a/test/ref/AUTOSIZE.REP b/test/ref-win32-msvc/AUTOSIZE.REP similarity index 100% rename from test/ref/AUTOSIZE.REP rename to test/ref-win32-msvc/AUTOSIZE.REP diff --git a/test/ref/BT_TEST.REP b/test/ref-win32-msvc/BT_TEST.REP similarity index 100% rename from test/ref/BT_TEST.REP rename to test/ref-win32-msvc/BT_TEST.REP diff --git a/test/ref/CHDHW.REP b/test/ref-win32-msvc/CHDHW.REP similarity index 100% rename from test/ref/CHDHW.REP rename to test/ref-win32-msvc/CHDHW.REP diff --git a/test/ref/CRTERMINALAH.REP b/test/ref-win32-msvc/CRTERMINALAH.REP similarity index 100% rename from test/ref/CRTERMINALAH.REP rename to test/ref-win32-msvc/CRTERMINALAH.REP diff --git a/test/ref/DHWDU.rep b/test/ref-win32-msvc/DHWDU.rep similarity index 100% rename from test/ref/DHWDU.rep rename to test/ref-win32-msvc/DHWDU.rep diff --git a/test/ref/DHWLS.rep b/test/ref-win32-msvc/DHWLS.rep similarity index 100% rename from test/ref/DHWLS.rep rename to test/ref-win32-msvc/DHWLS.rep diff --git a/test/ref/DHW_AQUATHERMAIRE.REP b/test/ref-win32-msvc/DHW_AQUATHERMAIRE.REP similarity index 100% rename from test/ref/DHW_AQUATHERMAIRE.REP rename to test/ref-win32-msvc/DHW_AQUATHERMAIRE.REP diff --git a/test/ref/DHW_BRWL.REP b/test/ref-win32-msvc/DHW_BRWL.REP similarity index 100% rename from test/ref/DHW_BRWL.REP rename to test/ref-win32-msvc/DHW_BRWL.REP diff --git a/test/ref/DHW_C.REP b/test/ref-win32-msvc/DHW_C.REP similarity index 100% rename from test/ref/DHW_C.REP rename to test/ref-win32-msvc/DHW_C.REP diff --git a/test/ref/DHW_DR.REP b/test/ref-win32-msvc/DHW_DR.REP similarity index 100% rename from test/ref/DHW_DR.REP rename to test/ref-win32-msvc/DHW_DR.REP diff --git a/test/ref/DHW_INV.REP b/test/ref-win32-msvc/DHW_INV.REP similarity index 100% rename from test/ref/DHW_INV.REP rename to test/ref-win32-msvc/DHW_INV.REP diff --git a/test/ref/DHW_MFSIZING.REP b/test/ref-win32-msvc/DHW_MFSIZING.REP similarity index 100% rename from test/ref/DHW_MFSIZING.REP rename to test/ref-win32-msvc/DHW_MFSIZING.REP diff --git a/test/ref/DHW_SOLAR.rep b/test/ref-win32-msvc/DHW_SOLAR.rep similarity index 100% rename from test/ref/DHW_SOLAR.rep rename to test/ref-win32-msvc/DHW_SOLAR.rep diff --git a/test/ref/DHW_UEF.REP b/test/ref-win32-msvc/DHW_UEF.REP similarity index 100% rename from test/ref/DHW_UEF.REP rename to test/ref-win32-msvc/DHW_UEF.REP diff --git a/test/ref/DHW_ZONE.REP b/test/ref-win32-msvc/DHW_ZONE.REP similarity index 100% rename from test/ref/DHW_ZONE.REP rename to test/ref-win32-msvc/DHW_ZONE.REP diff --git a/test/ref/DWHR.REP b/test/ref-win32-msvc/DWHR.REP similarity index 100% rename from test/ref/DWHR.REP rename to test/ref-win32-msvc/DWHR.REP diff --git a/test/ref/ExportFileOutput.rep b/test/ref-win32-msvc/ExportFileOutput.rep similarity index 100% rename from test/ref/ExportFileOutput.rep rename to test/ref-win32-msvc/ExportFileOutput.rep diff --git a/test/ref/FANCOIL.REP b/test/ref-win32-msvc/FANCOIL.REP similarity index 100% rename from test/ref/FANCOIL.REP rename to test/ref-win32-msvc/FANCOIL.REP diff --git a/test/ref/FRESNO.REP b/test/ref-win32-msvc/FRESNO.REP similarity index 100% rename from test/ref/FRESNO.REP rename to test/ref-win32-msvc/FRESNO.REP diff --git a/test/ref/HERV.rep b/test/ref-win32-msvc/HERV.rep similarity index 100% rename from test/ref/HERV.rep rename to test/ref-win32-msvc/HERV.rep diff --git a/test/ref/IZFANTEST.REP b/test/ref-win32-msvc/IZFANTEST.REP similarity index 100% rename from test/ref/IZFANTEST.REP rename to test/ref-win32-msvc/IZFANTEST.REP diff --git a/test/ref/LOADANDAFMETERS.REP b/test/ref-win32-msvc/LOADANDAFMETERS.REP similarity index 100% rename from test/ref/LOADANDAFMETERS.REP rename to test/ref-win32-msvc/LOADANDAFMETERS.REP diff --git a/test/ref/MASSTEST1.REP b/test/ref-win32-msvc/MASSTEST1.REP similarity index 100% rename from test/ref/MASSTEST1.REP rename to test/ref-win32-msvc/MASSTEST1.REP diff --git a/test/ref/MF8X.REP b/test/ref-win32-msvc/MF8X.REP similarity index 100% rename from test/ref/MF8X.REP rename to test/ref-win32-msvc/MF8X.REP diff --git a/test/ref/MINIMUM_RUNNING_FILE.REP b/test/ref-win32-msvc/MINIMUM_RUNNING_FILE.REP similarity index 100% rename from test/ref/MINIMUM_RUNNING_FILE.REP rename to test/ref-win32-msvc/MINIMUM_RUNNING_FILE.REP diff --git a/test/ref/MULTIFAMILY-DOAS.REP b/test/ref-win32-msvc/MULTIFAMILY-DOAS.REP similarity index 100% rename from test/ref/MULTIFAMILY-DOAS.REP rename to test/ref-win32-msvc/MULTIFAMILY-DOAS.REP diff --git a/test/ref/PVTest.rep b/test/ref-win32-msvc/PVTest.rep similarity index 100% rename from test/ref/PVTest.rep rename to test/ref-win32-msvc/PVTest.rep diff --git a/test/ref/PV_BT_TEST.REP b/test/ref-win32-msvc/PV_BT_TEST.REP similarity index 100% rename from test/ref/PV_BT_TEST.REP rename to test/ref-win32-msvc/PV_BT_TEST.REP diff --git a/test/ref/QW5DS.REP b/test/ref-win32-msvc/QW5DS.REP similarity index 100% rename from test/ref/QW5DS.REP rename to test/ref-win32-msvc/QW5DS.REP diff --git a/test/ref/SHADETEST.rep b/test/ref-win32-msvc/SHADETEST.rep similarity index 100% rename from test/ref/SHADETEST.rep rename to test/ref-win32-msvc/SHADETEST.rep diff --git a/test/ref/WSHP.REP b/test/ref-win32-msvc/WSHP.REP similarity index 100% rename from test/ref/WSHP.REP rename to test/ref-win32-msvc/WSHP.REP diff --git a/test/ref/Z2SG.REP b/test/ref-win32-msvc/Z2SG.REP similarity index 100% rename from test/ref/Z2SG.REP rename to test/ref-win32-msvc/Z2SG.REP diff --git a/test/ref/ZONETEST4W.REP b/test/ref-win32-msvc/ZONETEST4W.REP similarity index 100% rename from test/ref/ZONETEST4W.REP rename to test/ref-win32-msvc/ZONETEST4W.REP diff --git a/test/ref/ZT5D.REP b/test/ref-win32-msvc/ZT5D.REP similarity index 100% rename from test/ref/ZT5D.REP rename to test/ref-win32-msvc/ZT5D.REP diff --git a/test/ref/ashwat1.rep b/test/ref-win32-msvc/ashwat1.rep similarity index 100% rename from test/ref/ashwat1.rep rename to test/ref-win32-msvc/ashwat1.rep diff --git a/test/ref/bgtest.rep b/test/ref-win32-msvc/bgtest.rep similarity index 100% rename from test/ref/bgtest.rep rename to test/ref-win32-msvc/bgtest.rep diff --git a/test/ref/commands.rep b/test/ref-win32-msvc/commands.rep similarity index 100% rename from test/ref/commands.rep rename to test/ref-win32-msvc/commands.rep diff --git a/test/ref/dhw02.rep b/test/ref-win32-msvc/dhw02.rep similarity index 100% rename from test/ref/dhw02.rep rename to test/ref-win32-msvc/dhw02.rep diff --git a/test/ref/dhwloop32U.rep b/test/ref-win32-msvc/dhwloop32U.rep similarity index 100% rename from test/ref/dhwloop32U.rep rename to test/ref-win32-msvc/dhwloop32U.rep diff --git a/test/ref/dhwx.rep b/test/ref-win32-msvc/dhwx.rep similarity index 100% rename from test/ref/dhwx.rep rename to test/ref-win32-msvc/dhwx.rep diff --git a/test/ref/expressions.rep b/test/ref-win32-msvc/expressions.rep similarity index 100% rename from test/ref/expressions.rep rename to test/ref-win32-msvc/expressions.rep diff --git a/test/ref/oavtest2.rep b/test/ref-win32-msvc/oavtest2.rep similarity index 100% rename from test/ref/oavtest2.rep rename to test/ref-win32-msvc/oavtest2.rep diff --git a/test/ref/submeter.rep b/test/ref-win32-msvc/submeter.rep similarity index 100% rename from test/ref/submeter.rep rename to test/ref-win32-msvc/submeter.rep diff --git a/test/ref/wthr01.rep b/test/ref-win32-msvc/wthr01.rep similarity index 100% rename from test/ref/wthr01.rep rename to test/ref-win32-msvc/wthr01.rep diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index d4e868afb..07cafab19 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -8,6 +8,7 @@ set(source list(APPEND source ${cse_common_source}) add_executable(cse_tests ${source}) +add_dependencies(cse_tests generate_dtypes) target_compile_definitions(cse_tests PRIVATE SOURCE_DIR="${CMAKE_SOURCE_DIR}") target_include_directories(cse_tests PRIVATE diff --git a/test/update.bat.in b/test/update.bat.in index dba2b647b..0a368866f 100644 --- a/test/update.bat.in +++ b/test/update.bat.in @@ -1 +1,2 @@ -cmake -Dtest_dir="@CMAKE_SOURCE_DIR@/test" -P "@CMAKE_SOURCE_DIR@/cmake/update-failed.cmake" +@shell_path@ +cmake -Dtest_dir="@CMAKE_SOURCE_DIR@/test" -Dref_dir="@ref_dir@" -P "@CMAKE_SOURCE_DIR@/cmake/update-failed.cmake"