Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ jobs:
run: python3 make.py -ci -compiler vs2022 -config Release -cpu arm64 -build
- name: Clean
run: python3 make.py -clean_only
- name: Building (debug-arm64)
run: python3 make.py -ci -compiler vs2022 -config Debug -cpu arm64ec -build
- name: Clean
run: python3 make.py -clean_only
- name: Building (release-arm64)
run: python3 make.py -ci -compiler vs2022 -config Release -cpu arm64ec -build
- name: Clean
run: python3 make.py -clean_only
- name: Building (debug-x64) with Clang
run: python3 make.py -ci -compiler vs2022-clang -config Debug -cpu x64 -build
- name: Running unit tests (debug-x64) with Clang
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ jobs:
run: python3 make.py -ci -compiler vs2022 -config Release -cpu arm64 -build
- name: Clean
run: python3 make.py -clean_only
- name: Building (debug-arm64ec)
run: python3 make.py -ci -compiler vs2022 -config Debug -cpu arm64ec -build
- name: Clean
run: python3 make.py -clean_only
- name: Building (release-arm64ec)
run: python3 make.py -ci -compiler vs2022 -config Release -cpu arm64ec -build
- name: Clean
run: python3 make.py -clean_only
- name: Building (debug-x64) with Clang
run: python3 make.py -ci -compiler vs2022-clang -config Debug -cpu x64 -build
- name: Running unit tests (debug-x64) with Clang
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include(CMakeCompiler)
include(CMakePlatforms)

set(CPU_INSTRUCTION_SET false CACHE STRING "CPU instruction set")
set(IS_CROSS_COMPILING false CACHE BOOL "Whether we are cross-compiling or not")

if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES Debug Release)
Expand Down
8 changes: 8 additions & 0 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,21 @@ def do_generate_solution(build_dir, cmake_script_dir, args):
cpu = args.cpu
config = args.config

is_arm64_cpu = False
if platform.machine() == 'arm64' or platform.machine() == 'aarch64':
is_arm64_cpu = True

if compiler:
set_compiler_env(compiler, args)

extra_switches = ['--no-warn-unused-cli']
extra_switches.append('-DCPU_INSTRUCTION_SET:STRING={}'.format(cpu))
extra_switches.append('-DCMAKE_CXX_STANDARD:STRING={}'.format(args.cpp_version))

if platform.system() == 'Windows' and not is_arm64_cpu:
if cpu == 'arm64' or cpu == 'arm64ec':
extra_switches.append('-DIS_CROSS_COMPILING:BOOL=true')

if platform.system() == 'Windows':
if os.path.sep == '\\':
# Native Windows
Expand Down
11 changes: 7 additions & 4 deletions tests/main_generic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ create_source_groups("${ALL_MAIN_SOURCE_FILES}" ${PROJECT_SOURCE_DIR})

add_executable(${PROJECT_NAME} ${ALL_TEST_SOURCE_FILES} ${ALL_MAIN_SOURCE_FILES})

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../external/catch2/contrib")
include(CTest)
include(Catch)
catch_discover_tests(${PROJECT_NAME})
if(NOT IS_CROSS_COMPILING)
# Don't attempt to detect unit tests if we are cross-compiling
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../external/catch2/contrib")
include(CTest)
include(Catch)
catch_discover_tests(${PROJECT_NAME})
endif()

setup_default_compiler_flags(${PROJECT_NAME})

Expand Down
Loading