ready to set up my own structure

This commit is contained in:
2024-07-26 03:52:52 +00:00
parent c2c805cce5
commit 596c404b98

View File

@ -15,8 +15,8 @@ add_executable(alu demo/alu.cpp)
add_executable(modules demo/modules.cpp)
target_compile_definitions(modules PRIVATE _DEBUG)
add_executable(code src/rv32iinterpreter.cpp)
set_target_properties(code
add_executable(interpreter src/rv32iinterpreter.cpp)
set_target_properties(interpreter
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)
@ -24,7 +24,7 @@ set_target_properties(code
# Enable sanitizer for debug builds
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(SANITIZER_FLAGS "-fsanitize=address,undefined -fno-omit-frame-pointer")
set(SANITIZER_FLAGS "-fsanitize=address,undefined -fno-omit-frame-pointer -D _DEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${SANITIZER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${SANITIZER_FLAGS}")
endif()