-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ls or dir command in ci to show the compiled tests binaries * set cmake verbose ON * add address sanitizer flags in CMake * disable address sanitizer for windows * temporarily disable asan for windows since I don't know yet how to make it work * removed cmake test builds in the old test.yml file * add architecture x86 support in CI * remove architecture in ci matrix and fix gcc & clang cmake test build * removed architecture in CI since it's not working * fix ctests.yml for windows-clang and windows-gcc where previously it uses msvc compiler even though gcc and clang was specified in cmake variables
- Loading branch information
Showing
3 changed files
with
26 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(extended_precision_integers VERSION 1.0.0) | ||
|
||
file(GLOB SOURCES "*.cpp") | ||
|
||
set(CMAKE_VERBOSE_MAKEFILE OFF) | ||
set(CMAKE_VERBOSE_MAKEFILE ON) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
|
||
# add_compile_definitions(USER_DEFINITION) | ||
|
||
if(WIN32) | ||
# disable windows asan for now since I don't know how to make it work | ||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address") | ||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address") | ||
else() | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") | ||
endif() | ||
|
||
enable_testing() | ||
|
||
foreach(test_src_code ${SOURCES}) | ||
get_filename_component(test_exec_name ${test_src_code} NAME_WE) | ||
add_executable(${test_exec_name} ${test_src_code}) | ||
# target_compile_features(${test_exec_name} PRIVATE cxx_std_11) | ||
target_compile_options(${test_exec_name} PRIVATE -fsanitize=address) | ||
target_link_options(${test_exec_name} PRIVATE -fsanitize=address) | ||
add_test( | ||
NAME ${test_exec_name} | ||
COMMAND $<TARGET_FILE:${test_exec_name}> | ||
) | ||
endforeach(test_src_code ${SOURCES}) | ||
endforeach(test_src_code ${SOURCES}) | ||
|