Closes #34
@ -45,6 +45,7 @@ enum TargetType {
target_static,
target_interface,
target_custom,
target_object,
};
template <typename T>
@ -766,6 +766,12 @@ void generate_cmake(const char *path, const parser::Project *parent_project) {
target_type = "SOURCES";
target_scope = "PUBLIC";
break;
case parser::target_object:
// NOTE: This is properly supported since 3.12
add_command = "add_library";
target_type = "OBJECT";
default:
assert("Unimplemented enum value" && false);
}
@ -9,7 +9,7 @@
#include <tsl/ordered_set.h>
template <>
const char *enumStrings<cmkr::parser::TargetType>::data[] = {"executable", "library", "shared", "static", "interface", "custom"};
const char *enumStrings<cmkr::parser::TargetType>::data[] = {"executable", "library", "shared", "static", "interface", "custom", "object"};
namespace cmkr {
namespace parser {