ready to set up my own structure
This commit is contained in:
@ -15,8 +15,8 @@ add_executable(alu demo/alu.cpp)
|
|||||||
add_executable(modules demo/modules.cpp)
|
add_executable(modules demo/modules.cpp)
|
||||||
target_compile_definitions(modules PRIVATE _DEBUG)
|
target_compile_definitions(modules PRIVATE _DEBUG)
|
||||||
|
|
||||||
add_executable(code src/rv32iinterpreter.cpp)
|
add_executable(interpreter src/rv32iinterpreter.cpp)
|
||||||
set_target_properties(code
|
set_target_properties(interpreter
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
@ -24,7 +24,7 @@ set_target_properties(code
|
|||||||
# Enable sanitizer for debug builds
|
# Enable sanitizer for debug builds
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
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_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${SANITIZER_FLAGS}")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${SANITIZER_FLAGS}")
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${SANITIZER_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user