

set(CMAKE_SYSTEM_NAME Generic)

################################################################################
# C
################################################################################


file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/autogenerated.cpp "//this file is autogenerated\n")
set(link_wrapper_dir d:/pixel/projects/odr-check/odr-check-test/src/data/src)

set(CMAKE_C_COMPILE_OBJECT  "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -emit-ast <SOURCE> -o <OBJECT>")


set(CMAKE_C_LINK_EXECUTABLE "python ${link_wrapper_dir}/linker-wrapper.py <CMAKE_C_COMPILER> <TARGET> ${CMAKE_CURRENT_BINARY_DIR}/autogenerated.cpp <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_C_CREATE_STATIC_LIBRARY "python ${link_wrapper_dir}/linker-wrapper.py <CMAKE_C_COMPILER> <TARGET> ${CMAKE_CURRENT_BINARY_DIR}/autogenerated.cpp <OBJECTS>")


################################################################################
# C++
################################################################################

set(CMAKE_CXX_COMPILE_OBJECT  "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -emit-ast <SOURCE> -o <OBJECT>")

set(CMAKE_CXX_LINK_EXECUTABLE "python ${link_wrapper_dir}/linker-wrapper.py <CMAKE_CXX_COMPILER> <TARGET> ${CMAKE_CURRENT_BINARY_DIR}/autogenerated.cpp <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_CXX_CREATE_STATIC_LIBRARY "python ${link_wrapper_dir}/linker-wrapper.py <CMAKE_CXX_COMPILER> <TARGET> ${CMAKE_CURRENT_BINARY_DIR}/autogenerated.cpp <OBJECTS>")
